:root {
    /* Color Palette */
    --color-primary: #22c55e;
    --color-primary-dark: #16a34a;
    --color-secondary-purple: #7c83fd;
    --color-bg-light: #f8fafc;
    --color-bg-dark: #0f172a;
    --color-card-dark: #161e32;
    --color-surface-dark: #1e293b;
    --color-white: #ffffff;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --color-green-50: #f0fdf4;
    --color-green-100: #dcfce7;
    --color-green-800: #166534;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg-light);
    color: var(--color-gray-900);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    gap: 1.5rem;
    transition: background-color 0.2s, color 0.2s;
    margin: 0;
}

/* Desktop sizing to match 100vh requirement */
@media (min-width: 768px) {
    body {
        min-height: 100vh;
        padding: 2rem;
    }
}

/* Dark Mode Overrides */
html.dark body {
    background-color: var(--color-bg-dark);
    color: var(--color-white);
}

/* Utility Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --- Components --- */

/* Main Card */
.main-card {
    width: 100%;
    max-width: 1200px;
    background-color: var(--color-white);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-gray-100);
    position: relative;
    z-index: 10;
    transition: background-color 0.2s, border-color 0.2s;
}

@media (min-width: 768px) {
    .main-card {
        flex-direction: row;
        max-height: calc(100vh - 4rem);
        min-height: 600px;
        height: auto;
    }
}

html.dark .main-card {
    background-color: var(--color-card-dark);
    border-color: rgba(55, 65, 81, 0.5);
}

/* Left Panel */
.left-panel {
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    order: 2;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .left-panel {
        width: 60%;
        padding: 3rem;
        order: 1;
    }
}

/* Hiring Badge */
.hiring-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background-color: var(--color-green-100);
    color: var(--color-green-800);
}

html.dark .hiring-badge {
    background-color: rgba(22, 101, 52, 0.3);
    color: #86efac;
}

.hiring-dot {
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.5rem;
    background-color: var(--color-primary);
    border-radius: 50%;
}

/* Typography */
.hero-title {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    margin-top: 0;
    color: var(--color-gray-900);
}

