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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background: #000;
    color: #fff;
    height: 100vh;
    width: 100vw;
    padding-bottom: 50px; /* Space for beta banner at bottom */
}

body.beta-banner-hidden {
    padding-top: 0;
}

html {
    overflow: hidden;
    height: 100%;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#container {
    position: relative;
    z-index: 1;
    height: 100vh;
    overflow: hidden;
}

#horizontal-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.h-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    padding-bottom: 80px; /* Відступ для футера */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.h-section.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.h-section.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.section-content {
    max-width: 1400px;
    width: 100%;
}

/* Section 1 - Intro */
#section-intro {
    flex-direction: column;
    text-align: center;
}

#section-intro h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

#section-intro .subtitle {
    font-size: 1.5rem;
    color: #999;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 3rem;
}

/* Scroll hint */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    color: #ef4444;
    font-size: 1.2rem;
    animation: pulse-hint 2s ease-in-out infinite;
}

.scroll-arrow {
    font-size: 2rem;
    animation: slide-right 1.5s ease-in-out infinite;
}

@keyframes pulse-hint {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slide-right {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

/* Section 2 - Services Map */
/* ============================================
   Scene 2: Interactive Services / About Menu
   ============================================ */

#section-services {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* Scene 2 Container */
.scene2-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* SVG Lines Layer */
.scene2-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.scene2-line {
    stroke: rgba(239, 68, 68, 0.4);
    stroke-width: 2;
    fill: none;
    opacity: 0;
    transition: opacity 0.3s ease, stroke-width 0.3s ease;
}

.scene2-line.visible {
    opacity: 1;
}

.scene2-line.animated {
    stroke: rgba(239, 68, 68, 0.8);
    stroke-width: 3;
    opacity: 1;
}

/* Main Circles (Bottom) */
.main-circle {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    opacity: 0;
}

/* Анімація падіння м'яча */
.main-circle.dropping {
    opacity: 1;
    animation: ballDrop 1.5s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
}

.main-circle.dropped {
    opacity: 1;
}

@keyframes ballDrop {
    0% {
        transform: translate(-50%, -100vh) scale(1);
    }
    60% {
        transform: translate(-50%, 0) scale(1);
    }
    75% {
        transform: translate(-50%, -60px) scale(1.05, 0.95);
    }
    85% {
        transform: translate(-50%, 0) scale(0.95, 1.05);
    }
    92% {
        transform: translate(-50%, -20px) scale(1.02, 0.98);
    }
    96% {
        transform: translate(-50%, 0) scale(0.98, 1.02);
    }
    100% {
        transform: translate(-50%, 0) scale(1);
    }
}

/* Анімація для правого круга (about) */
#main-about.dropping {
    animation: ballDropRight 1.5s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
}

@keyframes ballDropRight {
    0% {
        transform: translate(50%, -100vh) scale(1);
    }
    60% {
        transform: translate(50%, 0) scale(1);
    }
    75% {
        transform: translate(50%, -60px) scale(1.05, 0.95);
    }
    85% {
        transform: translate(50%, 0) scale(0.95, 1.05);
    }
    92% {
        transform: translate(50%, -20px) scale(1.02, 0.98);
    }
    96% {
        transform: translate(50%, 0) scale(0.98, 1.02);
    }
    100% {
        transform: translate(50%, 0) scale(1);
    }
}

.main-circle:hover {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.05);
}

.main-circle.hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* Main Circle Positions (Bottom of screen) */
#main-services {
    bottom: 15%;
    left: 25%;
}

#main-services.dropped {
    transform: translate(-50%, 0);
}

#main-about {
    bottom: 15%;
    right: 25%;
}

#main-about.dropped {
    transform: translate(50%, 0);
}

/* Child Circles */
.child-circle {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 1rem;
    cursor: pointer;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    /* Центруємо круг відносно left/top позиції */
    transform: translate(-50%, -50%) scale(0.3);
}

.child-circle.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.child-circle:hover {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.15);
    transform: translate(-50%, -50%) scale(1.15);
    z-index: 20;
}

.child-circle.expanded {
    width: 240px;
    height: 240px;
    font-size: 0.85rem;
    line-height: 1.4;
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 100;
    overflow-y: auto;
    max-height: 80vh;
}

