/**
 * Login Page Styles
 * Modern, clean authentication interface for Circuit SLD Builder
 */

/* ============================================
   Base Reset & Layout
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #191919;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Subtle animated background pattern */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(46, 204, 113, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* ============================================
   Login Container
   ============================================ */
.login-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: white;
    padding: 2.5rem 3rem;
    border-radius: 16px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Accent bar at top */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
}

/* ============================================
   Logo & Branding
   ============================================ */
.logo-link {
    display: block;
    text-align: center;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo {
    max-width: 200px;
    height: auto;
}

/* ============================================
   Typography
   ============================================ */
h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

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

.form-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: #2c3e50;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input::placeholder {
    color: #bdc3c7;
}

.form-input:hover:not(:focus) {
    border-color: #bdc3c7;
}

/* ============================================
   Login Button
   ============================================ */
.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

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

/* ============================================
   Error Message
   ============================================ */
.error-message {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 1px solid #fc8181;
    color: #c53030;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: none;
    animation: shake 0.4s ease-in-out;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================
   Loading Spinner
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* ============================================
   Divider
   ============================================ */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    padding: 0 1rem;
    color: #95a5a6;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Google Sign-In Button
   ============================================ */
.google-btn {
    width: 100%;
    padding: 0.875rem 1rem;
    background: white;
    color: #3c4043;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.google-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #d0d0d0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.google-btn:active:not(:disabled) {
    background: #f1f3f4;
    transform: translateY(1px);
}

.google-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.google-icon {
    flex-shrink: 0;
}

/* ============================================
   Copyright Footer
   ============================================ */
.copyright {
    text-align: center;
    padding: 1.5rem 0 0;
    color: #95a5a6;
    font-size: 0.8rem;
    font-weight: 400;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .logo {
        max-width: 160px;
    }
}

/* ============================================
   High DPI / Retina Adjustments
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-card {
        box-shadow: 
            0 25px 50px -12px rgba(0, 0, 0, 0.2),
            0 0 0 0.5px rgba(255, 255, 255, 0.1);
    }
}

