* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Экран загрузки */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.loading-screen.slide-out {
    transform: translateX(100%);
}

.skateboard-container {
    position: relative;
    width: 200px;
    height: 200px;
}

.skateboard-mascot {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: skateboard-ride 2s ease-in-out infinite;
}

@keyframes skateboard-ride {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Основной контент */
.main-content {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.main-content.hidden {
    opacity: 0;
    pointer-events: none;
}

.screen {
    display: none;
    padding: 20px;
    min-height: 100vh;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Заголовок */
.header-logo {
    text-align: center;
    padding: 30px 20px;
    color: white;
}

.header-logo h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
}

.event-date {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 10px;
}

/* Сетка категорий */
.categories-grid {
    display: grid;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.category-card {
    background: white;
    border: none;
    border-radius: 25px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.category-card:active {
    transform: scale(0.95);
}

.category-card:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.category-card:disabled::before {
    display: none;
}

.tickets-left {
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4CAF50;
}

.tickets-left.tickets-low {
    color: #ff4444;
    font-weight: 700;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 0 rgba(76, 175, 80, 0.6);
    }
}

@keyframes pulse-urgent {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 25px 0 rgba(255, 68, 68, 0.8);
    }
}

.category-card:disabled .tickets-left {
    color: #999;
    background: rgba(153, 153, 153, 0.1);
    border-color: #999;
    animation: none;
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.category-card h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.category-price {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4444;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(255,68,68,0.5);
}

.base-category {
    border: 3px solid #4CAF50;
}

.vip-category {
    border: 3px solid #FF9800;
}

.super-vip-category {
    border: 3px solid #9C27B0;
    background: linear-gradient(135deg, #fff 0%, #f3e5f5 100%);
}

/* Экран деталей */
.back-button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-button:active {
    transform: scale(0.95);
    background: rgba(255,255,255,0.3);
}

.ticket-details {
    background: white;
    border-radius: 30px;
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ticket-header {
    text-align: center;
    margin-bottom: 30px;
}

.ticket-icon-large {
    font-size: 5rem;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

.ticket-header h1 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 10px;
}

.event-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-row:last-child {
    border-bottom: none;
}

.tickets-available-row {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #667eea;
    border-bottom: none;
}

.tickets-available-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4CAF50;
    animation: pulse-text 2s infinite;
}

.tickets-available-value.low {
    color: #ff4444;
    animation: pulse-urgent-text 1s infinite;
}

@keyframes pulse-text {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes pulse-urgent-text {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.info-label {
    font-weight: 600;
    color: #666;
}

.info-value {
    color: #333;
    font-weight: 500;
}

.features-list {
    margin-bottom: 25px;
}

.feature-item {
    padding: 12px 0;
    color: #555;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.feature-item:last-child {
    border-bottom: none;
}

/* Промокод */
.promo-section {
    margin-bottom: 25px;
}

#promoInput {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    transition: border-color 0.3s;
}

#promoInput:focus {
    outline: none;
    border-color: #667eea;
}

.promo-button {
    width: 100%;
    padding: 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.promo-button:active {
    transform: scale(0.95);
}

.promo-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
}

.promo-message.success {
    background: #d4edda;
    color: #155724;
}

.promo-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Итоговая цена */
.price-summary {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 1.1rem;
}

.discount-row {
    color: #4CAF50;
    font-weight: 600;
}

.total-row {
    border-top: 2px solid #667eea;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

/* Кнопка покупки */
.buy-button {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.buy-button:active {
    transform: scale(0.95);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-logo h1 {
        font-size: 1.5rem;
    }
    
    .category-card {
        padding: 30px 20px;
    }
    
    .category-icon {
        font-size: 3rem;
    }
}
