/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

:root {
    --bg-color: #040404;
    --card-bg: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #007AFF;
    --border-color: rgba(255, 255, 255, 0.1);
}

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Prevent scrollbars */
    background-color: var(--bg-color);
    color: var(--text-primary);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* --- Landing Page Styling --- */
#landing-page {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #040404 100%);
    animation: fadeIn 1s ease-out;
    position: relative;
    padding: 20px;
}

.landing-content {
    text-align: center;
    max-width: 480px;
    width: 100%;
    z-index: 10;
    margin-bottom: 80px;
    /* Space for footer */
}

.brand-area {
    margin-bottom: 40px;
}

.logo {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.brand-area h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 60%, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-area p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.join-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
    background: #222;
}

button#startMeetingBtn {
    width: 100%;
    padding: 14px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

button#startMeetingBtn:hover {
    background-color: #0066d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

button#startMeetingBtn:active {
    transform: translateY(0);
}

.error-message {
    color: #ff4d4d;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
    background: rgba(255, 77, 77, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 77, 77, 0.2);
}

/* --- Quick Access Pills --- */
.quick-access {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-access-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 2px;
}

.pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-access-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    color: #ccc;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-access-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-1px);
}

/* --- Help Center Modal (Enterprise Dark Mode) --- */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    /* Wider min-width */
    gap: 20px;
    margin-top: 20px;
    align-items: stretch;
    /* Equal height */
}

.help-card {
    background: rgba(28, 28, 30, 0.6);
    /* Glassmorphism Base */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Align content to top */
    height: 100%;
    position: relative;
    overflow: hidden;
}

.help-card:hover {
    transform: translateY(-5px);
    border-color: #007AFF;
    /* Neon Blue Border */
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.15);
    /* Soft Glow */
}

.icon-wrapper {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.help-card:hover .icon-wrapper {
    background: rgba(0, 122, 255, 0.1);
}

.help-card h3 {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
    /* Inter SemiBold */
}

.help-card p {
    color: #a1a1a6;
    /* Light Grey Description */
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 400;
}

/* WhatsApp Button */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    font-size: 0.95rem;
}

.whatsapp-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Server Status */
.server-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    background: rgba(0, 255, 0, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 0, 0.1);
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #34C759;
    /* Bright Green */
    border-radius: 50%;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: inherit;
    border-radius: inherit;
    animation: pulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

.status-text {
    color: #34C759;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
        opacity: 1;
    }

    100% {
        box-shadow: 0 0 0 10px rgba(52, 199, 89, 0);
        opacity: 0;
    }
}

/* Close Button Enhancement */
.close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    font-size: 24px;
    line-height: 1;
    padding-bottom: 2px;
    /* Visual center adjustment */
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}

/* --- Footer --- */
footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 24px 40px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(4, 4, 4, 0.8);
    backdrop-filter: blur(10px);
}

.footer-column {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.center-text {
    text-align: center;
}

.right-text {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--accent-color);
}

.sep {
    margin: 0 8px;
    color: #333;
}

.store-badge {
    background: #222;
    border: 1px solid #333;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.store-badge:hover {
    background: #333;
    border-color: #444;
    transform: translateY(-2px);
}

.store-badge svg {
    opacity: 0.9;
}

/* Mobile Responsive Footer */
@media (max-width: 768px) {
    footer {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .footer-column {
        text-align: center;
        flex: auto;
    }

    .right-text {
        justify-content: center;
    }

    .landing-content {
        margin-bottom: 120px;
        /* More space for stacked footer */
    }
}

@media (max-width: 480px) {
    .logo {
        width: 70px;
        /* Resize logo for smaller screens */
    }

    .landing-content {
        margin-bottom: 40px;
        /* Reduce bottom margin on small screens to keep above fold */
    }

    .brand-area h1 {
        font-size: 1.5rem;
    }
}

/* --- Loading Overlay --- */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 4, 4, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* --- Meeting Container --- */
#meeting-container {
    width: 100vw;
    height: 100vh;
    background: #000;
    position: fixed;
    /* Fixed position to ensure it covers everything */
    top: 0;
    left: 0;
    z-index: 9999;
    /* Ensure it's on top */
    display: flex;
    /* Use flex for centering if needed */
    flex-direction: column;
}

#meet {
    width: 100vw;
    height: 100vh;
    flex: 1;
    background: #000;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: #ffffff;
    z-index: 1000;
    pointer-events: none;
}

.overlay h1 {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Privacy Modal --- */
.modal {
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: #111;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #333;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.8);
    position: relative;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover,
.close-btn:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-right: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.modal-body {
    overflow-y: auto;
    padding-right: 10px;
    text-align: left;
    color: #ccc;
    line-height: 1.6;
}

.modal-body h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-body h4 {
    color: #fff;
    font-size: 1rem;
    margin-top: 15px;
    margin-bottom: 8px;
}

.modal-body p,
.modal-body ul {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.modal-body ul {
    padding-left: 20px;
}

.modal-body .meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.modal-body hr {
    border: 0;
    height: 1px;
    background: #333;
    margin: 30px 0;
}

/* Scrollbar for Modal Body */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}