/* Політики - прямокутна форма з повним контентом */
.child-circle.policy-expanded {
    /* Override базові стилі круга */
    width: 700px !important;
    max-width: 85vw;
    height: auto !important;
    max-height: 75vh;
    min-height: 500px;
    border-radius: 16px !important;
    
    /* Layout */
    display: block !important;
    text-align: left !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    
    /* Spacing - збільшено padding для більшої області hover */
    padding: 40px;
    
    /* Typography */
    font-size: 0.9rem;
    line-height: 1.7;
    
    /* Positioning */
    transform: translate(-50%, -50%) !important;
    z-index: 1000;
    
    /* Overflow - плавніший скрол */
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    
    /* Visual */
    background: rgba(15, 15, 25, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(102, 126, 234, 0.5) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    
    /* Pointer events - утримуємо фокус при скролі */
    pointer-events: auto !important;
}

.child-circle.policy-expanded h2 {
    color: #667eea;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.child-circle.policy-expanded h3 {
    color: #8b9dc3;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.child-circle.policy-expanded p {
    margin: 15px 0;
    color: #d1d5db;
}

.child-circle.policy-expanded ul {
    margin: 15px 0;
    padding-left: 30px;
    color: #d1d5db;
}

.child-circle.policy-expanded li {
    margin: 8px 0;
}

.child-circle.policy-expanded strong {
    color: #fff;
    font-weight: 600;
}

.child-circle.policy-expanded .beta-notice {
    background: #fbbf24;
    color: #78350f;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.child-circle.policy-expanded .policy-meta {
    color: #718096;
    font-style: italic;
    margin-bottom: 20px;
}

.child-circle.policy-expanded .policy-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.child-circle.policy-expanded .policy-warning h2 {
    margin-top: 0;
}

.child-circle.policy-expanded .policy-warning h3 {
    margin-top: 15px;
}

/* Стилі для скролбару в політиках */
.child-circle.policy-expanded::-webkit-scrollbar {
    width: 8px;
}

.child-circle.policy-expanded::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.child-circle.policy-expanded::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

.child-circle.policy-expanded::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.child-circle.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE DESIGN - Media Queries
   ============================================ */

/* Tablets and small laptops (768px - 1024px) */
@media (max-width: 1024px) {
    #section-intro h1 {
        font-size: 3rem;
    }
    
    #section-intro .subtitle {
        font-size: 1.2rem;
    }
    
    .main-circle {
        width: 150px;
        height: 150px;
        font-size: 1rem;
    }
    
    .child-circle {
        width: 120px;
        height: 120px;
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .child-circle.expanded {
        width: 200px;
        height: 200px;
        font-size: 0.75rem;
    }
    
    .child-circle.policy-expanded {
        width: 90vw;
        max-height: 60vh;
        padding: 20px;
        font-size: 0.85rem;
    }
}

/* Mobile devices (max 767px) */
@media (max-width: 767px) {
    #section-intro h1 {
        font-size: 2.5rem;
    }
    
    #section-intro .subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .main-circle {
        width: 120px;
        height: 120px;
        font-size: 0.9rem;
    }
    
    #main-services {
        bottom: 20%;
        left: 30%;
    }
    
    #main-about {
        bottom: 20%;
        right: 30%;
    }
    
    .child-circle {
        width: 100px;
        height: 100px;
        font-size: 0.75rem;
        padding: 0.5rem;
    }
    
    .child-circle.expanded {
        width: 160px;
        height: 160px;
        font-size: 0.7rem;
    }
    
    .child-circle.policy-expanded {
        width: 95vw;
        max-height: 70vh;
        padding: 15px;
        font-size: 0.8rem;
    }
    
    .child-circle.policy-expanded h2 {
        font-size: 1.1rem;
    }
    
    .child-circle.policy-expanded h3 {
        font-size: 1rem;
    }
    
    .login-button {
        width: 45px;
        height: 45px;
    }
    
    .language-switcher {
        top: 1rem;
        right: 1rem;
    }
    
    .lang-btn {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
}

/* Overlay для expanded круга на мобільних */
@media (max-width: 767px) {
    .child-circle.expanded::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        z-index: -1;
    }
    
    .child-circle.expanded {
        background: rgba(20, 20, 30, 0.95) !important;
        backdrop-filter: blur(20px);
        box-shadow: 0 0 40px rgba(239, 68, 68, 0.5);
    }
}

