/* ================================================================
   HOME BASE CSS - Professional Design System
   Using Golden Ratio (1.618) & 8px Modular Grid
   ================================================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Main Container - Centered (no circles) */
.home-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    padding-bottom: 16vh; /* Push content up without breaking background */
}

/* ================================================================
   AURORA EFFECT (Only visible in gradient theme)
   ================================================================ */
.aurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    display: none;
}

.aurora-wave {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    animation: auroraFloat 15s ease-in-out infinite;
}

.aurora-wave:nth-child(1) {
    animation-delay: 0s;
    transform: rotate(0deg);
}

.aurora-wave:nth-child(2) {
    animation-delay: -5s;
    transform: rotate(60deg);
}

.aurora-wave:nth-child(3) {
    animation-delay: -10s;
    transform: rotate(120deg);
}

@keyframes auroraFloat {
    0%, 100% {
        transform: rotate(0deg) scale(1) translateY(0);
        opacity: 0.5;
    }
    25% {
        transform: rotate(5deg) scale(1.1) translateY(-3%);
        opacity: 0.8;
    }
    50% {
        transform: rotate(0deg) scale(1.05) translateY(-5%);
        opacity: 0.6;
    }
    75% {
        transform: rotate(-5deg) scale(1.15) translateY(-2%);
        opacity: 0.9;
    }
}

/* Floating orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 250px;
    height: 250px;
    top: 60%;
    right: 15%;
    animation-delay: -7s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.2;
    }
    33% {
        transform: translate(30px, -40px) scale(1.1);
        opacity: 0.35;
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
        opacity: 0.25;
    }
}

/* ================================================================
   MAIN LOGO - Hero with Golden Ratio + Classic Typewriter
   ================================================================ */
.main-logo {
    font-family: 'Brush Script MT', cursive;
    font-size: clamp(2.5rem, 7vw, 4rem); /* Smaller - more elegant */
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    z-index: 10;
    position: relative;
    font-weight: 400;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    /* Classic typewriter - left to right */
    clip-path: inset(0 100% 0 0);
    animation: typewriter 1.2s ease-out 0.2s forwards;
}

@keyframes typewriter {
    0% {
        clip-path: inset(0 100% 0 0);
    }
    100% {
        clip-path: inset(0 0% 0 0);
    }
}

/* ================================================================
   PROMPT INPUT
   ================================================================ */
.prompt-container {
    width: 90%;
    max-width: 600px; /* Smaller - more refined */
    margin-bottom: 40px;
    z-index: 10;
    position: relative;
}

.prompt-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 0.35rem 0.75rem 0.35rem 1rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.prompt-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 35px rgba(0, 0, 0, 0.12);
}

.prompt-input,
.prompt-wrapper .prompt-input,
input.prompt-input {
    flex: 1;
    border: none !important;
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    color: #1a1a1a;
    padding: 0.4rem 0;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.prompt-input::placeholder {
    color: #aaa;
    transition: color 0.3s ease;
}

.prompt-input:focus::placeholder {
    color: #ccc;
}

/* Character counter */
.char-counter {
    font-size: 0.6rem;
    color: #bbb;
    font-family: 'Inter', sans-serif;
    pointer-events: none;
    transition: color 0.3s ease;
    flex-shrink: 0;
    margin-right: 2px;
}

.char-counter.warning {
    color: #d97757;
}

/* Voice button */
.voice-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.voice-btn svg {
    width: 14px;
    height: 14px;
}

.voice-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #666;
}

/* ================================================================
   MENU BUTTON (Hamburger)
   ================================================================ */
.menu-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-right: 8px;
    padding-right: 8px;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.menu-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.menu-icon {
    display: block;
    width: 14px;
    height: 1.5px;
    background: #aaa;
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 1.5px;
    background: #aaa;
    left: 0;
}

.menu-icon::before { top: -4px; }
.menu-icon::after { bottom: -4px; }

.menu-btn:hover .menu-icon,
.menu-btn:hover .menu-icon::before,
.menu-btn:hover .menu-icon::after {
    background: #666;
}

/* ================================================================
   LANGUAGE SELECTOR
   ================================================================ */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 6px;
    padding-left: 8px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.lang-btn {
    padding: 4px 6px;
    border: none;
    background: transparent;
    color: #bbb;
    font-family: 'Inter', sans-serif;
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: #666;
}

