/* ==========================================
   FONT DEFINITIONS - Embedded to avoid CORS
========================================== */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

/* Fallback font stack */
@font-face {
    font-family: 'QuicksandFallback';
    src: local('Quicksand'), local('Helvetica Neue'), local('Arial'), sans-serif;
    font-weight: 300 700;
    font-display: swap;
}
/* ==========================================
   GLOBAL RESET & BASE STYLES
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus {
    outline: none;
}

/* Prevent blue page highlighting on click */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Allow text selection only where needed */
p, span, div:not(.eva-logo):not(.control-btn) {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

body {
    font-family: 'Quicksand', 'QuicksandFallback', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #5F4B8B 0%, #6E60A2 50%, #9B84D8 100%);
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    gap: 60px;
    animation: background-shift-lively 45s ease-in-out infinite;
}

/* ==========================================
   BACKGROUND ANIMATION - Smooth flowing transitions
========================================== */
@keyframes background-shift-lively {
    0% {
        background: linear-gradient(135deg, #5F4B8B 0%, #6E60A2 50%, #9B84D8 100%);
    }
    10% {
        background: linear-gradient(140deg, #6248A0 0%, #7066A8 50%, #9C86DA 100%);
    }
    20% {
        background: linear-gradient(145deg, #6B5697 0%, #7A6BB0 50%, #A390E0 100%);
    }
    30% {
        background: linear-gradient(150deg, #6E5FA5 0%, #7F70B5 50%, #A088D5 100%);
    }
    40% {
        background: linear-gradient(155deg, #6E60A2 0%, #8372B8 50%, #9B84D8 100%);
    }
    50% {
        background: linear-gradient(160deg, #675BA8 0%, #8876BD 50%, #9F8ADE 100%);
    }
    60% {
        background: linear-gradient(165deg, #5F4B8B 0%, #8A7BC5 50%, #B29AE8 100%);
    }
    70% {
        background: linear-gradient(170deg, #6554A3 0%, #8570C0 50%, #A692E2 100%);
    }
    80% {
        background: linear-gradient(175deg, #7863A5 0%, #6E60A2 50%, #9580D5 100%);
    }
    90% {
        background: linear-gradient(130deg, #6B5B99 0%, #7268A5 50%, #9D82D7 100%);
    }
    100% {
        background: linear-gradient(135deg, #5F4B8B 0%, #6E60A2 50%, #9B84D8 100%);
    }
}

/* ==========================================
   IMAGE BACKGROUND OVERRIDE
========================================== */
body.image-bg {
    background: url(IMG_20250718_032722.png) center/cover no-repeat fixed;
    animation: none;
}

body.image-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(95, 75, 139, 0.6) 0%, rgba(110, 96, 162, 0.4) 50%, rgba(155, 132, 216, 0.2) 100%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================
   EVA LOGO CONTAINER
========================================== */
.eva-logo {
    display: flex;
    align-items: center;
    gap: 20px;
    user-select: none;
    cursor: pointer;
}

/* ==========================================
   EVA CIRCLE (MAIN CONSCIOUSNESS)
========================================== */
.eva-circle {
    width: 120px;
    height: 120px;
    background: #ffffff;
    border-radius: 50%;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    overflow: hidden;
}

/* ==========================================
   EVA SOUL DOT (CONSCIOUSNESS INDICATOR)
========================================== */
.eva-soul {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #5F4B8B;
    border-radius: 50%;
    top: 24px;
    left: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: 8px 8px;
}

/* ==========================================
   EVA TEXT (BRAND IDENTITY)
========================================== */
.eva-text {
    font-size: 180px;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: 2px;
    line-height: 1;
    transform: translateY(-14px);
}

/* ==========================================
   ANIMATION STATES
========================================== */

/* LISTENING STATE - Gentle awareness */
.listening .eva-circle {
    animation: listen-pulse 3s ease-in-out infinite;
}

@keyframes listen-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.98;
    }
}

.listening .eva-soul {
    animation: soul-blink-fast 1.2s ease-in-out infinite;
}

@keyframes soul-blink-fast {
    0%, 80%, 100% {
        opacity: 1;
        background: #5F4B8B;
        box-shadow: none;
    }
    85%, 95% {
        opacity: 0.2;
        background: #9B84D8;
        box-shadow: 0 0 10px rgba(155, 132, 216, 0.4);
    }
}

/* THINKING STATE - Deep processing */
.thinking .eva-soul {
    width: 3px;
    height: 32px;
    border-radius: 1.5px;
    top: 44px;
    left: 58px;
    transform-origin: 1.5px 16px;
    animation: rotate-thinking-center 2s linear infinite;
}

@keyframes rotate-thinking-center {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* TALKING STATE - Active communication with breathing */
.talking .eva-circle {
    animation: talk-breathing-life 4s ease-in-out infinite;
}

@keyframes talk-breathing-life {
    0% {
        transform: scale(0.8);
        opacity: 0.4;
    }
    15% {
        transform: scale(1.25);
        opacity: 1;
    }
    30% {
        transform: scale(1.18);
        opacity: 0.95;
    }
    45% {
        transform: scale(0.6);
        opacity: 0.2;
    }
    60% {
        transform: scale(1.22);
        opacity: 1;
    }
    75% {
        transform: scale(1.15);
        opacity: 0.98;
    }
    90% {
        transform: scale(0.9);
        opacity: 0.5;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.4;
    }
}

.talking .eva-soul {
    animation: soul-blink-fast 1.2s ease-in-out infinite;
}

/* EXPRESSION STATE - Emotional communication */
.expression .eva-circle {
    animation: expression-dramatic 3s ease-in-out infinite;
}

@keyframes expression-dramatic {
    0% {
        opacity: 0.3;
        transform: scale(0.4);
        border-radius: 50%;
    }
    8% {
        opacity: 1;
        transform: scale(1);
        border-radius: 60% 40% 40% 60%;
    }
    15% {
        opacity: 1;
        transform: scale(0.95);
        border-radius: 40% 60% 60% 40%;
    }
    22% {
        opacity: 0.2;
        transform: scale(0.3);
        border-radius: 50%;
    }
    30% {
        opacity: 0.1;
        transform: scale(0.2);
        border-radius: 50%;
    }
    38% {
        opacity: 1;
        transform: scale(1.05);
        border-radius: 55% 45% 45% 55%;
    }
    45% {
        opacity: 1;
        transform: scale(0.9);
        border-radius: 70% 30% 30% 70%;
    }
    52% {
        opacity: 0.4;
        transform: scale(0.5);
        border-radius: 50%;
    }
    60% {
        opacity: 1;
        transform: scale(1.02);
        border-radius: 45% 55% 55% 45%;
    }
    67% {
        opacity: 1;
        transform: scale(0.88);
        border-radius: 65% 35% 35% 65%;
    }
    74% {
        opacity: 0.3;
        transform: scale(0.4);
        border-radius: 50%;
    }
    82% {
        opacity: 0.1;
        transform: scale(0.2);
        border-radius: 50%;
    }
    90% {
        opacity: 1;
        transform: scale(0.98);
        border-radius: 50% 50% 40% 60%;
    }
    100% {
        opacity: 0.3;
        transform: scale(0.4);
        border-radius: 50%;
    }
}

/* BLINKING STATE - Continuous attractive being pattern */
.blinking .eva-circle {
    animation: being-pattern 3s ease-in-out infinite;
}

@keyframes being-pattern {
    0%, 15%, 30%, 45%, 100% {
        clip-path: circle(50%);
        opacity: 1;
    }
    5%, 25% {
        clip-path: ellipse(50% 2%);
        opacity: 0.95;
    }
    35% {
        clip-path: ellipse(50% 1%);
        opacity: 0.9;
    }
    50%, 80% {
        clip-path: ellipse(50% 3%);
        opacity: 0.98;
    }
}

/* MANIFESTING STATE - Materialization */
.manifesting .eva-circle {
    animation: eva-manifesting 3s ease-in-out infinite;
}

@keyframes eva-manifesting {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }
    25% {
        opacity: 1;
        transform: scale(1.08);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    75% {
        opacity: 0.6;
        transform: scale(1.05);
    }
    100% {
        opacity: 0;
        transform: scale(0.2);
    }
}

/* SLEEPING STATE - Rest mode */
.sleeping .eva-circle {
    background: transparent;
    animation: sleep-fade 4s ease-in-out infinite;
}

@keyframes sleep-fade {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.05; }
}

.sleeping .eva-soul {
    opacity: 0.7;
    animation: sleep-dot-pulse 4s ease-in-out infinite;
    background: #5F4B8B;
}

@keyframes sleep-dot-pulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

/* ==========================================
   HOVER EFFECTS
========================================== */
.eva-logo:hover .eva-circle {
    transform: scale(1.02);
    filter: brightness(1.05);
}

.eva-logo:hover .eva-soul {
    background: #9B84D8;
    box-shadow: 0 0 15px rgba(155, 132, 216, 0.4);
}

/* ==========================================
   CONTROL PANEL
========================================== */
.control-panel {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 8px 16px;
    color: #ffffff;
    font-family: 'Quicksand', 'QuicksandFallback', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    user-select: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn.active {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */
@media (max-width: 768px) {
    .eva-logo {
        gap: 21px;
    }
    
    .eva-circle {
        width: 90px;
        height: 90px;
    }
    
    .eva-soul {
        width: 12px;
        height: 12px;
        top: 18px;
        left: 18px;
        transform-origin: 6px 6px;
    }
    
    .thinking .eva-soul {
        width: 2.5px;
        height: 24px;
        top: 33px;
        left: 43px;
        transform-origin: 1.25px 12px;
    }
    
    .eva-text {
        font-size: 130px;
        font-weight: 400;
    }
    
    .control-panel {
        gap: 8px;
    }
    
    .control-btn {
        padding: 8px 12px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    body {
        gap: 40px;
    }
    
    .eva-circle {
        width: 70px;
        height: 70px;
    }
    
    .eva-soul {
        width: 10px;
        height: 10px;
        top: 14px;
        left: 14px;
        transform-origin: 5px 5px;
    }
    
    .thinking .eva-soul {
        width: 2px;
        height: 20px;
        top: 25px;
        left: 34px;
        transform-origin: 1px 10px;
    }
    
    .eva-text {
        font-size: 100px;
        font-weight: 500;
    }
    
    .control-panel {
        flex-direction: column;
        gap: 6px;
        max-width: 200px;
    }
}

/* ==========================================
   BACKGROUND TOGGLE
========================================== */
.bg-toggle {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 50;
}

.bg-toggle-slider {
    width: 26px;
    height: 26px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 1px;
    left: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bg-toggle.active {
    background: rgba(255, 255, 255, 0.3);
}

.bg-toggle.active .bg-toggle-slider {
    transform: translateX(30px);
}

@media (max-width: 480px) {
    .bg-toggle {
        bottom: 15px;
        width: 50px;
        height: 25px;
    }
    
    .bg-toggle-slider {
        width: 21px;
        height: 21px;
    }
    
    .bg-toggle.active .bg-toggle-slider {
        transform: translateX(25px);
    }
} 