/* Root Variables - Ensure color consistency */
:root {
    --brand-deep-gold: #B18958;
    --brand-warm-orange: #D97706;
    --dark-bg: #1B1B1B;
    --bg-glass: rgba(27, 27, 27, 0.9);
    --text-primary: #F8F9FA;
    --dark-bg-card: rgba(0, 243, 255, 0.1);
    --neon-cyan: #00F3FF;
}

/* Core layout fixes */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
    max-width: 100%;
}

.beta-container {
    height: 100vh;
    max-width: 1200px;
    margin: 6rem auto 4rem;
    padding: 2rem;
    flex: 1;
    position: relative;
    z-index: 5;
    width: 100%;
    box-sizing: border-box;
}

/* Changed from grid to flexbox */
.beta-grid {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    margin: 2rem 0;
    width: 100%;
}

.beta-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.beta-form-container {
    flex: 1;
}

.beta-badge {
    background: rgba(177, 137, 88, 0.2);
    color: var(--brand-deep-gold);
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    animation: fadeIn 0.8s ease-out;
    box-shadow: 0 4px 12px rgba(177, 137, 88, 0.15);
    backdrop-filter: blur(10px);
    width: fit-content;
}

.beta-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    animation: fadeIn 1s ease-out 0.2s both;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.beta-title span {
    background: linear-gradient(135deg, var(--brand-deep-gold), var(--brand-warm-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.beta-description {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--text-primary);
    opacity: 0.85;
    animation: fadeIn 1.2s ease-out 0.4s both;
}

/* Changed from grid to flexbox */
.beta-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2rem;
    width: 100%;
}

.highlight-item {
    flex: 1 0 calc(50% - 1.25rem);
    min-width: 200px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    animation: fadeIn 1.4s ease-out 0.6s both;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.highlight-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.highlight-icon {
    background: linear-gradient(135deg, var(--brand-deep-gold), var(--brand-warm-orange));
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(177, 137, 88, 0.4);
}

.highlight-icon i {
    color: #121212;
    font-size: 1rem;
}

.highlight-text {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.4;
}

.beta-form-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 
                 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: slideUp 1.2s ease-out;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    width: 100%;
}

.beta-form-container:hover {
    transform: translateY(-5px);
}

.beta-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-deep-gold), var(--brand-warm-orange));
    box-shadow: 0 0 20px rgba(177, 137, 88, 0.8);
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.form-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.beta-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: var(--brand-deep-gold);
}

.form-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.1rem 1.25rem;
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 100%;
}

.form-input:focus {
    border-color: var(--brand-deep-gold);
    box-shadow: 0 0 0 3px rgba(177, 137, 88, 0.3), 0 8px 16px rgba(0, 0, 0, 0.2);
    outline: none;
    background: rgba(255, 255, 255, 0.12);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.beta-submit-btn {
    background: linear-gradient(135deg, var(--brand-deep-gold), var(--brand-warm-orange));
    color: white;
    padding: 1.1rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 1.05rem;
    letter-spacing: 0.025em;
    box-shadow: 0 10px 25px rgba(177, 137, 88, 0.4), 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    width: 100%;
    border: none;
}

.beta-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.beta-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(177, 137, 88, 0.5), 0 5px 15px rgba(0, 0, 0, 0.1);
}

.beta-submit-btn:hover::before {
    left: 100%;
}

.form-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-top: 1.5rem;
    line-height: 1.6;
}

.form-note a {
    color: var(--brand-deep-gold);
    transition: color 0.2s ease;
    text-decoration: underline;
}

.form-note a:hover {
    color: var(--brand-warm-orange);
}

.mockup-image {
    position: absolute;
    width: 90%;
    max-width: 300px;
    right: 1rem;
    bottom: -2rem;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5));
    transform: rotate(5deg);
    transition: all 0.3s ease;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.form-success {
    background: var(--dark-bg-card);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: var(--neon-cyan);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: none;
    animation: fadeIn 0.5s ease;
    font-weight: 500;
}

.form-error {
    background: rgba(255, 67, 67, 0.1);
    border: 1px solid rgba(255, 67, 67, 0.3);
    color: #ff4343;
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: none;
    animation: fadeIn 0.5s ease;
    font-weight: 500;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--neon-cyan);
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--dark-bg-card);
}

.download-link:hover {
    background: rgba(0, 243, 255, 0.2);
    transform: translateY(-2px);
}

/* Background elements */
.beta-bg-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(177, 137, 88, 0.3), rgba(217, 119, 6, 0.1));
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.bg-circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
}

