:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --text-dark: #0f172a;
    --text-light: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

html, body {
    height: 100%;
}

/* Landing page: single screen, no scroll */
body.landing-body {
    overflow: hidden;
}

/* Main content area */
main {
    min-height: 100vh;
}

/* Landing Hero Section */
.landing-hero {
    position: relative;
    height: 100dvh;
    display: flex;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

.landing-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 0;
    z-index: 5;
}

.landing-hero .container.position-relative {
    height: 100%;
    padding-top: 96px;   /* space for topbar */
    padding-bottom: 32px; /* breathing room at bottom */
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.landing-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.landing-brand-text {
    font-size: 1.35rem;
    line-height: 1;
}

.landing-brand-accent {
    color: rgba(255, 255, 255, 0.95);
}

.landing-top-actions {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    border-radius: 999px;
    padding: 6px;
}

.landing-link {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 999px;
}

.landing-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.landing-cta {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 800;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.landing-cta:hover {
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-content {
    color: white;
    z-index: 1;
}

.hero-content {
    padding: 0; /* handled by container padding */
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-badge {
    display: inline-block;
}

.badge-text {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: clamp(2.4rem, 4.2vw, 3.4rem);
    font-weight: 800;
    line-height: 1.2;
    color: white;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.9);
    max-width: 540px;
}

.hero-actions {
    margin-top: 1.25rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-hero-primary {
    background: white;
    color: var(--primary-dark);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-hero-primary i,
.btn-hero-secondary i {
    color: inherit;
}

.btn-hero-primary:hover {
    background: white !important;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    color: var(--primary-dark) !important;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
    color: white !important;
}

.hero-stats {
    display: flex;
    gap: 2.25rem;
    margin-top: 1.75rem;
    margin-bottom: 3rem; /* Add more space below the statistics */
    padding-top: 1.25rem;
    padding-bottom: 1rem; /* Additional padding for spacing */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(-14px); /* lift slightly so it doesn't touch bottom */
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-size: 1.7rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Feature Cards */
.hero-features {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 0;
    padding-bottom: 40px;
    transform: translateY(-10px); /* lift card stack a bit */
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.feature-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
}

/* Floating cards (uses transform only — no layout shift, no scroll) */
@keyframes floatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.feature-card-1 {
    animation: floatSoft 6.5s ease-in-out infinite;
}

.feature-card-2 {
    animation: floatSoft 7.25s ease-in-out infinite;
    animation-delay: 0.6s;
}

.feature-card-3 {
    animation: floatSoft 7.75s ease-in-out infinite;
    animation-delay: 1.2s;
}

/* keep cards aligned */
.feature-card-1,
.feature-card-2,
.feature-card-3 {
    margin-left: 0 !important;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.feature-card-1 {
    animation: float 6s ease-in-out infinite;
}

.feature-card-2 {
    animation: float 6s ease-in-out infinite 2s;
    margin-left: 2rem;
}

.feature-card-3 {
    animation: float 6s ease-in-out infinite 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.feature-icon-wrapper {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon {
    font-size: 1.5rem;
    color: white;
}

.feature-card h5 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* If the viewport height is small (taskbar / small window), tighten further to avoid clipped bottom */
@media (max-height: 840px) {
    .landing-hero .container.position-relative {
        padding-top: 84px;
        padding-bottom: 18px;
    }

    .hero-title {
        line-height: 1.12;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1.02rem;
    }

    .hero-stats {
        margin-top: 1.25rem;
        margin-bottom: 2.5rem; /* Add space below on smaller screens */
        padding-top: 1rem;
        padding-bottom: 0.75rem;
        transform: translateY(-10px);
    }

    .stat-number {
        font-size: 1.55rem;
    }

    .hero-features {
        gap: 0.9rem;
        padding-bottom: 22px;
        transform: translateY(-8px);
    }

    .feature-card {
        padding: 1.25rem;
    }
}

.scroll-indicator {
    display: none;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* Common Styles */
.min-vh-100 {
    min-height: 100vh;
}

.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.spinner-border {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.call-container {
    background: #000;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#remoteVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    /* Ensure video fills container while maintaining aspect ratio */
    min-width: 100%;
    min-height: 100%;
}

#localVideo {
    object-fit: cover;
    object-position: center center;
    /* Maintain aspect ratio for local video */
    aspect-ratio: 16 / 9;
}

.call-controls {
    z-index: 1000;
}

.call-timer {
    z-index: 1000;
}

#localVideo {
    background: #1f2937;
}

#remoteVideo {
    background: #374151;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

.rounded-4 {
    border-radius: 1.5rem !important;
}

.rounded-pill {
    border-radius: 50rem !important;
}

.onboarding-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.waiting-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Thank you page */
.thank-you-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.auth-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Auth pages: force single-screen (no page scroll) */
body.auth-body {
    overflow: hidden;
}

.auth-shell {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-card {
    width: min(520px, 100%);
    border: 0;
    border-radius: 20px;
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.12);
}

.auth-card .card-body {
    padding: 20px !important;
}

.auth-card .auth-icon {
    font-size: 2.25rem;
}

.auth-card .auth-title {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.auth-card .auth-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.auth-card .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.auth-card .form-control {
    font-size: 0.95rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
}

.auth-card .mb-3 {
    margin-bottom: 0.75rem !important;
}

.auth-card .btn-auth {
    padding: 0.75rem 1rem;
    border-radius: 999px;
    font-weight: 700;
}

.auth-card .auth-links {
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.matching-animation {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .feature-card-2 {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat-item {
        text-align: center;
    }
    
    #remoteVideo {
        width: 200px !important;
        height: 150px !important;
    }
}