/* Very small mobile (max 480px) */
@media (max-width: 480px) {
    #section-intro h1 {
        font-size: 1.75rem;
    }
    
    #section-intro .subtitle {
        font-size: 0.85rem;
        padding: 0 1.5rem;
    }
    
    .main-circle {
        width: 90px;
        height: 90px;
        font-size: 0.7rem;
        padding: 0.5rem;
    }
    
    #main-services {
        bottom: 20%;
        left: 25%;
    }
    
    #main-about {
        bottom: 20%;
        right: 25%;
    }
    
    .child-circle {
        width: 80px;
        height: 80px;
        font-size: 0.6rem;
        padding: 0.3rem;
        line-height: 1.2;
    }
    
    .child-circle.expanded {
        width: 160px;
        height: 160px;
        font-size: 0.7rem;
        padding: 0.6rem;
        line-height: 1.3;
        /* Фіксуємо позицію в центрі екрану */
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) scale(1) !important;
        z-index: 200;
        max-width: 90vw;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* Touch-friendly improvements */
    .main-circle,
    .child-circle {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

/* Extra small devices (max 375px) */
@media (max-width: 375px) {
    #section-intro h1 {
        font-size: 1.5rem;
    }
    
    #section-intro .subtitle {
        font-size: 0.75rem;
    }
    
    .main-circle {
        width: 80px;
        height: 80px;
        font-size: 0.65rem;
    }
    
    .child-circle {
        width: 70px;
        height: 70px;
        font-size: 0.55rem;
        padding: 0.25rem;
        line-height: 1.15;
    }
    
    .child-circle.expanded {
        width: 140px;
        height: 140px;
        font-size: 0.65rem;
        padding: 0.5rem;
        line-height: 1.25;
        /* Центруємо в viewport */
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) scale(1) !important;
        z-index: 200;
        max-width: 85vw;
        max-height: 70vh;
        overflow-y: auto;
    }
    
    #main-services {
        bottom: 15%;
        left: 20%;
    }
    
    #main-about {
        bottom: 15%;
        right: 20%;
    }
}

/* 
.services-map {
    position: relative;
    width: 100%;
    height: 70vh;
}

/* SVG Lines */
.services-map svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.service-line {
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 2.5;
    fill: none;
    transition: all 0.4s ease;
    opacity: 0;
}

.service-line.visible {
    opacity: 1;
}

/* Active line on hover */
.service-line.active {
    stroke: rgba(239, 68, 68, 0.5);
    stroke-width: 3.5;
    opacity: 1;
}

/* Heartbeat animation for expanded service */
.service-line.heartbeat {
    stroke: rgba(239, 68, 68, 0.8);
    stroke-width: 4;
    opacity: 1;
    animation: line-heartbeat 1.2s ease-in-out infinite;
}

@keyframes line-heartbeat {
    0%, 100% {
        stroke-width: 3;
        opacity: 0.8;
    }
    25% {
        stroke-width: 5;
        opacity: 1;
    }
    50% {
        stroke-width: 3.5;
        opacity: 0.9;
    }
    75% {
        stroke-width: 4.5;
        opacity: 1;
    }
}

/* Dim other lines when one is active */
.services-map.has-active .service-line:not(.active) {
    opacity: 0.3;
}

/* Hide lines when service expanded */
.services-map.service-expanded .service-line:not(.heartbeat) {
    opacity: 0.1;
}

/* Central Circle - "Наші послуги" - Ball physics (starts from top, falls down) */
.central-circle {
    position: absolute;
    left: 30%;
    top: -10%; /* Start above screen */
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    cursor: pointer;
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.2) 0%, 
        rgba(147, 51, 234, 0.15) 50%,
        rgba(20, 20, 30, 0.4) 100%);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    z-index: 100;
    box-shadow: 
        0 12px 48px 0 rgba(239, 68, 68, 0.4),
        0 0 0 1px rgba(239, 68, 68, 0.2),
        inset 0 2px 0 0 rgba(255, 255, 255, 0.15);
    /* Physics will be handled by JS */
    transition: none; /* Remove transition for physics */
}

/* Stopped state - when services are shown */
.central-circle.stopped {
    /* Position will be set by physics engine */
}

/* Gradient glow effect */
.central-circle::after {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(239, 68, 68, 0.3) 0%, 
        transparent 70%);
    z-index: -1;
    animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Planetary orbit animations - random movement across screen */
/* Ball squish effect on bounce */
@keyframes ball-squish {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1, 1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15, 0.85);
    }
}