.bg-circle-2 {
    width: 600px;
    height: 600px;
    bottom: -200px;
    left: -200px;
    opacity: 0.4;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .beta-grid {
        flex-direction: column;
        gap: 2rem;
    }
    
    .beta-form-container {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    /* Improved container spacing */
    .beta-container {
        margin-top: 5rem;
        margin-bottom: 2rem;
        padding: 1rem;
    }
    
    /* Mobile layout adjustments */
    .beta-grid {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
    }
    
    /* Make form container take full width */
    .beta-form-container {
        width: 100%;
        padding: 1.5rem;
        margin: 0;
    }
    
    /* Ensure highlights take full width */
    .beta-highlights {
        flex-direction: column;
        width: 100%;
    }
    
    .highlight-item {
        flex: none;
        width: 100%;
    }
    
    /* Smaller title on mobile */
    .beta-title {
        font-size: 2rem;
        word-break: break-word;
        hyphens: auto;
    }
    
    /* Thinner accent bar */
    .beta-form-container::before {
        height: 3px;
    }
    
    /* Mobile menu fixes */
    .nav.active {
        top: 70px;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        width: 100%;
        left: 0;
    }
    
    /* Logo container fixes */
    .logo-container {
        display: flex;
        align-items: center;
    }
    
    /* Fix potential text overflow issues */
    .beta-content, .beta-highlights {
        width: 100%;
        max-width: 100%;
    }
    
    /* Ensure footer aligns properly on mobile */
    .site-footer {
        width: 100%;
    }
}

/* Fix 2: Remove unwanted margin */
.site-footer {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Fix 3: Reduce unwanted space */
.footer-container {
    padding-top: 2rem;
}

/* Fix responsive header issues */
@media (max-width: 768px) {
    
    .beta-container {
        margin-top: 5.5rem;
        padding: 1rem 1.5rem 2rem;
    }
}

/* Add these mobile-specific styles to fix layout issues */
@media (max-width: 768px) {
    /* Improved container spacing */
    .beta-container {
        margin-top: 5.5rem;
        padding: 1rem 1rem 2rem;
        width: 100%;
    }
    
    /* Fix grid layout in mobile */
    .beta-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
    }
    
    /* Make form container take full width */
    .beta-form-container {
        width: 100%;
        padding: 1.5rem;
        margin: 0;
    }
    
    /* Ensure highlights take full width */
    .beta-highlights {
        grid-template-columns: 1fr;
        width: 100%;
    }
}

/* Fix container width at all breakpoints */
.beta-container {
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

/* Ensure form takes proper width */
.beta-form-container {
    width: 100%;
    box-sizing: border-box;
}

/* Additional mobile-specific fixes */
@media (max-width: 768px) {
    .beta-form-container {
        width: 100%;
        margin: 0;
        padding: 1.5rem;
    }
    
    .beta-grid {
        width: 100%;
    }
    
    .beta-content, .beta-highlights {
        width: 100%;
    }
}

/* Fix 1: Reduce excess top margin in mobile mode */
@media (max-width: 768px) {
    .beta-container {
        margin-top: 4.5rem; /* Reduced from 5.5rem */
        margin-bottom: 2rem; /* Reduced bottom margin before footer */
        padding: 1rem 1rem 1.5rem;
    }
}

.logo-container {
    display: flex;
    align-items: center;
}

/* Additional fixes for mobile layout */
@media (max-width: 768px) {
    /* Ensure mobile menu is properly positioned */
    .nav.active {
        top: 70px; /* Match header min-height */
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    /* Fix content width and ensure no overflow */
    .beta-form-container, 
    .beta-content, 
    .beta-highlights {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Fix potential text overflow issues */
    .beta-title {
        word-break: break-word;
        hyphens: auto;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header fixes */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem 5%;
    z-index: 1000;
    background: rgba(27, 27, 27, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
    .beta-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .beta-form-container {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    /* Improved container spacing */
    .beta-container {
        margin-top: 5rem;
        margin-bottom: 2rem;
        padding: 1rem;
    }
    
    /* Mobile grid layout */
    .beta-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Make form container take full width */
    .beta-form-container {
        width: 100%;
        padding: 1.5rem;
        margin: 0;
    }
    
    /* Ensure highlights take full width */
    .beta-highlights {
        grid-template-columns: 1fr;
    }
    
    /* Smaller title on mobile */
    .beta-title {
        font-size: 2rem;
        word-break: break-word;
        hyphens: auto;
    }
    
    /* Thinner accent bar */
    .beta-form-container::before {
        height: 3px;
    }
    
    /* Mobile menu fixes */
    .nav.active {
        top: 70px;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        width: 100%;
        left: 0;
    }
    
    /* Logo container fixes */
    .logo-container {
        display: flex;
        align-items: center;
    }
}

/* Dark mode fixes */
body.tw-dark .beta-form-container {
    background: rgba(255, 255, 255, 0.05);
}

body.tw-dark .highlight-text {
    color: var(--text-primary);
}

body.tw-dark .form-title {
    color: transparent;
}

body.tw-dark .form-label {
    color: var(--text-primary);
}

body.tw-dark .form-input {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

body.tw-dark .beta-title {
    color: var(--text-primary);
}

body.tw-dark .beta-description {
    color: var(--text-primary);
    /* optional subtle tone */
    opacity: 0.9;
}

/* Fix light mode color contrast issues */

/* Light mode specific styles */
html:not(.tw-dark) .beta-title {
    color: #2D2D2D !important; /* Dark text for light mode */
}

html:not(.tw-dark) .beta-description {
    color: #2D2D2D !important;
    opacity: 0.9;
}

html:not(.tw-dark) .highlight-item {
    background: rgba(177, 137, 88, 0.08);
}

html:not(.tw-dark) .highlight-text {
    color: #2D2D2D !important;
}

html:not(.tw-dark) .form-title {
    background: linear-gradient(135deg, #2D2D2D, #555555);
    -webkit-background-clip: text;
    background-clip: text;
}

html:not(.tw-dark) .form-subtitle {
    color: #555555 !important;
}

html:not(.tw-dark) .form-label {
    color: #2D2D2D !important;
}

html:not(.tw-dark) .form-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(177, 137, 88, 0.3);
    color: #2D2D2D !important;
}

html:not(.tw-dark) .form-input::placeholder {
    color: #777777;
}

html:not(.tw-dark) .form-note {
    color: #555555 !important;
}

html:not(.tw-dark) .beta-form-container {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(177, 137, 88, 0.1);
}

/* Fix form success/error messages in light mode */
html:not(.tw-dark) .form-success {
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: #00833d !important;
}

html:not(.tw-dark) .form-error {
    color: #df1b1b !important;
}

html:not(.tw-dark) .download-link {
    color: #1e88e5 !important;
    background: rgba(30, 136, 229, 0.1);
}