@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Rajdhani:wght@500;600;700&display=swap');

/* --- БАЗОВЫЕ ПЕРЕМЕННЫЕ (Цвета проекта) --- */
:root {
    --bg-dark: #0B0F19;
    --surface-dark: #111827;
    --accent-aqua: #00E5FF; /* Главный акцентный цвет */
    --accent-blue: #1E90FF;
    --text-light: #f0f0f0;
    --text-muted: #8892B0;
}

/* --- ГЛОБАЛЬНЫЙ КАРКАС И ФОН --- */
body {
    margin: 0; 
    font-family: 'Montserrat', sans-serif;
    background: radial-gradient(circle at 50% 0%, #151f32 0%, var(--bg-dark) 60%);
    background-color: var(--bg-dark); /* Резервный цвет */
    color: var(--text-light); 
    min-height: 100vh;
}

/* Заголовки */
h1, h2, h3 { 
    font-family: 'Rajdhani', sans-serif; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
}
h1 { 
    font-size: 2.5em; 
    border-left: 4px solid var(--accent-aqua); 
    padding-left: 15px; 
    line-height: 1.1;
}

/* --- ПРЕМИУМ ШАПКА (ПРИЛИПАЮЩАЯ) --- */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 5%; box-sizing: border-box;
    transition: all 0.3s ease;
}

header a {
    color: var(--text-muted); text-decoration: none; font-weight: bold;
    cursor: pointer; transition: color 0.3s; text-transform: uppercase; letter-spacing: 1px;
}

header a:hover, header a.active { color: var(--accent-aqua); }

/* Логотип в шапке */
.logo {
    font-family: 'Rajdhani', sans-serif; font-size: 1.5em; font-weight: bold;
    color: #fff; text-decoration: none; letter-spacing: 2px;
}
.logo span { color: var(--accent-aqua); }

/* Десктопная навигация */
.nav-links { display: flex; gap: 30px; align-items: center; margin: 0px auto; }
.nav-link {
    color: var(--text-muted); cursor: pointer; font-weight: 500; font-size: 0.9em;
    text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s;
    position: relative; padding-bottom: 5px;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: var(--accent-aqua); }

/* Подчеркивание активной ссылки */
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--accent-aqua); transition: width 0.3s ease; box-shadow: 0 0 10px var(--accent-aqua);
}
.nav-link.active::after { width: 100%; }

/* --- МОБИЛЬНОЕ МЕНЮ (Fade-анимация) --- */
.burger-btn {
    position: fixed; top: 10px; right: 10px; z-index: 1001;
    background: none; border: none; color: var(--accent-aqua);
    font-size: 30px; cursor: pointer; display: none;
}
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(15, 15, 25, 0.95);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 1000;
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu-overlay a {
    color: var(--text-light); font-size: 24px; margin: 15px 0; text-decoration: none;
    transition: color 0.3s;
}
.mobile-menu-overlay a:hover { color: var(--accent-aqua); }

/* --- КОНТЕЙНЕР ДЛЯ КОНТЕНТА --- */
.main-container {
    max-width: 1200px;
    margin: 120px auto 0;
    padding: 0 20px; box-sizing: border-box;
}

/* --- ПЛАВНОЕ ПОЯВЛЕНИЕ СТРАНИЦ --- */
.page { display: none; opacity: 0; animation: fadeIn 0.5s forwards; }
.page.active { display: block; }

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

/* --- СТИЛИ КАЛЬКУЛЯТОРА --- */
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--surface-dark); transition: .4s; border: 1px solid #333;
    border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: var(--text-muted); transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: rgba(0, 229, 255, 0.1); border-color: var(--accent-aqua); }
input:checked + .slider:before {
    transform: translateX(24px); background-color: var(--accent-aqua); box-shadow: 0 0 10px var(--accent-aqua);
}

/* Плавающая панель с итогом */
.sticky-total {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(11, 15, 25, 0.95); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 229, 255, 0.3);
    padding: 20px 40px; box-sizing: border-box;
    display: flex; justify-content: space-between; align-items: center;
    transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}
.sticky-total.visible { transform: translateY(0); }

