/* Basis-Styles */
:root {
    --primary-color: #1a73e8;
    --primary-hover: #1557b0;
    --bg-color: #1a1b1e;
    --container-bg: rgba(45, 46, 50, 0.95);
    --input-bg: #2d2e32;
    --text-color: #ffffff;
    --text-muted: #999;
    --border-color: #333;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

/* Auth Page Layout */
.auth-page {
    min-height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: linear-gradient(rgba(26, 27, 30, 0.8), rgba(26, 27, 30, 0.9)),
                url('/assets/background.jpg') center/cover no-repeat fixed;
    overflow: auto;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    margin: auto;
    background: var(--container-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

/* Header Styles */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header img {
    width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* Button Styles */
.submit-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

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

/* Navigation Link */
.back-to-home {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--container-bg);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.back-to-home:hover {
    background: rgba(45, 46, 50, 1);
    transform: translateY(-1px);
}

/* Helper Classes */
.error-message {
    color: #ff4444;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    background: transparent;
    padding: 0;
}

.success-message {
    color: #00C851;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    background: transparent;
    padding: 0;
}

.switch-form {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.switch-form a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.switch-form a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Loading Spinner */
.spinner {
    display: none;
    width: 30px;
    height: 30px;
    margin: 1rem auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .auth-page {
        padding: 1rem;
    }

    .auth-container {
        padding: 1.5rem;
    }

    .back-to-home {
        top: 1rem;
        left: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .auth-header img {
        width: 100px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-group input {
        padding: 0.6rem 0.8rem;
    }

    .submit-btn {
        padding: 0.6rem;
    }

    .auth-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

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

    .auth-header h1 {
        font-size: 1.25rem;
    }

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

@media (max-height: 600px) {
    .auth-page {
        align-items: flex-start;
        padding: 2rem 0;
    }
    
    .auth-container {
        margin: auto;
    }
}