/* ============================================
   ⚠️ ЗАКОМЕНТОВАНО: Service Circles CSS
   ============================================
   Видалено кругове меню для послуг
   ============================================ */

/*
.service-circle {
    position: absolute;
    width: 160px;
    height: 160px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.3);
    transition: opacity 0.6s, visibility 0.6s, transform 0.6s;
    background: linear-gradient(135deg, 
        rgba(30, 30, 40, 0.7) 0%, 
        rgba(20, 20, 30, 0.5) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    cursor: pointer;
    z-index: 50;
    font-size: 0.95rem;
    line-height: 1.3;
    color: #fff;
    overflow: hidden;
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

.service-circle::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.5) 0%, 
        rgba(147, 51, 234, 0.3) 50%,
        rgba(59, 130, 246, 0.5) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.service-circle:hover:not(.expanded) {
    transform: translateY(-8px) scale(1.05);
    border-color: rgba(239, 68, 68, 0.6);
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.15) 0%, 
        rgba(147, 51, 234, 0.1) 100%);
    box-shadow: 
        0 12px 48px 0 rgba(239, 68, 68, 0.3),
        0 0 0 1px rgba(239, 68, 68, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
}

.service-circle:hover::before {
    opacity: 1;
}

.service-details-rect {
    position: absolute;
    width: 400px;
    min-height: 250px;
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.25) 0%, 
        rgba(147, 51, 234, 0.2) 100%);
    backdrop-filter: blur(30px) saturate(200%);
    border: 2px solid rgba(239, 68, 68, 0.6);
    border-radius: 24px;
    padding: 2rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.6),
               0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.service-details-rect.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

.service-details-rect h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-align: left;
}

.service-details-rect .price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 1.5rem;
    text-align: left;
}

.service-details-rect .description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    margin-bottom: 1.5rem;
}

.service-details-rect .order-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8), rgba(147, 51, 234, 0.8));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-details-rect .order-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
}

.service-circle-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    display: block;
}

.service-circle.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.service-circle:nth-child(1) { transition-delay: 0.1s; }
.service-circle:nth-child(2) { transition-delay: 0.2s; }
.service-circle:nth-child(3) { transition-delay: 0.3s; }
.service-circle:nth-child(4) { transition-delay: 0.4s; }
.service-circle:nth-child(5) { transition-delay: 0.5s; }
.service-circle:nth-child(6) { transition-delay: 0.6s; }

.service-circle.visible:nth-child(1) { animation: float-1 3.5s ease-in-out infinite; }
.service-circle.visible:nth-child(2) { animation: float-2 4s ease-in-out infinite; }
.service-circle.visible:nth-child(3) { animation: float-3 3.8s ease-in-out infinite; }
.service-circle.visible:nth-child(4) { animation: float-4 4.2s ease-in-out infinite; }
.service-circle.visible:nth-child(5) { animation: float-5 3.6s ease-in-out infinite; }
.service-circle.visible:nth-child(6) { animation: float-6 4.1s ease-in-out infinite; }

@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-8px, 12px) scale(1.03); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, -10px) scale(1.02); }
}

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-12px, 8px) scale(1.04); }
}

@keyframes float-4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(8px, 10px) scale(1.02); }
}

@keyframes float-5 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10px, -8px) scale(1.03); }
}

@keyframes float-6 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12px, -12px) scale(1.02); }
}

.service-circle.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}
*/

/* About Circle - "Про нас" with planetary motion */
.about-circle {
    position: absolute;
    left: 70%;
    top: -10%; /* Start above screen */
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    cursor: pointer;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.2) 0%, 
        rgba(147, 51, 234, 0.15) 50%,
        rgba(20, 20, 30, 0.4) 100%);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    z-index: 100;
    box-shadow: 
        0 12px 48px 0 rgba(59, 130, 246, 0.4),
        0 0 0 1px rgba(59, 130, 246, 0.2),
        inset 0 2px 0 0 rgba(255, 255, 255, 0.15);
    /* Physics will be handled by JS */
    transition: none;
}

.about-circle:hover {
    transform: translate(-50%, -50%) scale(1.05);
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 
        0 12px 60px 0 rgba(59, 130, 246, 0.6),
        0 0 0 1px rgba(59, 130, 246, 0.4),
        inset 0 2px 0 0 rgba(255, 255, 255, 0.25);
}

