:root {
    --bg-color: #0b0c10;
    --card-bg: rgba(25, 26, 36, 0.6);
    --primary: #45f3ff;
    --secondary: #ff2a7a;
    --text-main: #ffffff;
    --text-muted: #8b8c9c;
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Effects */
#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Typography & General */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

#main-content {
    padding-bottom: 180px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px rgba(69, 243, 255, 0.4);
}

.primary-btn:hover:not(:disabled) {
    box-shadow: 0 0 25px rgba(69, 243, 255, 0.8);
    transform: translateY(-2px);
}

.primary-btn:disabled, .secondary-btn:disabled {
    background: #333;
    color: #777;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.secondary-btn {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.secondary-btn:hover:not(:disabled) {
    background: rgba(69, 243, 255, 0.1);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.artek-logo {
    display: block;
    margin: 0 auto 20px auto;
    width: 250px;
    height: auto;
}

.fsi-logo-link {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 50;
}

.fsi-logo {
    display: block;
    width: 125px;
    height: auto;
    transition: transform 0.3s ease;
}

.fsi-logo-link:hover .fsi-logo {
    transform: scale(1.05);
}

.glitch {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    color: white;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.description {
    max-width: 600px;
    margin: 0 auto 40px auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Steps */
.step-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    transition: opacity 0.5s ease;
}

.disabled-step {
    opacity: 0.3;
    pointer-events: none;
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.step-num {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--primary);
    margin-right: 15px;
    opacity: 0.8;
}

/* Camps Grid */
.camps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.camp-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
}

.camp-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.camp-btn.selected {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(69, 243, 255, 0.5);
}

/* Forms */
.camp-info {
    animation: fadeIn 0.5s ease;
}

.schedule-msg {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(69, 243, 255, 0.1);
    border-left: 4px solid var(--primary);
    border-radius: 4px;
}

.user-details {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 250px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(69, 243, 255, 0.2);
}

/* Master Classes Step */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.class-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.class-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.class-card.selected {
    border-color: var(--secondary);
    box-shadow: 0 0 15px rgba(255, 42, 122, 0.3);
}

.class-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.class-cat {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.class-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.class-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.capacity {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.cap-high { background: rgba(0, 255, 0, 0.2); color: #0f0; }
.cap-med { background: rgba(255, 255, 0, 0.2); color: #ff0; }
.cap-low { background: rgba(255, 0, 0, 0.2); color: #f00; }

/* Free Zones */
.free-zones {
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.free-zones h4 {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.free-zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.free-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--glass-border);
    padding: 15px;
    border-radius: 8px;
}

/* Schedule Panel */
.schedule-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(11, 12, 16, 0.95);
    border-top: 1px solid var(--primary);
    padding: 15px 20px;
    z-index: 100;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 15px auto;
}

.slots-container {
    display: flex;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    padding-bottom: 5px;
}

.slot {
    flex: 1;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--text-muted);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slot.filled {
    border: 1px solid var(--secondary);
    background: rgba(255, 42, 122, 0.1);
}

.slot-time {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
}

.slot-title {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-slot {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 5px;
}

.remove-slot:hover {
    text-decoration: underline;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #151622;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.modal-meta {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.modal-desc {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Ticket */
.ticket {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
}

.ticket::before, .ticket::after {
    content: '';
    position: absolute;
    width: 30px; height: 30px;
    background: #151622;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}
.ticket::before { left: -15px; border-right: 1px solid var(--primary); }
.ticket::after { right: -15px; border-left: 1px solid var(--primary); }

.ticket-title {
    color: var(--primary);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.ticket-schedule {
    margin-top: 15px;
    border-top: 1px dashed rgba(255,255,255,0.2);
    padding-top: 15px;
}

.ticket-schedule p {
    margin-bottom: 5px;
}

.ticket-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media (max-width: 768px) {
    /* Герой-блок */
    .fsi-logo-link { top: 10px; right: 15px; }
    .fsi-logo { width: 90px; }
    .artek-logo { width: 180px; margin-top: -50px; margin-bottom: 15px; }
    .glitch { font-size: 2rem; margin-top: 0; }
    .subtitle { font-size: 1.1rem; margin-bottom: 15px; }
    .description { font-size: 0.95rem; padding: 0 10px; }
    .primary-btn { padding: 10px 20px; font-size: 1rem; }

    /* Шаги и карточки */
    .step-card { padding: 20px 15px; margin-bottom: 30px; }
    .step-header { margin-bottom: 15px; }
    .step-num { font-size: 1.5rem; margin-right: 10px; }
    .step-header h3 { font-size: 1.1rem; }
    
    .camps-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .camp-btn { padding: 10px; font-size: 0.9rem; }
    
    /* Формы */
    .user-details { flex-direction: column; gap: 15px; }
    .input-group { min-width: 100%; }
    
    /* Мастер-классы */
    .filters { justify-content: center; gap: 8px; }
    .filter-btn { padding: 5px 12px; font-size: 0.85rem; }
    .classes-grid { grid-template-columns: 1fr; gap: 15px; }
    .class-card { padding: 15px; }
    .class-title { font-size: 1.1rem; }
    
    /* Панель расписания - скролл по горизонтали */
    .schedule-panel { padding: 10px 15px; }
    .schedule-header h4 { font-size: 1rem; margin: 0; }
    .slots-container { 
        flex-direction: row; /* Возвращаем в строку для горизонтального скролла */
        overflow-x: auto; 
        gap: 10px; 
        padding-bottom: 10px; 
        -webkit-overflow-scrolling: touch; 
    }
    .slot { min-width: 200px; padding: 8px 12px; }
    .slot-title { font-size: 0.85rem; }
    
    /* Модалки */
    .modal-content { padding: 20px; width: 95%; max-height: 90vh; overflow-y: auto; }
    .close-modal { top: 5px; right: 15px; font-size: 1.8rem; }
    .modal-desc { font-size: 0.9rem; }
    .ticket { padding: 15px; }
}
