:root {
    /* Color Palette - Premium Dark Mode */
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.7);
    --border-color: rgba(48, 54, 61, 0.8);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-hover: #1f6feb;
    --success: #3fb950;
    --warning: #d29922;
    --error: #f85149;

    /* Glassmorphism Tokens */
    --glass-blur: 12px;
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Shadows */
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    background: radial-gradient(circle at top right, #161b22, #0d1117);
}

/* Background patterns */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.05) 0%, transparent 70%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.portal-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, #8b949e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Options Grid */
.options-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    text-decoration: none;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(88, 166, 255, 0.15);
}

.option-icon {
    width: 40px;
    height: 40px;
    background: rgba(88, 166, 255, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1rem;
    color: var(--accent-color);
}

.option-text h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.option-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.1);
}

.btn-primary {
    width: 100%;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
}

/* Password Complexity Overlay */
.complexity-meter {
    margin-top: 0.5rem;
}

.meter-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* States */
.hidden {
    display: none;
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Collapsible Requirements Accordion */
.requirements-accordion {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.accordion-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.accordion-trigger:hover {
    color: var(--text-primary);
}

#accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.accordion-content.expanded {
    max-height: 200px;
    transition: max-height 0.3s ease-in;
}

.requirements-list {
    list-style: none;
    padding: 0.5rem 0;
}

.requirements-list li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
}

.requirements-list li::before {
    content: "•";
    color: var(--accent-color);
    margin-right: 0.5rem;
}