/* Stopped state - when about subcircles are shown */
.about-circle.stopped {
    /* Position will be set by physics engine */
}

/* About Subcircles */
.about-subcircle {
    position: absolute;
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15) 0%, 
        rgba(20, 20, 30, 0.5) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.3);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

.about-subcircle.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.about-subcircle:hover {
    transform: scale(1.1);
    border-color: rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.25) 0%, 
        rgba(20, 20, 30, 0.6) 100%);
}

/* Transition delays only - positions controlled by JavaScript */
.about-subcircle[data-type="who"] {
    transition-delay: 0.1s;
}

.about-subcircle[data-type="contact"] {
    transition-delay: 0.2s;
}

.about-subcircle[data-type="privacy"] {
    transition-delay: 0.3s;
}

/* Floating animations for about subcircles */
.about-subcircle.visible[data-type="who"] { animation: float-about-1 3.8s ease-in-out infinite; }
.about-subcircle.visible[data-type="contact"] { animation: float-about-2 4.2s ease-in-out infinite; }
.about-subcircle.visible[data-type="privacy"] { animation: float-about-3 3.6s ease-in-out infinite; }

@keyframes float-about-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-15px, -10px) scale(1.02); }
    50% { transform: translate(-20px, 10px) scale(1); }
    75% { transform: translate(-10px, -5px) scale(0.98); }
}

@keyframes float-about-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(10px, -15px) scale(1.02); }
    50% { transform: translate(15px, -25px) scale(1); }
    75% { transform: translate(5px, -10px) scale(0.98); }
}

@keyframes float-about-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-10px, 15px) scale(1.02); }
    50% { transform: translate(-15px, 20px) scale(1); }
    75% { transform: translate(-5px, 10px) scale(0.98); }
}

/* Hide about elements when service is expanded */
.about-circle.hidden,
.about-subcircle.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

/* Removed back button and close buttons - using hover logic instead */

*/

/* Service Detail Modal */
.service-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-box {
    position: relative;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    z-index: 1;
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.modal-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 1.5rem;
}

.modal-box p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.btn-order {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: #ef4444;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-order:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-cancel {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    border-color: #999;
}

.login-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    width: 64px;
    height: 64px;
    background: transparent;
    border: 2px solid #ef4444;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease, animation-duration 0.3s ease;
    animation: heartbeat 1.5s ease-in-out infinite;
    z-index: 999999 !important;
    pointer-events: auto !important;
}

/* СТАН 1: НЕ ЗАЛОГІНЕНИЙ - червоний замок з пульсацією */
.login-button.locked {
    border-color: #ef4444;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.login-button.locked:hover {
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.login-button.locked .lock-icon {
    display: block;
}

.login-button.locked .user-initials {
    display: none;
}

/* СТАН 2: ЗАЛОГІНЕНИЙ - зелений квадрат з ініціалами */
.login-button.logged-in {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    animation: none;
}

.login-button.logged-in:hover {
    background: rgba(34, 197, 94, 0.2);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.login-button.logged-in .lock-icon {
    display: none;
}

.login-button.logged-in .user-initials {
    display: block;
}

/* Іконка замка */
.lock-icon {
    width: 32px;
    height: 32px;
    display: block;
}

/* Ініціали користувача */
.user-initials {
    display: none;
    font-size: 20px;
    font-weight: 700;
    color: #22c55e;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.05); }
    28% { transform: scale(1); }
    42% { transform: scale(1.05); }
    70%, 100% { transform: scale(1); }
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    10% { opacity: 0.9; transform: scale(1.05); }
    20% { opacity: 1; transform: scale(1); }
    30% { opacity: 0.9; transform: scale(1.05); }
    40%, 100% { opacity: 1; transform: scale(1); }
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 2rem;
    left: 7rem; /* 2rem + 64px (login button width) + 1rem gap */
    display: flex;
    gap: 0.5rem;
    z-index: 100;
}

.lang-btn {
    width: 48px;
    height: 48px;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.lang-btn:hover {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.lang-btn.active {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.2);
    color: #fff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

}




/* Positioning for 5 service nodes - VERTICAL RIGHT COLUMN (FIXED) */












/* Service Detail Modal */
.service-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-box {
    position: relative;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    z-index: 1;
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.modal-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 1.5rem;
}

.modal-box p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.btn-cancel {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    border-color: #999;
}

/* Login Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(20, 20, 20, 0.95);
    margin: 8% auto;
    padding: 2rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* Scrollbar styling */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(239, 68, 68, 0.5);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(239, 68, 68, 0.7);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #fff;
}

.modal h2 {
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Compact spacing for registration form (more fields) */
#registerForm .form-group {
    margin-bottom: 1rem;
}

#registerForm h2 {
    margin-bottom: 1.25rem !important;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #999;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #ef4444;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background: #ef4444;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.error-message {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    display: none; /* Hidden by default */
    animation: slideDown 0.3s ease;
}

.error-message:not(:empty) {
    display: block; /* Show when has content */
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Divider для OAuth */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #666;
    font-size: 0.9rem;
}

#registerForm .auth-divider {
    margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 1rem;
}

