/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.4;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

body.preload * {
    animation: none !important;
    transition: none !important;
}

.app {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

/* ===== HEADER ===== */
.header {
    background: white;
    border-radius: 0 0 24px 24px;
    padding: 20px 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 32px;
    background: linear-gradient(135deg, #ff6b9d, #ff8a00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo h1 {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b9d, #ff8a00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header-stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.stat-number.active {
    color: #4CAF50;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-subtitle {
    text-align: center;
}

.header-subtitle h2 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.header-subtitle p {
    font-size: 16px;
    color: #666;
}

/* ===== INFO CARD ===== */
.info-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin: 0 16px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.info-badge {
    background: linear-gradient(135deg, #ff6b9d, #ff8a00);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.info-time {
    font-size: 14px;
    color: #666;
}

.info-time strong {
    color: #ff6b9d;
}

.info-content p {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.info-highlight {
    background: #fff5f7;
    border-left: 4px solid #ff6b9d;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
}

.highlight-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.highlight-text {
    flex: 1;
}

.highlight-text strong {
    display: block;
    color: #ff6b9d;
    margin-bottom: 10px;
    font-size: 16px;
}

.highlight-text ul {
    list-style: none;
    padding-left: 0;
}

.highlight-text li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    color: #333;
    font-size: 14px;
}

.highlight-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ff6b9d;
    font-weight: bold;
}

.charity-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(0, 87, 184, 0.1), rgba(255, 215, 0, 0.1));
    padding: 20px;
    border-radius: 16px;
    border: 2px solid rgba(0, 87, 184, 0.2);
}

.charity-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.charity-text {
    flex: 1;
}

.charity-text strong {
    display: block;
    color: #0057b8;
    font-size: 16px;
    margin-bottom: 6px;
}

.charity-text p {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
}

.info-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.prize-info {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.prize-icon {
    font-size: 24px;
}

.prize-text {
    font-size: 15px;
    color: #666;
}

/* ===== LOCATION BLOCK ===== */
.location-block {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin: 0 16px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    justify-content: center;
}

.location-icon {
    font-size: 40px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.location-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.location-text p {
    font-size: 14px;
    color: #888;
}

.location-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    margin-bottom: 16px;
    border: none;
    outline: none;
}

.location-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

.location-button:active:not(:disabled) {
    transform: translateY(0);
}

.location-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

.button-icon {
    font-size: 20px;
}

.location-note {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-size: 13px;
    color: #888;
}

.note-icon {
    font-size: 16px;
}

/* ===== GIRLS GRID ===== */
.girls-grid {
    padding: 0 16px;
    margin-bottom: 30px;
    position: relative;
    min-height: 400px;
}

/* Стили для заблокированного состояния */
.girls-grid.locked {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
    opacity: 0.8;
}

.girls-grid.locked .girl-card {
    transform: scale(0.98);
}

.girls-grid.locked .vote-button {
    background: #f0f0f0 !important;
    color: #888 !important;
    cursor: not-allowed !important;
}

/* Сообщение о блокировке */
.locked-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 107, 157, 0.3);
    z-index: 10;
    width: 90%;
    max-width: 400px;
    animation: messageAppear 0.5s ease-out;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.message-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: lockShake 1.5s infinite;
}

@keyframes lockShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.locked-message h4 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.locked-message p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Стили для разблокированного состояния */
.girls-grid:not(.locked) .locked-message {
    display: none;
    animation: messageDisappear 0.3s ease-out forwards;
}

@keyframes messageDisappear {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
        display: none;
    }
}

.girls-grid:not(.locked) {
    filter: none;
    pointer-events: auto;
    user-select: auto;
    opacity: 1;
}

.girls-grid:not(.locked) .girl-card {
    transform: scale(1);
    animation: cardUnlock 0.5s ease-out;
}

@keyframes cardUnlock {
    from {
        opacity: 0.5;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Контент карточек */
.section-title {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.section-title h3 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 15px;
    color: #888;
    transition: color 0.3s ease;
}

.cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.girl-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.girl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.card-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.girl-card:hover .card-image img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.7) 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.region-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b9d;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.votes-count {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.card-content {
    padding: 20px;
}

.girl-info {
    margin-bottom: 16px;
}

.girl-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.girl-details {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.girl-description {
    font-size: 14px;
    color: #888;
    line-height: 1.4;
}

.card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-icon {
    font-size: 16px;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.vote-button {
    width: 100%;
    padding: 16px;
    background: #f0f0f0;
    color: #888;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Разблокированная кнопка */
.vote-button:not(:disabled) {
    background: linear-gradient(135deg, #ff6b9d, #ff8a00);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.vote-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

.vote-button:not(:disabled):active {
    transform: translateY(0);
}

.vote-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.vote-button:not(:disabled):hover::after {
    left: 100%;
}

.button-icon {
    font-size: 18px;
}

/* ===== ADDITIONAL INFO ===== */
.additional-info {
    padding: 0 16px 30px;
}

.info-block {
    display: flex;
    gap: 16px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.block-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.block-content h4 {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.block-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ===== FOOTER ===== */
.footer {
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 30px 16px;
    margin-top: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #ff6b9d;
}

.footer-copyright p {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.charity-notice {
    color: #0057b8;
    font-weight: 600;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 480px) {
    .header-top {
        flex-direction: column;
        gap: 12px;
    }
    
    .header-stats {
        width: 100%;
        justify-content: center;
    }
    
    .card-image {
        height: 240px;
    }
    
    .locked-message {
        padding: 20px;
        width: 95%;
    }
    
    .message-icon {
        font-size: 36px;
    }
    
    .locked-message h4 {
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .card-image {
        height: 200px;
    }
    
    .location-button {
        padding: 16px;
        font-size: 15px;
    }
    
    .location-icon {
        font-size: 32px;
    }
}

/* Предотвращение масштабирования на iOS */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
}