/* ===== LAYOUT CSS ===== */
/* Header, Main, Modals, Overlays */

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: var(--bg-elevated);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Logo Image */
.logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}

.brand {
    font-size: 18px;
    font-weight: 600;
}

.online-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--surface);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.online-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Center section for Trust Health (stable anchor) */
.header-center {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-end;
}

/* Icon Button */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.icon-btn:hover {
    background: var(--surface);
    color: var(--text);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--danger);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

.badge.visible {
    display: flex;
}

/* Main - Call UI Section (70% of viewport) */
.main {
    min-height: 70vh;
    min-height: 70dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 40px 20px;
    position: relative;
}

/* Welcome Note - Small & Elegant */
.welcome-note {
    text-align: center;
    margin-bottom: 8px;
    animation: welcome-fade-in 0.6s ease-out;
}

.welcome-note span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.welcome-note.hidden {
    display: none;
}

@keyframes welcome-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-wave {
    font-size: 36px;
    margin-bottom: 4px;
    animation: wave-hand 2s ease-in-out infinite;
    display: inline-block;
    transform-origin: 70% 70%;
}

@keyframes wave-hand {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }

    60%,
    100% {
        transform: rotate(0deg);
    }
}

.welcome-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, #bf5af2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.welcome-tagline {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 260px;
    margin: 0 auto;
    line-height: 1.4;
}

@keyframes welcome-fade-in {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide welcome hero during call */
.welcome-hero.hidden {
    display: none;
}

/* Scroll Hint Indicator */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 20px;
    color: var(--text-tertiary);
    font-size: 12px;
    animation: scroll-bounce 2s ease-in-out infinite;
    cursor: pointer;
    transition: color 0.2s;
}

.scroll-hint:hover {
    color: var(--text-secondary);
}

.scroll-hint svg {
    width: 20px;
    height: 20px;
}

.scroll-hint.hidden {
    display: none;
}

@keyframes scroll-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

/* Status Row - Contains status pill and trust health */
.status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Status Pill */
.status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-elevated);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Online Count in Status Row */
.online-count {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-elevated);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.status-dot.connected {
    background: var(--success);
}

.status-dot.searching {
    background: var(--warning);
    animation: pulse 0.5s infinite;
}

.status-dot.in-call {
    background: var(--accent);
}

/* Overlays */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease-out;
}

.overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Fixed Ad Banner */
.ad-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: var(--bg-elevated);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.ad-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 16px 32px;
    text-align: center;
}

.ad-placeholder span {
    color: var(--text-tertiary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Age Verification Modal */
.age-modal {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.age-modal.hidden {
    display: none;
}

.age-content {
    background: var(--bg-elevated);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    padding: 32px;
    max-width: 400px;
    text-align: center;
}

.age-icon {
    width: 64px;
    height: 64px;
    background: var(--surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.age-icon svg {
    width: 32px;
    height: 32px;
    color: var(--warning);
}

.age-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.age-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.age-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}

.age-checkbox input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.age-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.5;
    pointer-events: none;
}

.age-btn.enabled {
    opacity: 1;
    pointer-events: auto;
}

/* Footer */
.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 40px 20px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 12px;
}

/* SEO Content Section */
.seo-section {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
    padding: 50px 20px 60px;
    border-top: 1px solid var(--border);
    position: relative;
}

.seo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #bf5af2);
    border-radius: 2px;
}

.seo-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

.seo-content p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.feature-card {
    background: var(--bg-elevated);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.feature-card h3 {
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    margin-bottom: 0;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    background: rgba(28, 28, 30, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: toast-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.hiding {
    animation: toast-out 0.2s ease-in forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}