/* Variables CSS pour les thèmes immersifs */
:root {
    /* Thème clair */
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #45b7d1;
    --tertiary-color: #feca57;
    --quaternary-color: #ff9ff3;
    --background-color: #0a0a0a;
    --surface-color: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
    --shadow-color: rgba(255, 255, 255, 0.1);
    --glow-primary: 0 0 20px rgba(255, 107, 107, 0.5);
    --glow-secondary: 0 0 20px rgba(78, 205, 196, 0.5);
    --glow-accent: 0 0 20px rgba(69, 183, 209, 0.5);
    --gradient-primary: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    --gradient-secondary: linear-gradient(135deg, #45b7d1, #96ceb4);
    --gradient-accent: linear-gradient(135deg, #feca57, #ff9ff3);
    --gradient-background: linear-gradient(135deg, #0a0a0a, #1a1a1a, #2a2a2a);
}

[data-theme="light"] {
    --background-color: #ffffff;
    --surface-color: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #e9ecef;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --glow-primary: 0 0 20px rgba(255, 107, 107, 0.3);
    --glow-secondary: 0 0 20px rgba(78, 205, 196, 0.3);
    --glow-accent: 0 0 20px rgba(69, 183, 209, 0.3);
    --gradient-background: linear-gradient(135deg, #ffffff, #f8f9fa, #e9ecef);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Canvas de fond WebGL */
.webgl-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: var(--gradient-background);
}

/* Canvas pour le pinceau numérique */
.brush-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.brush-overlay.active {
    pointer-events: all;
}

/* Contrôles du pinceau */
.brush-controls {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    z-index: 1000;
    border: 1px solid var(--border-color);
    box-shadow: var(--glow-primary);
    transition: all 0.3s ease;
}

.brush-controls:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--glow-secondary);
}

.brush-palette {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.palette-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.palette-option {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.palette-option:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.palette-option.active {
    border-color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.brush-size {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#brush-size-slider {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
    cursor: pointer;
}

#brush-size-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: var(--glow-primary);
}

#brush-size-value {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.brush-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

/* Панель инструментов */
.brush-tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tool-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.tool-btn:hover { box-shadow: var(--glow-primary); transform: translateY(-1px); }
.tool-btn.active { background: var(--gradient-primary); color: #fff; border-color: transparent; }

.brush-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.brush-btn.active {
    background: var(--gradient-accent);
    box-shadow: var(--glow-accent);
}

/* Navigation immersive */
.immersive-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-100%);
    animation: navSlideDown 1s ease 1.5s forwards;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    position: relative;
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
}

.logo-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    filter: blur(20px);
    opacity: 0.3;
    z-index: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    overflow: hidden;
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-btn, .fullscreen-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.theme-btn:hover, .fullscreen-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--glow-primary);
    background: var(--gradient-primary);
}

/* Предупреждение о куках */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 9999;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-title {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.cookie-text {
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background: var(--gradient-primary);
    color: white;
}

.cookie-btn.decline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.cookie-link {
    color: var(--primary-color);
    text-decoration: none;
}

.cookie-link:hover {
    text-decoration: underline;
}

/* Экран загрузки */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: loadingPulse 2s ease-in-out infinite;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1rem;
    text-align: center;
}

/* Форма регистрации */
.registration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.registration-modal.show {
    opacity: 1;
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--surface-color);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-title {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--background-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--glow-primary);
}

.form-options {
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
}

.form-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.form-btn {
    padding: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.form-btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.form-btn.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.form-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.modal-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modal-link {
    color: var(--primary-color);
    text-decoration: none;
}

.modal-link:hover {
    text-decoration: underline;
}

/* Section Hero immersive */
.hero-immersive {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    animation: pageLoad 1s ease 2s forwards;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
    position: relative;
}

.hero-title-container {
    margin-bottom: 2rem;
    position: relative;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    position: relative;
}

/* Эффект печатной машины для заголовка */
.typewriter-container {
    display: block;
    position: relative;
}

.typewriter-line {
    display: block;
    margin-bottom: 0.5rem;
    min-height: 1.2em;
}

.typewriter-text {
    display: inline-block;
    position: relative;
}

.typewriter-text::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    animation: blink 1s infinite;
}

.typewriter-text.completed::after {
    display: none;
}

.title-word {
    display: inline-block;
    position: relative;
    margin: 0 0.5rem;
    opacity: 0;
    transform: translateY(50px);
    animation: titleReveal 1s ease forwards;
}

.title-word:nth-child(1) { animation-delay: 0.2s; }
.title-word:nth-child(2) { animation-delay: 0.4s; }
.title-word:nth-child(3) { animation-delay: 0.6s; }

.title-word.accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-underline {
    width: 0;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
    animation: underlineExpand 1s ease 1.2s forwards;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 3.5s forwards;
    font-weight: 300;
}

.hero-cta {
    opacity: 0;
    animation: fadeInUp 1s ease 4s forwards;
}

