:root {
    --bg-app: #09090b;
    --bg-panel: #18181b;
    --bg-secondary: #18181b;
    --bg-tertiary: #27272a;
    --bg-input: #27272a;
    --bg-hover: #3f3f46;

    --border: #3f3f46;
    --border-active: #52525b;

    --text-main: #fafafa;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;

    --accent: #f59e0b;
    /* Orange/Yellow as requested */
    --accent-hover: #d97706;

    --danger: #ef4444;
    --success: #22c55e;
    --warning: #eab308;

    --radius: 8px;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    height: 64px;
    border-bottom: 1px solid var(--border);
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.02em;
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 14px;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -23px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

/* Layout */
.main-content {
    min-height: calc(100vh - 64px);
    padding: 40px 0;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.container.narrow {
    max-width: 500px;
}

.empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px !important;
}

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    border: 1px solid transparent;
    transition: all 0.2s;
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    /* Contrast for orange/yellow */
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-secondary {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background: var(--bg-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

input,
textarea {
    width: 100%;
    background: var(--bg-app);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Login/Auth */
.login-screen,
.auth-prompt {
    text-align: center;
    padding: 60px 40px;
    background: rgba(24, 24, 27, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 440px;
    margin: 80px auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.login-screen::before,
.auth-prompt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #f5d0fe);
}

.login-screen h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.login-screen p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.6;
}

/* Portal Grid */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.portal-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.portal-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
}

.portal-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.portal-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.card-action {
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.discord-widget-card {
    margin: 40px auto 0;
    padding: 32px;
    max-width: 420px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.discord-widget-header {
    text-align: center;
    margin-bottom: 20px;
}

.discord-widget-header h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.discord-widget-header p {
    line-height: 1.6;
}

.discord-widget-frame {
    display: flex;
    justify-content: center;
}

.discord-widget-frame iframe {
    width: 100%;
    max-width: 350px;
    border-radius: 14px;
    min-height: 500px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Additional Button Styles */
.btn-success {
    background: var(--success);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: white;
}

.verify-container {
    text-align: center;
    padding: 80px 20px 60px;
    max-width: 480px;
    margin: 0 auto;
}

.verify-icon-wrap {
    width: 72px;
    height: 72px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.verify-shield {
    width: 36px;
    height: 36px;
    color: var(--accent);
}

.verify-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.verify-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 32px;
    font-weight: 400;
}

.verify-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin: 0 auto;
}

.verify-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.verify-user {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--bg-app);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.verify-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.verify-user .user-name {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-main);
}

.verify-hint {
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 16px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
}

.btn-block {
    width: 100%;
}

.verify-status {
    text-align: center;
    padding: 16px 0;
}

.verify-status h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.verify-status p {
    margin-bottom: 6px;
    font-size: 14px;
    white-space: pre-line;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.verify-check {
    width: 52px;
    height: 52px;
    background: var(--success);
    border-radius: 50%;
    position: relative;
    margin: 0 auto 16px;
    animation: scaleIn 0.3s ease;
}

.verify-check::after {
    content: '';
    position: absolute;
    left: 18px;
    top: 12px;
    width: 14px;
    height: 26px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.verify-x {
    width: 52px;
    height: 52px;
    background: var(--danger);
    border-radius: 50%;
    position: relative;
    margin: 0 auto 16px;
}

.verify-x::before,
.verify-x::after {
    content: '';
    position: absolute;
    left: 24px;
    top: 13px;
    width: 3px;
    height: 26px;
    background: white;
    border-radius: 2px;
}

.verify-x::before {
    transform: rotate(45deg);
}

.verify-x::after {
    transform: rotate(-45deg);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.verify-status.success h3 {
    color: var(--success);
}

.verify-status.error h3 {
    color: var(--danger);
}

/* Back Button Style */
.btn-text {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.btn-text:hover {
    border-color: var(--text-dim);
    color: var(--text-main);
    background: var(--bg-hover);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-app);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* User Identity Styling */
.user-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-input);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.user-identity img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.user-info span:first-child,
#discordDisplayName,
#robloxDisplayName {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-main);
}

.user-info span:nth-child(2),
#discordHandle,
#robloxHandle {
    color: var(--text-muted);
    font-size: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.2);
    width: fit-content;
    margin-top: 4px;
}

/* Ensure hidden still works with higher specificity if needed */
/* Ensure hidden still works with higher specificity if needed */
.user-identity.hidden {
    display: none !important;
}

/* PREMIUM APPEAL STYLES */
.premium-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.4s ease-out;
}

.premium-card.centered {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-circle {
    width: 64px;
    height: 64px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.guidelines-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.warning-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 1rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.warning-box a {
    color: #fecaca;
}

.requirement-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.requirement-badge {
    min-width: 84px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 700;
}

.requirement-badge.ready {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
}

.requirement-badge.blocked {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fecaca;
}

/* Accordion */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
}

.faq-item[open] summary::after {
    content: '-';
}

.faq-item p {
    padding: 0 1rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Checkboxes */
.agreement-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
    color: var(--text-secondary);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.2s;
}

.checkbox-container:hover input~.checkmark {
    border-color: var(--primary);
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Quiz Styles */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quiz-options label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-options label:hover {
    background: var(--bg-hover);
    border-color: var(--text-dim);
}

.quiz-options label:has(input:checked) {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent);
}

/* Hide default radio but keep accessible */
.quiz-options input[type="radio"] {
    width: 1.25em;
    height: 1.25em;
    accent-color: var(--accent);
}

/* Progress Bar Redesign */
.progress-steps {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    height: 4px;
    width: 100%;
}

.step {
    flex: 1;
    height: 100%;
    background: var(--bg-tertiary);
    border-radius: 2px;
    /* Remove text/circles */
    color: transparent;
    font-size: 0;
    display: block;
    width: auto;
}

.step.active {
    background: var(--accent);
    color: transparent;
}

.step-line {
    display: none;
    /* remove old lines */
}

/* Modal System */
#modalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#modalOverlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

#modalOverlay.visible .modal-card {
    transform: scale(1);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.modal-message {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.bg-darker {
    background: var(--bg-tertiary) !important;
}

.font-bold {
    font-weight: 600;
}

.text-white {
    color: white;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.p-4 {
    padding: 1rem;
}

.rounded {
    border-radius: var(--radius);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}
