:root {
    --primary: #0066ff;
    --primary-dark: #0052cc;
    --secondary: #00d4ff;
    --background: #0a0e1a;
    --surface: #151b2e;
    --surface-light: #1e2740;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #2d3a52;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

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

body {
    font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #151b2e 50%, #0a0e1a 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(100, 116, 139, 0.03) 2px, rgba(100, 116, 139, 0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(100, 116, 139, 0.03) 2px, rgba(100, 116, 139, 0.03) 4px);
    pointer-events: none;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 1400px;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--surface);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(0, 102, 255, 0.1);
    min-height: 700px;
}

/* Brand Panel */
.brand-panel {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: slideInLeft 0.8s ease forwards;
}

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

.circuit-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.15) 0%, transparent 50%);
    opacity: 0.6;
}

.circuit-pattern::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.1) 49%, rgba(255, 255, 255, 0.1) 51%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(255, 255, 255, 0.1) 49%, rgba(255, 255, 255, 0.1) 51%, transparent 51%);
    background-size: 60px 60px;
    opacity: 0.3;
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.logo {
    margin-bottom: 2rem;
    animation: rotate 20s linear infinite;
}

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

.logo svg {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.brand-text h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 4rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    font-size: 1.5rem;
}

/* Form Panel */
.form-panel {
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: slideInRight 0.8s ease 0.2s forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-container {
    width: 100%;
    max-width: 460px;
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Messages */
#message-container {
    margin-bottom: 1.5rem;
}

.message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}

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

.message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--background);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: var(--surface-light);
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--secondary);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::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: left 0.5s ease;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.4);
}

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

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

/* Form Footer */
.form-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.form-footer a:hover {
    color: var(--secondary);
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .brand-panel {
        padding: 3rem 2rem;
        min-height: auto;
    }

    .brand-text h1 {
        font-size: 2rem;
    }

    .features {
        margin-top: 2rem;
    }

    .form-panel {
        padding: 3rem 2rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 1rem;
    }

    .brand-panel,
    .form-panel {
        padding: 2rem 1.5rem;
    }

    .brand-text h1 {
        font-size: 1.75rem;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }
}
