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

:root {
    --primary-red: #dc2626;
    --primary-red-dark: #b91c1c;
    --primary-red-light: #ef4444;
    --red-primary: #dc2626;
    --red-light: #ef4444;
    --red-dark: #b91c1c;
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --border-color: #262626;
    --discord-blue: #5865F2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Grid Background - Matching speedfn.xyz */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: -1;
}

.stars-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(220, 38, 38, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.06) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 1;
}

.stars-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(220, 38, 38, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(220, 38, 38, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 60% 40%, rgba(220, 38, 38, 0.02) 0%, transparent 50%);
    opacity: 1;
}

/* Header */
header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo-link {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-red);
    text-decoration: none;
    letter-spacing: 2px;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

/* Main Container */
main {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
}

.login-wrapper {
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: center;
}

/* Login Card */
.login-card {
    background: linear-gradient(135deg, rgba(66, 0, 0, 0.1) 0%, rgba(61, 1, 1, 0.15) 100%);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    padding: 50px 40px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(80, 0, 0, 0.123), 0 0 0 1px rgba(220, 38, 38, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.5), rgba(239, 68, 68, 0.3));
    border-radius: 16px;
    z-index: -1;
    opacity: 0.5;
    filter: blur(20px);
}

/* Logo */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.brand-logo {
    max-width: 120px;
    height: auto;
    object-fit: contain;
    animation: pulseGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.5));
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.5));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.8)) drop-shadow(0 0 30px rgba(220, 38, 38, 0.4));
    }
}

/* Title */
.card-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.card-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 40px;
}

/* Step Buttons */
.step-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.step-btn {
    flex: 1;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.step-btn.active {
    background: rgba(220, 38, 38, 0.2);
    border-color: var(--red-light);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.step-btn .step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

.step-btn span {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

/* Discord Connect Button */
.discord-connect-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    margin-bottom: 25px;
}

.discord-connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
    background: linear-gradient(135deg, var(--red-light), var(--primary-red));
}

.discord-connect-btn:active {
    transform: translateY(0);
}

.discord-connect-btn svg {
    width: 24px;
    height: 24px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: var(--text-secondary);
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(220, 38, 38, 0.3);
}

.divider span {
    padding: 0 15px;
}

/* Instruction Text */
.instruction-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 20px;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* Discord Connected Status */
.discord-connected-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
    color: #10b981;
    font-size: 14px;
}

.discord-connected-status svg {
    flex-shrink: 0;
}

/* License Form */
.license-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.license-input {
    width: 100%;
    padding: 14px 20px;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
}

.license-input:focus {
    outline: none;
    border-color: var(--red-light);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

.license-input::placeholder {
    color: var(--text-secondary);
}

.submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
    background: linear-gradient(135deg, var(--red-light), var(--primary-red));
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    color: #10b981;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.success-message.show {
    display: block;
}

/* Auth Toggle Button (Bottom Left) */
.auth-toggle-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.auth-toggle-btn:hover {
    background: rgba(220, 38, 38, 0.3);
    border-color: var(--red-light);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.auth-toggle-btn:active {
    transform: scale(0.95);
}

/* Username Login Card */
.username-login-card {
    background: linear-gradient(135deg, rgba(66, 0, 0, 0.1) 0%, rgba(61, 1, 1, 0.15) 100%);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.username-login-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.username-login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.username-input {
    width: 100%;
    padding: 14px 20px;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
}

.username-input:focus {
    outline: none;
    border-color: var(--red-light);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
}

.username-input::placeholder {
    color: var(--text-secondary);
}


