/* Base Styles and Variables */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --border-color-light: #f3f4f6;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;
    
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Typography */
h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
}

p {
    color: var(--text-secondary);
}

/* Buttons - Base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

/* Button Variants */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #db2777;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-social {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    flex: 1;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.btn-social:hover {
    background-color: var(--border-color-light);
    border-color: var(--primary-color);
}

.btn-google::before {
    content: "🔍 ";
    margin-right: 0.5rem;
}

.btn-github::before {
    content: "⚙️ ";
    margin-right: 0.5rem;
}

/* Link Button */
.link-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    padding: 0;
    text-decoration: none;
    transition: var(--transition-fast);
}

.link-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"] {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: var(--font-sans);
    transition: var(--transition-fast);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-field input[type="text"]:focus,
.form-field input[type="email"]:focus,
.form-field input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-field input[type="text"]::placeholder,
.form-field input[type="email"]::placeholder,
.form-field input[type="password"]::placeholder {
    color: var(--text-light);
}

.form-error {
    display: none;
    font-size: var(--font-size-xs);
    color: var(--error-color);
    margin-top: 0.25rem;
}

.form-field.error input,
.form-field.error .password-field input {
    border-color: var(--error-color);
}

.form-field.error .form-error {
    display: block;
}

/* Checkbox & Radio */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

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

/* Password Field */
.password-field {
    display: flex;
    align-items: center;
    position: relative;
}

.password-field input {
    flex: 1;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-light);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.toggle-password span {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Password Requirements */
.password-requirements {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.req-item {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    transition: var(--transition-fast);
}

.req-item.met {
    color: var(--success-color);
}

/* Divider */
.divider {
    text-align: center;
    color: var(--text-light);
    font-size: var(--font-size-sm);
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    z-index: -1;
}

.divider::after {
    content: attr(data-content);
    background-color: var(--bg-primary);
    padding: 0 1rem;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    gap: 1rem;
}

.social-buttons .btn {
    flex: 1;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

.alert.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert.info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert.warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: var(--font-size-sm);
    }

    .social-buttons {
        gap: 0.75rem;
    }
}
