@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-deep: #05070a;
    --bg-surface: rgba(13, 17, 23, 0.8);
    --accent-primary: #00f2ff;
    --accent-secondary: #7000ff;
    --text-main: #e2e8f0;
    --text-dim: #94a3b8;
    --border-glow: rgba(0, 242, 255, 0.2);
    --success: #00ff9d;
    --warning: #ffb800;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Premium Cyber-Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    perspective: 1000px;
    transform: perspective(500px) rotateX(60deg) translateY(-20%) translateZ(0);
    mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent);
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

/* Drifting Light Orbs */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(112, 0, 255, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 242, 255, 0.15) 0%, transparent 40%);
    filter: blur(60px);
    z-index: -2;
    animation: drift 15s ease-in-out infinite alternate;
}

@keyframes gridMove {
    from { background-position: 0 0; }
    to { background-position: 0 1000px; }
}

@keyframes drift {
    0% { transform: translate(-5%, -5%) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid var(--border-glow);
    padding: 8px 16px;
    border-radius: 100px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 10px var(--accent-primary);
    animation: blink 2s infinite;
}

header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 64px;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header h1 span {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
}

.subtitle {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Dashboard Card */
.terminal-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.terminal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

/* Form Styles */
.input-section {
    margin-bottom: 32px;
}

.input-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

input[type="text"], input[type="email"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 24px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 242, 255, 0.02);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.1);
}

/* Module Selection */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.module-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 16px;
    user-select: none;
}

.module-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-4px);
}

.module-card.active {
    background: rgba(0, 242, 255, 0.05);
    border-color: var(--accent-primary);
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.1);
}

.module-card input {
    display: none;
}

.module-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.active .module-checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.module-checkbox::after {
    content: '✓';
    color: var(--bg-deep);
    font-size: 14px;
    font-weight: 900;
    display: none;
}

.active .module-checkbox::after {
    display: block;
}

.module-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 500;
}

/* Launch Button */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    border-radius: 16px;
    padding: 24px;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 60px rgba(112, 0, 255, 0.4);
    margin-top: 20px;
}

.btn-primary:hover:not(:disabled) {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 30px 80px rgba(112, 0, 255, 0.6);
    filter: brightness(1.1);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Footer Stats */
.footer-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-primary);
}

/* Progress Section */
.progress-container {
    margin-top: 40px;
    display: none;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.progress-bar-bg {
    background: rgba(255, 255, 255, 0.05);
    height: 6px;
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px var(--accent-primary);
}

/* Animations */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    header h1 { font-size: 44px; }
    .modules-grid { grid-template-columns: 1fr; }
    .footer-stats { grid-template-columns: 1fr 1fr; }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: -400px;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--accent-primary);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 20px 40px rgba(0, 242, 255, 0.2);
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    width: 380px;
    max-width: calc(100vw - 40px);
}

.toast-container.show {
    right: 30px;
}

.toast-icon {
    font-size: 24px;
}

.toast-content {
    flex-grow: 1;
}

#toast-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

#toast-message {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s;
}

.toast-close:hover {
    color: #fff;
}