.cta-button {
    position: relative;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    padding: 1.2rem 3rem;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--glow-primary);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.4);
    animation: buttonPulse 2s ease-in-out infinite;
}

.button-glow {
    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;
}

.cta-button:hover .button-glow {
    left: 100%;
}

.button-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    opacity: 0.6;
}

.shape-1 {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    box-shadow: var(--glow-primary);
    opacity: 0;
    animation: fadeInScale 1s ease 2s forwards, float 8s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: var(--gradient-secondary);
    top: 60%;
    right: 20%;
    animation-delay: 2s;
    box-shadow: var(--glow-secondary);
    opacity: 0;
    animation: fadeInScale 1s ease 2.2s forwards, float 8s ease-in-out infinite;
}

.shape-3 {
    width: 80px;
    height: 80px;
    background: var(--gradient-accent);
    bottom: 30%;
    left: 30%;
    animation-delay: 4s;
    box-shadow: var(--glow-accent);
    opacity: 0;
    animation: fadeInScale 1s ease 2.4s forwards, float 8s ease-in-out infinite;
}

.shape-4 {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    top: 40%;
    right: 10%;
    animation-delay: 6s;
    box-shadow: var(--glow-primary);
    opacity: 0;
    animation: fadeInScale 1s ease 2.6s forwards, float 8s ease-in-out infinite;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease 4.5s forwards;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 1px;
    animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Section Galerie immersive */
.gallery-immersive {
    padding: 8rem 0;
    background: var(--surface-color);
    position: relative;
    overflow: hidden;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gallery-header {
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }

.gallery-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    position: relative;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    padding: 0.8rem 2rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.filter-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-btn:hover .filter-glow {
    opacity: 0.3;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--background-color);
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.4s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(50px);
    animation: galleryReveal 0.8s ease forwards;
}

.gallery-item:nth-child(odd) { animation-delay: 0.1s; }
.gallery-item:nth-child(even) { animation-delay: 0.2s; }

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px var(--shadow-color);
}

.gallery-image-container {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.placeholder-content {
    text-align: center;
    color: var(--text-secondary);
}

.placeholder-content.error {
    color: var(--text-primary);
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.placeholder-text {
    font-size: 1rem;
    font-weight: 500;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
    filter: brightness(1.1) saturate(1.2);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.8), rgba(78, 205, 196, 0.8));
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-info {
    transform: translateY(0);
}

.gallery-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-category {
    font-size: 1rem;
    opacity: 0.9;
}

.gallery-loading {
    text-align: center;
    padding: 3rem 0;
}

.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Section À propos immersive */
.about-immersive {
    padding: 8rem 0;
    background: var(--background-color);
    position: relative;
}

.about-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text .about-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 2rem;
    text-align: left;
}

.about-description {
    margin-bottom: 3rem;
}

.description-paragraph {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.8s ease forwards;
}

.description-paragraph:nth-child(1) { animation-delay: 0.2s; }
.description-paragraph:nth-child(2) { animation-delay: 0.4s; }
.description-paragraph:nth-child(3) { animation-delay: 0.6s; }

.about-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    position: relative;
    text-align: center;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    overflow: hidden;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-primary);
}

.stat-number {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.stat-item:hover .stat-glow {
    opacity: 0.2;
}

.about-visual {
    position: relative;
    height: 400px;
}

.visual-canvas {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

#about-canvas {
    width: 100%;
    height: 100%;
}

/* Lightbox immersive */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: var(--primary-color);
}

.lightbox-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
}

#lightbox-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#lightbox-description {
    font-size: 1rem;
    opacity: 0.8;
}

.lightbox-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 1rem;
}

.lightbox-prev, .lightbox-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

/* Footer immersif */
.footer-immersive {
    background: var(--surface-color);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.footer-immersive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

/* Animations */
@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Эффект печатной машины - убран, используется JavaScript */

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--primary-color);
    }
}

/* Анимация появления страницы */
@keyframes pageLoad {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Эффект загрузки */
@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Анимация появления элементов */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Эффект волны */
@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Эффект появления элементов по очереди */
@keyframes staggerFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Эффект пульсации для кнопок */
@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 107, 107, 0.6);
    }
}

/* Эффект появления навигации */
@keyframes navSlideDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes underlineExpand {
    from {
        width: 0;
    }
    to {
        width: 200px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes galleryReveal {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .brush-controls {
        right: 1rem;
        padding: 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(26, 26, 26, 0.95);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .lightbox-prev {
        left: -50px;
    }
    
    .lightbox-next {
        right: -50px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
    
    .typewriter-line {
        margin-bottom: 0.3rem;
    }
    
    .gallery-title {
        font-size: clamp(2rem, 4vw, 3rem);
    }
    
    .about-title {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }
    
    .brush-controls {
        right: 0.5rem;
        padding: 0.8rem;
    }
    
    .color-option {
        width: 25px;
        height: 25px;
    }
}

/* Améliorations d'accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour l'accessibilité */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-color);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-accent);
}