/* Google OAuth кнопка */
.google-auth-button {
    width: 100%;
    padding: 0.875rem;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    color: #3c4043;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: 'Google Sans', 'Roboto', sans-serif;
}

.google-auth-button:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.google-auth-button img {
    width: 20px;
    height: 20px;
}

.auth-tab {
    font-size: 1rem;
    font-weight: 500;
}

.auth-tab:hover {
    color: #ccc;
}

.auth-tab.active {
    color: #fff;
    border-bottom-color: #ef4444 !important;
}

.success-message {
    color: #10b981;
    margin-top: 1rem;
    text-align: center;
}

/* ========================================
   SUCCESS TOAST NOTIFICATION
   ======================================== */

.auth-success-toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.95) 0%, 
        rgba(5, 150, 105, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(16, 185, 129, 0.5);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    min-width: 320px;
    max-width: 420px;
    box-shadow: 
        0 12px 40px rgba(16, 185, 129, 0.3),
        0 0 0 1px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-success-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: toast-icon-pulse 2s ease-in-out infinite;
}

@keyframes toast-icon-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

.toast-icon svg {
    display: block;
}

.toast-icon circle,
.toast-icon path {
    stroke: #fff;
}

.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.toast-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
}

/* Toast responsive */
@media (max-width: 768px) {
    .auth-success-toast {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
        max-width: none;
        padding: 1rem 1.25rem;
    }
    
    .toast-title {
        font-size: 1rem;
    }
    
    .toast-message {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .auth-success-toast {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .toast-icon {
        width: 28px;
        height: 28px;
    }
    
    .toast-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .toast-title {
        font-size: 0.95rem;
    }
    
    .toast-message {
        font-size: 0.85rem;
    }
}

/* ========================================
   RESPONSIVE: DESKTOP & MOBILE ADAPTATION (AUTH MODAL)
   ======================================== */

/* ============================================
   DESKTOP SCREENS - Детальна адаптація
   ============================================ */

/* Extra Large Desktop (2560px+) - 4K Monitors */
@media (min-width: 2560px) {
    .modal-content {
        margin: 10% auto;
        padding: 3rem 3.5rem;
        width: 85%;
        max-width: 600px;
        max-height: 80vh;
    }
    
    .modal h2 {
        font-size: 2.25rem;
        margin-bottom: 2rem;
    }
    
    .form-group {
        margin-bottom: 1.75rem;
    }
    
    .form-group label {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .form-group input {
        padding: 1rem;
        font-size: 1.15rem;
        border-radius: 10px;
    }
    
    .submit-button,
    .google-auth-button {
        padding: 1.25rem;
        font-size: 1.15rem;
        border-radius: 10px;
    }
    
    .close {
        font-size: 32px;
    }
    
    /* Оптимізація для реєстрації на 4K */
    #registerForm .form-group {
        margin-bottom: 1.4rem;
    }
    
    #registerForm h2 {
        margin-bottom: 1.75rem !important;
    }
}

/* Large Desktop (1920px - 2559px) - Full HD */
@media (min-width: 1920px) and (max-width: 2559px) {
    .modal-content {
        margin: 8% auto;
        padding: 2.5rem 3rem;
        width: 88%;
        max-width: 540px;
        max-height: 84vh;
    }
    
    .modal h2 {
        font-size: 2rem;
        margin-bottom: 1.75rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group label {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .form-group input {
        padding: 0.95rem;
        font-size: 1.1rem;
    }
    
    .submit-button,
    .google-auth-button {
        padding: 1.15rem;
        font-size: 1.1rem;
    }
    
    /* Оптимізація для реєстрації на Full HD */
    #registerForm .form-group {
        margin-bottom: 1.2rem;
    }
    
    #registerForm h2 {
        margin-bottom: 1.5rem !important;
    }
}

/* Standard Desktop (1440px - 1919px) - Large Laptop */
@media (min-width: 1440px) and (max-width: 1919px) {
    .modal-content {
        margin: 7% auto;
        padding: 2.25rem 2.75rem;
        width: 90%;
        max-width: 500px;
        max-height: 86vh;
    }
    
    .modal h2 {
        font-size: 1.9rem;
        margin-bottom: 1.65rem;
    }
    
    .form-group {
        margin-bottom: 1.4rem;
    }
    
    .form-group label {
        font-size: 0.98rem;
    }
    
    .form-group input {
        padding: 0.9rem;
        font-size: 1.05rem;
    }
    
    .submit-button,
    .google-auth-button {
        padding: 1.1rem;
        font-size: 1.05rem;
    }
    
    /* Оптимізація для реєстрації на великих ноутбуках */
    #registerForm .form-group {
        margin-bottom: 1.1rem;
    }
    
    #registerForm h2 {
        margin-bottom: 1.4rem !important;
    }
}