.order-btn {
    background: var(--accent-aqua); color: var(--bg-dark); border: none; padding: 12px 30px;
    font-size: 16px; font-weight: bold; border-radius: 8px; cursor: pointer;
    transition: all 0.3s; text-transform: uppercase; letter-spacing: 1px;
}
.order-btn:hover { background: #fff; box-shadow: 0 0 20px rgba(0, 229, 255, 0.6); }

/* --- СТИЛИ МОДАЛЬНОГО ОКНА --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px);
    display: flex; justify-content: center; align-items: center;
    z-index: 200; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-box {
    background: var(--surface-dark); padding: 40px; border-radius: 12px;
    width: 90%; max-width: 400px; border: 1px solid #333;
    transform: translateY(50px); transition: transform 0.3s ease;
}
.modal-overlay.active .modal-box { transform: translateY(0); }

.modal-box input {
    width: 100%; padding: 12px; margin-bottom: 20px;
    background: var(--bg-dark); border: 1px solid #333; color: #fff;
    border-radius: 6px; box-sizing: border-box; font-size: 16px;
}
.modal-box input:focus { outline: none; border-color: var(--accent-aqua); }

/* --- СТИЛИ ПОРТФОЛИО И ГАЛЕРЕИ --- */
.portfolio-category { margin-bottom: 50px; }
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative; overflow: hidden; border-radius: 12px;
    opacity: 0; transform: translateY(40px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--surface-dark); 
}
.portfolio-item.visible { opacity: 1; transform: translateY(0); }

.portfolio-item img {
    width: 100%; height: 400px; 
    object-fit: cover; display: block;
    transition: transform 0.5s ease;
}
.portfolio-item:hover img { transform: scale(1.05); }

.portfolio-item-title {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 30px 15px 15px; box-sizing: border-box;
    background: linear-gradient(to top, rgba(11,15,25,0.95), transparent);
    color: #fff; font-weight: bold;
    transform: translateY(100%); transition: transform 0.3s ease;
}
.portfolio-item:hover .portfolio-item-title { transform: translateY(0); }

/* --- ПРЕЛОАДЕР ДЛЯ ГАЛЕРЕИ --- */
.img-wrapper .preloader {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 30px; height: 30px; border: 3px solid rgba(0, 229, 255, 0.2);
    border-top-color: var(--accent-aqua); border-radius: 50%;
    animation: spinGallery 1s linear infinite; z-index: 2;
}
@keyframes spinGallery { 
    100% { transform: translate(-50%, -50%) rotate(360deg); } 
}

/* --- ГЛАВНЫЙ ЛОАДЕР САЙТА --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-dark); z-index: 9999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* Гарантированное скрытие */
#preloader.hidden { 
    opacity: 0 !important; 
    visibility: hidden !important; 
    pointer-events: none !important; 
}

.spinner {
    width: 60px; height: 60px;
    border: 3px solid rgba(0, 229, 255, 0.1);
    border-top-color: var(--accent-aqua);
    border-radius: 50%;
    animation: spinMain 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}
@keyframes spinMain { 
    100% { transform: rotate(360deg); } 
}

.preloader-text {
    margin-top: 25px; color: var(--accent-aqua); font-weight: bold;
    letter-spacing: 3px; text-transform: uppercase; font-size: 0.9em;
    animation: pulse 2s infinite;
}
@keyframes pulse { 
    0%, 100% { opacity: 1; } 
    50% { opacity: 0.5; } 
}

/* --- СЕТКА ДЛЯ ОЧЕРЕДИ --- */
#queue-container h2 { width: 100%; margin-top: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; color: var(--text-muted); }
.queue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-bottom: 30px;}

/* --- TOAST УВЕДОМЛЕНИЯ --- */
#toast-container {
    position: fixed; top: 90px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
    background: rgba(11, 15, 25, 0.95); backdrop-filter: blur(10px);
    border-left: 4px solid var(--accent-aqua); padding: 15px 25px; border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); color: #fff; font-family: 'Montserrat', sans-serif;
    transform: translateX(120%); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show { transform: translateX(0); }

/* --- КНОПКА ЗАГРУЗКИ ФАЙЛА В ОТЗЫВАХ --- */
.custom-file-upload {
    display: inline-block; padding: 12px; width: 100%; box-sizing: border-box;
    background: rgba(0, 229, 255, 0.05); border: 1px dashed var(--accent-aqua);
    color: var(--accent-aqua); border-radius: 8px; cursor: pointer; text-align: center;
    transition: all 0.3s ease; margin-bottom: 20px;
}
.custom-file-upload:hover { background: rgba(0, 229, 255, 0.15); }

