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

/* OpenClaw Color Scheme */
/* Primary: Deep Red (#8B0000) */
/* Secondary: Dark Gray (#2F2F2F) */
/* Accent: Light Gray (#F0F0F0) */
/* Background: Almost Black (#1A1A1A) */
/* Text: White/Light Gray */

:root {
    --primary-red: #8B0000;
    --dark-gray: #2F2F2F;
    --light-gray: #F0F0F0;
    --almost-black: #1A1A1A;
    --white: #FFFFFF;
    --light-text: #E0E0E0;
    --gray-text: #B0B0B0;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, var(--almost-black) 0%, var(--dark-gray) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--white);
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-box {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(139, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-red), #B22222);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.subtitle {
    color: var(--light-text);
    font-size: 1.125rem;
    font-weight: 400;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    background: rgba(47, 47, 47, 0.8);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(139, 0, 0, 0.2);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-text);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    color: var(--white);
    background: rgba(139, 0, 0, 0.2);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-red), #B22222);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-panel {
    animation: fadeIn 0.5s ease;
}

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

.form-panel.active {
    display: block;
}

.form-panel:not(.active) {
    display: none;
}

h2 {
    color: var(--white);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light-text);
    font-size: 0.875rem;
}

input[type="email"],
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(139, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(47, 47, 47, 0.6);
    color: var(--white);
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.2);
    background: rgba(47, 47, 47, 0.8);
}

.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    padding-right: 2.5rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--gray-text);
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--light-text);
}

.eye-icon {
    font-size: 1.125rem;
}

.password-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-text);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--light-text);
    cursor: pointer;
}

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

.forgot-password {
    display: block;
    text-align: right;
    font-size: 0.875rem;
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    text-decoration: underline;
    color: #B22222;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, var(--primary-red), #B22222);
    border: none;
    border-radius: 10px;
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 0, 0, 0.4);
}

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

.submit-btn::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;
}

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

.divider-text {
    text-align: center;
    color: var(--gray-text);
    font-size: 0.875rem;
    margin: 1.5rem 0;
    position: relative;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(139, 0, 0, 0.3);
}

.divider-text::before {
    left: 0;
}

.divider-text::after {
    right: 0;
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border: 2px solid rgba(139, 0, 0, 0.3);
    border-radius: 10px;
    background: rgba(47, 47, 47, 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--light-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--primary-red);
    background: rgba(47, 47, 47, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-btn.email:hover {
    background: rgba(139, 0, 0, 0.2);
}

.social-btn svg {
    width: 18px;
    height: 18px;
    color: var(--white);
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--gray-text);
    font-size: 0.875rem;
}

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

.auth-footer a:hover {
    text-decoration: underline;
    color: #B22222;
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-box {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .social-btn {
        justify-content: center;
    }
}

/* Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(139, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.4); }
}

.submit-btn:active {
    animation: pulse 0.8s;
}

/* Focus states for accessibility */
input:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}