/* Medium Desktop (1280px - 1439px) - Standard Laptop */
@media (min-width: 1280px) and (max-width: 1439px) {
    .modal-content {
        margin: 6.5% auto;
        padding: 2.15rem 2.5rem;
        width: 90%;
        max-width: 480px;
        max-height: 87vh;
    }
    
    .modal h2 {
        font-size: 1.85rem;
        margin-bottom: 1.6rem;
    }
    
    .form-group {
        margin-bottom: 1.35rem;
    }
    
    .form-group input {
        padding: 0.85rem;
        font-size: 1.02rem;
    }
    
    .submit-button,
    .google-auth-button {
        padding: 1.05rem;
        font-size: 1.02rem;
    }
    
    /* Оптимізація для реєстрації на стандартних ноутбуках */
    #registerForm .form-group {
        margin-bottom: 1rem;
    }
    
    #registerForm h2 {
        margin-bottom: 1.35rem !important;
    }
}

/* Small Desktop (1025px - 1279px) - Small Laptop */
@media (min-width: 1025px) and (max-width: 1279px) {
    .modal-content {
        margin: 6% auto;
        padding: 2rem 2.25rem;
        width: 91%;
        max-width: 460px;
        max-height: 88vh;
    }
    
    .modal h2 {
        font-size: 1.8rem;
        margin-bottom: 1.55rem;
    }
    
    .form-group {
        margin-bottom: 1.3rem;
    }
    
    .form-group input {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .submit-button,
    .google-auth-button {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Компактніші відступи для форми реєстрації */
    #registerForm .form-group {
        margin-bottom: 0.95rem;
    }
    
    #registerForm h2 {
        margin-bottom: 1.3rem !important;
    }
    
    #registerForm .auth-divider {
        margin: 1.2rem 0;
    }
}

/* ============================================
   TABLET & MOBILE SCREENS
   ============================================ */

/* Tablets and medium screens */
@media (max-width: 1024px) {
    .modal-content {
        margin: 6% auto;
        padding: 2rem;
        width: 92%;
        max-width: 480px;
        max-height: 92vh;
    }
    
    #registerForm .form-group {
        margin-bottom: 0.875rem;
    }
}