.lang-btn.active {
    color: #8B7355;
    font-weight: 600;
}

/* ================================================================
   SIDEBAR OVERLAY
   ================================================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ================================================================
   SIDEBAR MENU - Semitransparent with blur
   ================================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.95) !important;
}

.sidebar-logo {
    font-family: 'Brush Script MT', cursive;
    font-size: 1.8rem;
    color: #8B7355;
    letter-spacing: 2px;
}

.sidebar-close {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    padding: 1rem 0.75rem;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    border-radius: 8px;
    transition: all 0.3s;
    display: block;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 1rem;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.75rem 0;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-tagline {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    letter-spacing: 0.02em;
}

/* Sidebar Logo Colors - All white except InternationalCIO */
.link-logo {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

.theunico-gradient {
    background: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
}

/* All logos in white */
.sidebar .uipo-u,
.sidebar .uipo-i,
.sidebar .uipo-p,
.sidebar .uipo-o,
.sidebar .indeex-i,
.sidebar .indeex-n,
.sidebar .indeex-d,
.sidebar .indeex-e1,
.sidebar .indeex-e2,
.sidebar .indeex-x,
.sidebar .gandt-g,
.sidebar .gandt-a,
.sidebar .gandt-n,
.sidebar .gandt-d,
.sidebar .gandt-t,
.sidebar .c3x4-3,
.sidebar .c3x4-x,
.sidebar .c3x4-4,
.sidebar .c3x4-eq,
.sidebar .c3x4-a,
.sidebar .c3x4-i {
    color: #fff;
}

/* ================================================================
   QUICK ACCESS CIRCLES - Prominent & Balanced
   ================================================================ */
.quick-access {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3.5rem; /* More generous spacing */
    max-width: 1000px;
    z-index: 10;
    position: relative;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem; /* 12px */
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-item:hover {
    transform: translateY(-4px);
}

.quick-item:hover .quick-circle {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), 0 0 0 6px rgba(139, 115, 85, 0.2);
    transform: scale(1.05);
}

.quick-circle {
    width: 48px;  /* Smaller - more elegant */
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent;
}

/* ================================================================
   LOGO STYLES BASE - Compact inside smaller circles
   ================================================================ */
.logo-icio {
    font-family: 'Brush Script MT', cursive;
    font-size: 0.875rem; /* 14px */
    white-space: nowrap;
    font-weight: 500;
    color: #8B7355;
}

.logo-theunico {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem; /* 12px */
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-uipo {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem; /* 13px */
    font-weight: 600;
    letter-spacing: -0.02em;
}

.logo-indeex {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem; /* 13px */
    font-weight: 600;
    letter-spacing: -0.02em;
}

.logo-gandt {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem; /* 13px */
    font-weight: 600;
    letter-spacing: -0.02em;
}

.logo-3x4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem; /* 13px */
    font-weight: 600;
    letter-spacing: -0.02em;
}

.logo-about {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem; /* 12px */
    font-weight: 600;
    color: #666;
}

/* ================================================================
   LABEL STYLES BASE - Clear & Readable
   ================================================================ */
.label-icio {
    font-family: 'Brush Script MT', cursive;
    font-size: 1.125rem; /* 18px */
    font-weight: 400;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.label-theunico,
.label-uipo,
.label-indeex,
.label-gandt,
.label-3x4,
.label-about {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem; /* 15px - Clear */
    font-weight: 500;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* ================================================================
   THEME SELECTOR - Bottom right corner
   ================================================================ */
.theme-selector {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    z-index: 100;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.theme-dot:hover {
    transform: scale(1.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-dot.active {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ================================================================
   KEYBOARD NAVIGATION FOCUS STATES
   ================================================================ */

/* Quick Access Circles - Keyboard Focus */
.quick-item.keyboard-focus .quick-circle {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 0 0 6px rgba(139, 115, 85, 0.4);
    transform: scale(1.08);
}

.quick-item.keyboard-focus {
    transform: translateY(-4px);
}

/* Theme Dots - Keyboard Focus */
.theme-dot.keyboard-focus {
    transform: scale(1.4);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ================================================================
   ART INFO POPUP - Elegant tooltips with painting colors
   ================================================================ */
.art-info-popup {
    position: absolute;
    bottom: calc(100% + 8px); /* Position above the label */
    left: 0;
    transform: translateY(10px);
    width: 400px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    border-radius: 16px;
    border: 2px solid;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Elegant bounce effect */
    z-index: 1001;
}

.art-info-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Arrow pointing down to the label */
.art-info-popup::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 24px; /* Aligned with label start */
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid;
    border-top-color: inherit;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.art-info-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.3;
    text-align: left;
}

.art-info-artist {
    font-size: 14px;
    font-weight: 500;
    color: #4a4a4a;
    margin-bottom: 12px;
    text-align: left;
}

.art-info-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #5a5a5a;
    margin-bottom: 32px; /* Space for attribution */
    text-align: left;
}

/* Attribution positioned at bottom-left */
.art-info-attribution {
    position: absolute;
    bottom: 10px;
    left: 16px;
    font-size: 10px;
    color: #999;
    text-align: left;
    opacity: 0.85;
    line-height: 1.4;
}

/* Close button */
.art-info-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #6a6a6a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.art-info-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

/* Art Credits - Positioned bottom-left, clickable */
.monet-credit,
.art-credit-starry,
.art-credit-wheat,
.art-credit-vermeer,
.art-credit-hokusai,
.art-credit-klimt,
.art-credit-turner,
.art-credit-botticelli,
.art-credit-friedrich,
.art-credit-monet-sunrise,
.art-credit-seurat,
.art-credit-munch {
    position: fixed;
    bottom: 20px;
    left: 20px;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none; /* Hidden by default, shown when theme is active */
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.monet-credit:hover,
.art-credit-starry:hover,
.art-credit-wheat:hover,
.art-credit-vermeer:hover,
.art-credit-hokusai:hover,
.art-credit-klimt:hover,
.art-credit-turner:hover,
.art-credit-botticelli:hover,
.art-credit-friedrich:hover,
.art-credit-monet-sunrise:hover,
.art-credit-seurat:hover,
.art-credit-munch:hover {
    background: rgba(255, 255, 255, 0.95);
    color: rgba(0, 0, 0, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .main-logo {
        font-size: clamp(2rem, 12vw, 4rem);
        margin-bottom: 2rem;
    }

    .prompt-container {
        max-width: 90%;
        margin-bottom: 3rem;
    }

    .quick-access {
        gap: 1.25rem;
    }

    .quick-circle {
        width: 44px;
        height: 44px;
    }

    /* Art credits above theme selector on mobile - centered without transform */
    .monet-credit,
    .art-credit-starry,
    .art-credit-wheat,
    .art-credit-vermeer,
    .art-credit-hokusai,
    .art-credit-klimt,
    .art-credit-turner,
    .art-credit-botticelli,
    .art-credit-friedrich,
    .art-credit-monet-sunrise,
    .art-credit-seurat,
    .art-credit-munch {
        bottom: 70px;
        left: 0;
        right: 0;
        width: fit-content;
        margin: 0 auto;
        transform: none;
        text-align: center;
    }

    /* Art info popup - fixed position centered on mobile */
    .art-info-popup {
        position: fixed !important;
        width: 85vw !important;
        max-width: 320px !important;
        left: 50% !important;
        right: auto !important;
        bottom: 105px !important;
        transform: translateX(-50%) !important;
        padding: 16px !important;
    }

    .art-info-popup.show {
        transform: translateX(-50%) !important;
    }

    /* Center the arrow on mobile */
    .art-info-popup::after {
        left: 50% !important;
        right: auto !important;
        margin-left: -10px !important;
        transform: none !important;
    }

    .art-info-title {
        font-size: 15px;
    }

    .art-info-artist {
        font-size: 12px;
    }

    .art-info-desc {
        font-size: 11px;
        margin-bottom: 24px;
    }

    .art-info-attribution {
        font-size: 9px;
    }

    /* Theme selector centered on mobile */
    .theme-selector {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .quick-access {
        gap: 1rem;
    }

    .quick-circle {
        width: 40px;
        height: 40px;
    }

    .logo-icio,
    .logo-theunico,
    .logo-indeex,
    .logo-gandt,
    .logo-3x4,
    .logo-about {
        font-size: 0.625rem;
    }

    .logo-uipo {
        font-size: 0.6875rem;
    }
}
