/* Modern Authentication Page Styles */

:root {
    --auth-primary: #2196f3;
    --auth-primary-dark: #1976d2;
    --auth-primary-light: #64b5f6;
    --auth-bg: #080321;
    --auth-card-bg: #051726;
    --auth-text: white;
    --auth-text-muted: #9aa0b4;
    --auth-border: rgba(33, 150, 243, 0.2);
    --auth-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --auth-radius: 20px;
    --auth-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    --auth-gradient: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.dark-theme {
    --auth-bg: #f8f9fa;
    --auth-card-bg: #ffffff;
    --auth-text: #080321;
    --auth-text-muted: #6b7280;
    --auth-border: rgba(33, 150, 243, 0.15);
    --auth-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* Main Container */
.auth-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.03) 0%, transparent 50%, rgba(33, 150, 243, 0.03) 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.05) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

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

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 650px;
}

/* Form Wrapper */
.auth-form-wrapper {
    background: var(--auth-card-bg);
    border-radius: var(--auth-radius);
    padding: 3rem 3.5rem;
    box-shadow: var(--auth-shadow);
    border: 2px solid var(--auth-border);
    backdrop-filter: blur(20px);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-100%) scale(0.9);
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.auth-form-wrapper.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: all;
    position: relative;
}

.auth-form-wrapper.exit-left {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
}

.auth-form-wrapper.exit-right {
    transform: translateX(-100%) scale(0.9);
    opacity: 0;
}

.auth-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--auth-gradient);
}

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

.auth-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--auth-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(33, 150, 243, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.auth-icon i {
    font-size: 2.5rem;
    color: white;
}

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

.auth-header p {
    color: var(--auth-text-muted);
    font-size: 1rem;
}

/* Form */
.auth-form {
    margin-bottom: 2rem;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.form-group label i {
    color: var(--auth-primary);
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(33, 150, 243, 0.05);
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    color: var(--auth-text);
    font-size: 1rem;
    font-family: 'Marhey', cursive;
    transition: all var(--auth-transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: rgba(33, 150, 243, 0.08);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
    transform: translateY(-2px);
}

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

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

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

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

.checkbox-label a {
    color: var(--auth-primary);
    text-decoration: none;
    transition: color var(--auth-transition);
}

.checkbox-label a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.forgot-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--auth-transition);
}

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

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 1.125rem 2rem;
    background: var(--auth-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--auth-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 8px 20px rgba(33, 150, 243, 0.3);
    font-family: 'Marhey', cursive;
}

.auth-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(33, 150, 243, 0.4);
}

.auth-submit-btn:active {
    transform: translateY(-1px);
}

.auth-submit-btn i {
    font-size: 1.1rem;
    transition: transform var(--auth-transition);
}

.auth-submit-btn:hover i {
    transform: translateX(-4px);
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--auth-border);
}

.divider span {
    position: relative;
    background: var(--auth-card-bg);
    padding: 0 1rem;
    color: var(--auth-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* OAuth Section */
.oauth-section {
    text-align: center;
    margin-bottom: 2rem;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 2rem;
    border: 2px solid var(--auth-border);
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--auth-transition);
    font-family: 'Marhey', cursive;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.oauth-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;
}

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

.oauth-btn img,
.oauth-btn i {
    width: 24px;
    height: 24px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.oauth-btn span {
    flex: 1;
    text-align: center;
}

/* OAuth Button Styles */
.google-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #3c4043;
    border-color: #dadce0;
}

.google-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8eaed 100%);
    border-color: #c4c7c5;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.3);
}

.github-btn {
    background: linear-gradient(135deg, #24292e 0%, #1a1f24 100%);
    color: #ffffff;
    border-color: #24292e;
}

.github-btn:hover {
    background: linear-gradient(135deg, #1a1f24 0%, #0d1117 100%);
    border-color: #1a1f24;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.microsoft-btn {
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
    color: #ffffff;
    border-color: #0078d4;
}

.microsoft-btn:hover {
    background: linear-gradient(135deg, #005a9e 0%, #004578 100%);
    border-color: #005a9e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 120, 212, 0.4);
}

.dark-theme .google-btn {
    background: linear-gradient(135deg, #3c4043 0%, #202124 100%);
    color: #e8eaed;
    border-color: #5f6368;
}

.dark-theme .google-btn:hover {
    background: linear-gradient(135deg, #202124 0%, #1a1c1f 100%);
    border-color: #3c4043;
}

/* OAuth Info */
.oauth-info {
    margin-bottom: 2rem;
}

.oauth-note,
.oauth-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--auth-text-muted);
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: rgba(33, 150, 243, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(33, 150, 243, 0.1);
}

.oauth-note i,
.oauth-privacy i {
    color: var(--auth-primary);
    font-size: 1rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-border);
}

.auth-footer p {
    color: var(--auth-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

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

.auth-footer a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-border);
}

.auth-switch p {
    color: var(--auth-text-muted);
    font-size: 0.95rem;
}

.auth-switch a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 700;
    transition: color var(--auth-transition);
}

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

/* Decorative Elements */
.auth-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: 5s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .auth-container {
        max-width: 550px;
    }

    .auth-form-wrapper {
        padding: 2.5rem 2.5rem;
    }
}

@media (max-width: 768px) {
    .auth-page {
        padding: 2rem 1rem;
    }

    .auth-container {
        max-width: 500px;
    }

    .auth-form-wrapper {
        padding: 2.5rem 2rem;
    }

    .auth-header h2 {
        font-size: 1.75rem;
    }

    .auth-icon {
        width: 70px;
        height: 70px;
    }

    .auth-icon i {
        font-size: 2rem;
    }

    .social-login {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 1.5rem 0.75rem;
    }

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

    .auth-form-wrapper {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

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

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

    .auth-header p {
        font-size: 0.9rem;
    }

    .auth-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .auth-icon i {
        font-size: 1.75rem;
    }

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

    .form-group input {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .auth-submit-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .social-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 1200px) {
    .auth-container {
        max-width: 700px;
    }

    .auth-form-wrapper {
        padding: 3.5rem 4rem;
    }
}

/* Loading State */
.auth-submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-submit-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
}

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

/* Success Animation */
@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(76, 175, 80, 0);
    }
}

.auth-submit-btn.success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    animation: successPulse 0.6s ease-out;
}

/* Error State */
.form-group.error input {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.05);
}

.form-group .error-message {
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group .error-message i {
    font-size: 0.9rem;
}