@media (max-width: 768px) {
    .modal-content {
        margin: 5% auto;
        padding: 1.75rem 1.5rem;
        width: 95%;
        max-width: 100%;
        max-height: 94vh;
    }
    
    .modal h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    #registerForm .form-group {
        margin-bottom: 0.75rem;
    }
    
    #registerForm h2 {
        margin-bottom: 1rem !important;
    }
    
    .form-group input {
        padding: 0.875rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-button {
        padding: 0.875rem;
        font-size: 1rem;
    }
    
    .google-auth-button {
        padding: 0.875rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .google-auth-button img {
        width: 18px;
        height: 18px;
    }
    
    .close {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 2% auto;
        padding: 1.5rem 1rem;
        width: 96%;
        max-height: 96vh;
        border-radius: 12px;
    }
    
    .modal h2 {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    #registerForm .form-group {
        margin-bottom: 0.625rem;
    }
    
    #registerForm h2 {
        margin-bottom: 0.875rem !important;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    #registerForm .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .form-group input {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-button {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .google-auth-button {
        padding: 0.75rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .google-auth-button img {
        width: 16px;
        height: 16px;
    }
    
    .auth-divider {
        margin: 1.25rem 0;
        font-size: 0.85rem;
    }
    
    .auth-divider span {
        padding: 0 0.75rem;
    }
    
    .close {
        font-size: 22px;
    }
    
    .auth-tab {
        font-size: 0.9rem;
    }
}

@media (max-width: 375px) {
    .modal-content {
        margin: 1% auto;
        padding: 1.25rem 0.875rem;
        width: 98%;
        max-height: 98vh;
    }
    
    .modal h2 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
    
    #registerForm .form-group {
        margin-bottom: 0.5rem;
    }
    
    #registerForm h2 {
        margin-bottom: 0.75rem !important;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.35rem;
    }
    
    #registerForm .form-group label {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    .form-group input {
        padding: 0.625rem;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 6px;
    }
    
    #registerForm .form-group input {
        padding: 0.5rem;
    }
    
    .submit-button {
        padding: 0.625rem;
        font-size: 0.9rem;
        border-radius: 6px;
    }
    
    .google-auth-button {
        padding: 0.625rem;
        font-size: 0.8rem;
        gap: 0.4rem;
        border-radius: 6px;
    }
    
    .google-auth-button img {
        width: 14px;
        height: 14px;
    }
    
    .auth-divider {
        margin: 1rem 0;
        font-size: 0.8rem;
    }
    
    .auth-divider span {
        padding: 0 0.5rem;
    }
    
    .close {
        font-size: 20px;
        line-height: 18px;
    }
    
    .auth-tab {
        font-size: 0.85rem;
    }
    
    .error-message,
    .success-message {
        font-size: 0.85rem;
    }
}

/* Landscape mode for phones */
@media (max-width: 767px) and (orientation: landscape) {
    .modal-content {
        margin: 2% auto;
        padding: 1.5rem 2rem;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .modal h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
    
    .form-group input {
        padding: 0.625rem;
    }
    
    .submit-button {
        padding: 0.625rem;
    }
    
    .google-auth-button {
        padding: 0.625rem;
    }
}

/* ============================================
   HEIGHT-BASED ADAPTATIONS (Desktop vertical space)
   Адаптація для екранів з малою висотою
   ============================================ */

/* Desktop with limited vertical space (900px - 1080px height) */
@media (min-width: 1025px) and (min-height: 900px) and (max-height: 1080px) {
    .modal-content {
        margin: 5% auto;
        padding: 1.85rem 2.25rem;
        max-height: 90vh;
    }
    
    .modal h2 {
        font-size: 1.7rem;
        margin-bottom: 1.4rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    #registerForm .form-group {
        margin-bottom: 0.85rem;
    }
    
    #registerForm h2 {
        margin-bottom: 1.2rem !important;
    }
}

/* Desktop with very limited vertical space (<900px height) */
@media (min-width: 1025px) and (max-height: 899px) {
    .modal-content {
        margin: 3% auto;
        padding: 1.5rem 2rem;
        max-height: 94vh;
    }
    
    .modal h2 {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        margin-bottom: 0.4rem;
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 0.7rem;
    }
    
    .submit-button,
    .google-auth-button {
        padding: 0.85rem;
        font-size: 0.95rem;
    }
    
    #registerForm .form-group {
        margin-bottom: 0.7rem;
    }
    
    #registerForm h2 {
        margin-bottom: 1rem !important;
    }
    
    .auth-divider {
        margin: 1.2rem 0;
    }
}

/* Desktop with extremely limited vertical space (<768px height) */
@media (min-width: 1025px) and (max-height: 767px) {
    .modal-content {
        margin: 2% auto;
        padding: 1.25rem 1.75rem;
        max-height: 96vh;
    }
    
    .modal h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .form-group {
        margin-bottom: 0.85rem;
    }
    
    .form-group label {
        margin-bottom: 0.35rem;
        font-size: 0.85rem;
    }
    
    .form-group input {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
    
    .submit-button,
    .google-auth-button {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
    
    #registerForm .form-group {
        margin-bottom: 0.6rem;
    }
    
    #registerForm h2 {
        margin-bottom: 0.85rem !important;
    }
    
    .auth-divider {
        margin: 1rem 0;
        font-size: 0.85rem;
    }
    
    .close {
        font-size: 24px;
    }
}
