/* Login Page Custom Styles */
/* Uses color scheme from main.css */

:root {
    --primary-navy: #1e3a5f;
    --accent-gold: #d4af37;
    --text-dark: #2c3e50;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--primary-navy) 0%, #2c5282 100%);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Floating Particles Background */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(212,175,55,0.8) 0%, rgba(212,175,55,0) 70%);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
    opacity: 0;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    50% {
        transform: translateY(-50vh) translateX(100px) scale(1);
        opacity: 0.8;
    }
    90% {
        opacity: 0.4;
    }
}

.particle:nth-child(1) { left: 10%; width: 20px; height: 20px; animation-delay: 0s; animation-duration: 20s; }
.particle:nth-child(2) { left: 30%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 25s; }
.particle:nth-child(3) { left: 50%; width: 25px; height: 25px; animation-delay: 4s; animation-duration: 18s; }
.particle:nth-child(4) { left: 70%; width: 18px; height: 18px; animation-delay: 6s; animation-duration: 22s; }
.particle:nth-child(5) { left: 90%; width: 22px; height: 22px; animation-delay: 8s; animation-duration: 20s; }
.particle:nth-child(6) { left: 20%; width: 16px; height: 16px; animation-delay: 3s; animation-duration: 24s; }
.particle:nth-child(7) { left: 40%; width: 20px; height: 20px; animation-delay: 5s; animation-duration: 19s; }
.particle:nth-child(8) { left: 60%; width: 24px; height: 24px; animation-delay: 7s; animation-duration: 21s; }
.particle:nth-child(9) { left: 80%; width: 19px; height: 19px; animation-delay: 9s; animation-duration: 23s; }
.particle:nth-child(10) { left: 15%; width: 21px; height: 21px; animation-delay: 1s; animation-duration: 22s; }

/* Login Wrapper */
.login-wrapper {
    position: relative;
    z-index: 10;
    padding: 20px;
}

/* Login Card */
.login-card {
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.8s ease-out;
}

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

.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212,175,55,0.05) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

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

/* Login Header */
.login-header {
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.logo-container {
    margin-bottom: 15px;
    animation: fadeIn 1s ease-out;
}

.login-logo {
    height: 80px;
    width: auto;
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.login-title {
    font-family: 'Playfair Display', serif;
    color: var(--primary-navy);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    animation: fadeIn 1s ease-out 0.2s backwards;
}

.login-subtitle {
    color: var(--text-dark);
    font-size: 1rem;
    opacity: 0.8;
    animation: fadeIn 1s ease-out 0.4s backwards;
}

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

/* Login Form */
.login-form {
    position: relative;
    z-index: 2;
}

.form-label {
    color: var(--primary-navy);
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.form-label i {
    color: var(--accent-gold);
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 45px 14px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--bg-light);
}

.form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 0.2rem rgba(212,175,55,0.25);
    background-color: var(--white);
    outline: none;
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-gold);
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.form-control:focus ~ .input-icon {
    opacity: 1;
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-navy);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    z-index: 10;
}

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

/* Form Options */
.form-options {
    font-size: 0.9rem;
}

.form-check-input {
    border-color: var(--accent-gold);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
}

.form-check-label {
    color: var(--text-dark);
    cursor: pointer;
}

.forgot-password {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-navy);
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #c9a02c 100%);
    color: var(--primary-navy);
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(30, 58, 95, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212,175,55,0.4);
}

.btn-text, .btn-icon {
    position: relative;
    z-index: 1;
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
    transform: translateX(5px);
}

/* Divider */
.login-divider {
    position: relative;
    text-align: center;
    margin: 30px 0;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #e0e0e0;
}

.login-divider span {
    position: relative;
    background-color: var(--white);
    padding: 0 15px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Social Login Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-social {
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px solid transparent;
}

.btn-google {
    background-color: var(--white);
    border-color: #e0e0e0;
    color: #333;
}

.btn-google:hover {
    background-color: #f8f9fa;
    border-color: #4285f4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.2);
}

.btn-google i {
    color: #4285f4;
}

.btn-facebook {
    background-color: var(--white);
    border-color: #e0e0e0;
    color: #333;
}

.btn-facebook:hover {
    background-color: #f8f9fa;
    border-color: #1877f2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.2);
}

.btn-facebook i {
    color: #1877f2;
}

/* Signup Link */
.signup-link p {
    color: var(--text-dark);
    margin: 0;
}

.signup-link a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: var(--primary-navy);
    text-decoration: underline;
}

/* Back to Home */
.btn-back {
    color: var(--primary-navy);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back:hover {
    color: var(--accent-gold);
    transform: translateX(-5px);
}

.btn-back i {
    transition: transform 0.3s ease;
}

.btn-back:hover i {
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 40px 30px;
        border-radius: 15px;
    }

    .login-title {
        font-size: 1.8rem;
    }

    .login-subtitle {
        font-size: 0.9rem;
    }

    .login-logo {
        height: 60px;
    }

    .form-control {
        padding: 12px 40px 12px 18px;
        font-size: 0.95rem;
    }

    .btn-login {
        padding: 13px 25px;
        font-size: 1rem;
    }

    .social-login {
        gap: 12px;
    }

    .btn-social {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .login-wrapper {
        padding: 15px;
    }

    .login-card {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 1.6rem;
    }

    .login-logo {
        height: 50px;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-control {
        padding: 12px 35px 12px 15px;
        font-size: 0.9rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    .btn-login {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

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

.btn-login.loading .btn-text::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid var(--primary-navy);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Error State */
.form-control.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.3s ease;
}

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