/* --- СТИЛИ LIGHTBOX (ГАЛЕРЕИ) --- */
#lightbox-modal { 
    z-index: 10000; flex-direction: column; 
    background: rgba(5, 7, 12, 0.95); 
}
.lightbox-content { 
    position: relative; max-width: 90%; max-height: 85vh; 
    display: flex; flex-direction: column; align-items: center; 
}
#lightbox-img { 
    max-width: 100%; max-height: 80vh; border-radius: 8px; 
    object-fit: contain; box-shadow: 0 10px 40px rgba(0,229,255,0.15); 
}
.lightbox-close { 
    position: absolute; top: 20px; right: 40px; color: #fff; 
    font-size: 50px; font-weight: normal; cursor: pointer; 
    transition: color 0.3s; z-index: 10001; line-height: 1;
}
.lightbox-close:hover { color: var(--accent-aqua); }

.lightbox-nav { 
    position: absolute; top: 50%; transform: translateY(-50%); 
    font-size: 50px; color: #fff; padding: 20px; cursor: pointer; 
    user-select: none; transition: 0.3s; z-index: 10001;
}
.lightbox-nav:hover { color: var(--accent-aqua); text-shadow: 0 0 15px var(--accent-aqua); }
.lightbox-prev { left: 2%; }
.lightbox-next { right: 2%; }

/* --- СТИЛИ ГЛАВНОЙ СТРАНИЦЫ (HERO SECTION) --- */
.hero-section {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 75vh; text-align: center; margin-top: 20px;
}
.hero-avatar {
    width: 150px; height: 150px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-aqua), #8a2be2); 
    padding: 4px; margin-bottom: 30px; 
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.2);
}
.hero-avatar img {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    background: var(--surface-dark); border: 4px solid var(--bg-dark); box-sizing: border-box;
}
.status-badge {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(0, 255, 128, 0.1); border: 1px solid rgba(0, 255, 128, 0.3);
    color: #00ff80; padding: 8px 20px; border-radius: 30px;
    font-size: 0.9em; font-weight: bold; letter-spacing: 1px; margin-bottom: 20px;
}
.status-dot {
    width: 10px; height: 10px; background: #00ff80; border-radius: 50%;
    box-shadow: 0 0 10px #00ff80; animation: pulseDot 2s infinite;
}
.hero-name { 
    font-size: 4em; margin: 0 0 15px 0; border: none; padding: 0; 
    text-shadow: 0 0 20px rgba(0,229,255,0.4); line-height: 1;
}
.hero-bio { 
    max-width: 600px; color: var(--text-muted); line-height: 1.6; 
    margin-bottom: 40px; font-size: 1.1em; 
}
.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.hero-btn {
    padding: 16px 40px; font-size: 0.95em; font-weight: bold; font-family: 'Montserrat', sans-serif;
    border-radius: 8px; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 1.5px;
}
.hero-btn.primary {
    background: var(--accent-aqua); color: var(--bg-dark); border: none;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}
.hero-btn.primary:hover { 
    background: #fff; box-shadow: 0 0 30px rgba(0, 229, 255, 0.6); transform: translateY(-4px); 
}
.hero-btn.secondary {
    background: rgba(0, 229, 255, 0.05); color: var(--accent-aqua); border: 1px solid var(--accent-aqua);
}
.hero-btn.secondary:hover { 
    background: rgba(0, 229, 255, 0.15); transform: translateY(-4px); 
}

/* СТИЛИ ПЕРЕКЛЮЧАТЕЛЯ ЯЗЫКОВ */
.lang-switch {
    color: var(--text-muted); font-weight: bold; font-size: 0.9em;
    letter-spacing: 1px; cursor: pointer; user-select: none;
    margin-left: auto; padding-right: 20px;
}
.lang-switch span { transition: color 0.3s; }
.lang-switch span:hover { color: #fff; }
.lang-switch span.active { color: var(--accent-aqua); }

/* --- АДАПТИВНОСТЬ (Медиазапросы для мобилок) --- */
@media (max-width: 980px) {
    .burger-btn { display: block; }
    .nav-links { display: none; } /* Скрываем десктопное меню, оставляем бургер */
    .gallery-grid { grid-template-columns: 1fr; }
    .hero-name { font-size: 3em; }
    
    /* Сдвигаем языки левее, чтобы освободить место для бургера */
    .lang-switch { padding-right: 50px; margin-left: auto; }
}