html.dark .hero-title {
    color: var(--color-white);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

.text-primary {
    color: var(--color-primary);
}

.hero-description {
    color: var(--color-gray-600);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

html.dark .hero-description {
    color: var(--color-gray-300);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-gray-800);
    border-bottom: 2px solid var(--color-gray-200);
    padding-bottom: 0.75rem;
    margin: 0;
}

html.dark .section-title {
    color: var(--color-gray-100);
    border-color: var(--color-gray-700);
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
}

.feature-icon-box {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.625rem;
    background-color: var(--color-green-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.feature-icon-box .material-icons-outlined {
    font-size: 1.5rem;
}

html.dark .feature-icon-box {
    background-color: rgba(22, 101, 52, 0.2);
}

.feature-content {
    margin-left: 1rem;
    flex: 1;
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 0 0 0.25rem 0;
}

html.dark .feature-title {
    color: var(--color-white);
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    margin: 0;
    line-height: 1.5;
}

html.dark .feature-desc {
    color: var(--color-gray-400);
}

/* Right Panel */
.right-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    order: 1;
}

@media (min-width: 768px) {
    .right-panel {
        width: 40%;
        order: 2;
    }
}

.bg-layer {
    position: absolute;
    inset: 0;
    background-color: var(--color-gray-50);
    z-index: 0;
}

html.dark .bg-layer {
    background-color: #1a233a;
}

/* Purple Header Area */
.purple-header {
    position: relative;
    z-index: 10;
    width: 100%;
    background: linear-gradient(135deg, #7c83fd 0%, #969bfd 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.glass-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 0.625rem 1.25rem;
    border-radius: 0.625rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-name {
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.025em;
}

/* Content Area Right */
.right-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    /* Enable smooth scrolling */
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .right-content {
        padding: 2.5rem 2rem;
    }
}

@media (min-width: 1024px) {
    .right-content {
        padding: 3rem 2.5rem;
    }
}

.stats-pill {
    width: 100%;
    max-width: 320px;
    background-color: var(--color-green-100);
    border: 1px solid #bbf7d0;
    border-radius: 0.875rem;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    color: var(--color-green-800);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 1024px) {
    .stats-pill {
        max-width: 380px;
        padding: 1rem 1.25rem;
    }
}

html.dark .stats-pill {
    background-color: rgba(22, 101, 52, 0.3);
    border-color: rgba(22, 101, 52, 0.5);
    color: #86efac;
}

.text-bold-sm {
    font-size: 0.8125rem;
    font-weight: 700;
    text-align: center;
}

/* QR Box */
.qr-card {
    background-color: var(--color-white);
    border-radius: 0.875rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--color-gray-100);
}

@media (min-width: 1024px) {
    .qr-card {
        max-width: 420px;
    }
}

@media (min-width: 1280px) {
    .qr-card {
        max-width: 480px;
    }
}

html.dark .qr-card {
    background-color: var(--color-card-dark);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    border-color: var(--color-gray-700);
}

.qr-section {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white);
    overflow: hidden;
    padding: 1rem;
}

@media (min-width: 1024px) {
    .qr-section {
        padding: 1.5rem;
    }
}

html.dark .qr-section {
    background-color: var(--color-gray-900);
}

/* Styles for injected QR content */
.qr-section .qr-label {
    display: none !important;
}

.qr-section .qr-container {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.qr-section .qr-image,
.qr-section img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 !important;
    display: block !important;
}

.scan-text {
    text-align: center;
    color: var(--color-gray-500);
    font-size: 0.8125rem;
    font-weight: 500;
    width: 100%;
    background-color: var(--color-white);
    padding: 0.75rem;
    margin: 0;
}

html.dark .scan-text {
    color: var(--color-gray-500);
    background-color: var(--color-card-dark);
}

/* Actions */
.action-box {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

@media (min-width: 1024px) {
    .action-box {
        max-width: 380px;
    }
}

.join-label {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-gray-600);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

html.dark .join-label {
    color: var(--color-gray-400);
}

.btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px 0 rgba(34, 197, 94, 0.2);
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-copy {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-200);
    color: var(--color-gray-700);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    transition: background-color 0.2s, border-color 0.2s;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

html.dark .btn-copy {
    background-color: var(--color-surface-dark);
    border-color: var(--color-gray-600);
    color: var(--color-gray-300);
}

.btn-copy:hover {
    background-color: var(--color-gray-50);
    border-color: var(--color-gray-300);
}

html.dark .btn-copy:hover {
    background-color: rgba(55, 65, 81, 0.5);
    border-color: var(--color-gray-500);
}

/* Footer Section */
.footer-bar {
    position: relative;
    z-index: 10;
    padding: 1rem;
    border-top: 1px solid var(--color-gray-200);
    text-align: center;
    background-color: rgba(249, 250, 251, 0.5);
    width: 100%;
}

html.dark .footer-bar {
    border-color: rgba(55, 65, 81, 0.5);
    background-color: #1a233a;
}

.footer-text {
    font-size: 0.75rem;
    margin: 0;
}

html.dark .footer-text {
    color: var(--color-gray-500);
}

/* External Footer */
.external-footer {
    text-align: center;
    padding: 0.75rem 0;
    position: relative;
    z-index: 5;
}

.copyright-text {
    font-size: 0.6875rem;
    margin: 0.25rem 0 0 0;
}

html.dark .copyright-text {
    color: var(--color-gray-600);
}

/* Toggle Button */
.theme-toggle-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
}

.theme-btn {
    padding: 0.75rem;
    background-color: var(--color-white);
    color: var(--color-gray-800);
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-gray-200);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

html.dark .theme-btn {
    background-color: var(--color-gray-800);
    color: var(--color-white);
    border-color: var(--color-gray-700);
}

/* Hide/Show icons based on theme */
.icon-light {
    display: none;
}

.icon-dark {
    display: block;
}

html.dark .icon-light {
    display: block;
}

html.dark .icon-dark {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .main-card {
        margin-bottom: 0;
    }

    .external-footer {
        padding-bottom: 1rem;
    }

    .theme-toggle-container {
        bottom: 1rem;
        right: 1rem;
    }
}