:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #d946ef;
    --accent: #22d3ee;
    --bg-dark: #020617;
    --card-bg: rgba(15, 23, 42, 0.6);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shine: rgba(255, 255, 255, 0.05);
    --font-main: 'Outfit', sans-serif;
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    width: 100%;
}

/* Premium Mesh Background */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 0% 0%, #0f172a 0%, #020617 100%);
}

.blob {
    position: absolute;
    filter: blur(150px);
    border-radius: 50%;
    opacity: 0.35;
    animation: float 30s infinite alternate ease-in-out;
}

.blob-1 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--primary), transparent);
    top: -20%;
    right: -10%;
}

.blob-2 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--secondary), transparent);
    bottom: -15%;
    left: -5%;
    animation-delay: -5s;
}

.blob-3 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent), transparent);
    top: 25%;
    left: 15%;
    animation-delay: -12s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(60px, 40px) scale(1.1);
    }

    100% {
        transform: translate(-20px, 80px) scale(0.9);
    }
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2.5rem;
    width: 100%;
}

nav {
    padding: 3rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.logo i {
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.4));
}

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 0;
}

.hero-content {
    text-align: center;
    margin-bottom: 7rem;
}

.hero-content h1 {
    font-size: clamp(3.5rem, 10vw, 6.5rem);
    font-weight: 900;
    line-height: 0.95;
    margin-bottom: 2.5rem;
    letter-spacing: -0.05em;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.gradient-text {
    background: linear-gradient(to right, #818cf8, #d946ef, #22d3ee, #818cf8);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradient 8s linear infinite;
}

@keyframes textGradient {
    to {
        background-position: 300% center;
    }
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--text-dim);
    max-width: 850px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.7;
}

/* --- Unified Responsive Bento Grid System --- */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: 2.5rem;
    margin: 0 auto 8rem;
    width: 100%;
    align-items: stretch;
}

.card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 48px;
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    height: 100%;
}

.card:hover {
    transform: translateY(-12px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}

.card-icon {
    width: 70px;
    height: 70px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary-light);
    margin-bottom: 2.5rem;
    transition: 0.4s ease;
}

.join-card .card-icon {
    background: rgba(217, 70, 239, 0.1);
    border-color: rgba(217, 70, 239, 0.2);
    color: var(--secondary);
}

.card h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.card p {
    color: var(--text-dim);
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.card-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

input {
    width: 100% !important;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    color: white;
    outline: none;
    transition: 0.4s;
    font-size: 1.1rem;
}

input:focus {
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.1);
}

.session-input-premium {
    text-align: center;
    letter-spacing: 0.2em;
    font-weight: 800;
    font-family: monospace;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    color: var(--text-dim);
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-group:hover {
    background: rgba(255, 255, 255, 0.07);
}

.btn {
    width: 100%;
    padding: 1.25rem;
    border-radius: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4338ca);
    color: white;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #a21caf);
    color: white;
    box-shadow: 0 10px 20px rgba(217, 70, 239, 0.3);
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 4rem;
    padding: 8rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    transition: 0.4s ease;
}

.feature-icon {
    font-size: 3.2rem;
    margin-bottom: 2rem;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature h4 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.feature p {
    color: var(--text-dim);
}

/* Footer & Other UI Elements */
footer {
    padding: 5rem 0;
    border-top: 1px solid var(--glass-border);
    background: rgba(2, 6, 23, 0.5);
    margin-top: auto;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2.5rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--primary-light);
}

/* --- Mobile Responsive System --- */
@media (max-width: 1024px) {
    .action-cards {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-content h1 {
        font-size: clamp(2.5rem, 12vw, 4.5rem);
    }

    .card {
        padding: 3rem 1.75rem;
        border-radius: 40px;
    }

    .card h3 {
        font-size: 1.75rem;
    }

    /* Absolute Vertical Stacking Fix */
    .input-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    input {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        padding: 1.1rem 1.25rem !important;
        font-size: 1rem !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .card {
        padding: 2.5rem 1.25rem;
        border-radius: 32px;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .card p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .toggle-group {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    #sessionInput {
        letter-spacing: 0.1em !important;
        font-size: 1.1rem !important;
    }

    .btn {
        padding: 1.1rem !important;
        font-size: 0.95rem !important;
    }
}

/* Additional UI Helper Styles */

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Progress Bar */
.upload-progress-container {
    width: 100%;
    margin-top: 10px;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: 3rem;
    margin-top: 5rem;
}

.faq-item {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    padding: 3.5rem;
    border-radius: 40px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.faq-item:hover {
    background: rgba(15, 23, 42, 0.85);
    transform: translateY(-10px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-premium);
}

.faq-item h3 {
    color: var(--primary-light);
    font-size: 1.7rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.faq-item h3 i {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-item p {
    color: var(--text-dim);
    font-size: 1.2rem;
    line-height: 1.8;
}

/* Premium Notifications */
.notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notif {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border-left: 6px solid var(--primary);
    animation: premiumSlideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes premiumSlideIn {
    from {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
        filter: blur(10px);
    }

    to {
        transform: translateX(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

/* Redesigned Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.qr-container {
    background: white;
    padding: 4rem;
    border-radius: 48px;
    text-align: center;
    color: #0f172a;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.6);
}

.qr-container h3 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
}

/* Offline Overlay */
#offlineOverlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(30px);
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

#offlineOverlay i {
    font-size: 6rem;
    margin-bottom: 2.5rem;
    color: var(--danger);
    filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.4));
}

/* High-End Preview Modal */
.preview-modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
}

.close-preview {
    position: absolute;
    top: 2.5rem;
    right: 3rem;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.4s;
}

.close-preview:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}