/* Global Styles */
:root {
    --csc-blue: #002e5d;
    --csc-light-blue: #0056b3;
    --csc-accent: #00a0df;
    --csc-green: #28a745;
    --csc-red: #dc3545;
    --csc-yellow: #ffc107;
    --csc-gray: #6c757d;
    --csc-light-gray: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

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

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(145deg, #000c1a 0%, #002a4a 40%, #004a7a 100%);
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Login & Reset Pages - EXACT same container styling */
.login-container, 
.reset-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px 25px;
    width: 100%;
    max-width: 360px;
    animation: fadeIn 0.5s ease;
}

/* Hide scrollbar for cleaner look */
.login-container::-webkit-scrollbar,
.reset-container::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
}

/* Logo - exact same size, no stretching */
.logo-container img {
    max-width: 160px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Headers - exact same font size */
h2 {
    color: var(--csc-blue);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Subtitle for forgot password page */
.subtitle {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: normal;
    padding: 0 5px;
}

.subtitle i {
    color: var(--csc-blue);
    opacity: 0.7;
    margin-right: 5px;
}

/* Centered SSL Secure Message */
.ssl-secure-message {
    text-align: center;
    margin: 0 auto 20px auto;
    color: #4CAF50;
    font-size: 0.65rem;
    letter-spacing: 0.3px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: rgba(0, 160, 223, 0.05);
    border-radius: 30px;
    width: fit-content;
}

.ssl-secure-message i {
    font-size: 0.6rem;
    color: var(--csc-green);
}

.ssl-secure-message i.fa-shield-alt {
    color: var(--csc-accent);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.85rem; /* Reduced from 0.9rem */
    font-weight: 500;
}

label i {
    color: var(--csc-blue);
    margin-right: 5px;
    font-size: 0.85rem; /* Match label size */
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: var(--csc-accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 160, 223, 0.1);
}

/* Caps Lock Warning */
.caps-warning {
    display: none;
    color: var(--csc-yellow);
    font-size: 0.75rem;
    margin-top: 4px;
    padding: 5px 10px;
    background-color: #fff3cd;
    border-radius: 4px;
    border-left: 3px solid var(--csc-yellow);
}

.caps-warning i {
    margin-right: 5px;
}

/* Password Strength Meter */
.password-strength {
    margin-top: 8px;
    font-size: 0.85rem;
}

.strength-meter {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}

.strength-bar.weak { background: #ff4444; width: 20%; }
.strength-bar.fair { background: #ffbb33; width: 40%; }
.strength-bar.good { background: #00C851; width: 60%; }
.strength-bar.strong { background: #007E33; width: 80%; }
.strength-bar.excellent { background: #003355; width: 100%; }

#strengthText {
    font-size: 0.8rem;
    color: #666;
}

/* Remember Me Checkbox */
.remember-me {
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.remember-me label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
    font-size: 0.85rem; /* Match reduced label size */
    margin-bottom: 0;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(145deg, #000c1a, #002a4a, #004a7a);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    background: linear-gradient(145deg, #001a33, #003355, #005a8c);
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.btn i {
    font-size: 0.9rem;
}

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

/* Links - Forgot Password & Back to Login */
.forgot-password,
.back-to-login {
    text-align: center;
    margin: 15px 0 5px;
}

.forgot-password a,
.back-to-login a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
}

.forgot-password a:hover,
.back-to-login a:hover {
    color: var(--csc-blue);
}

.forgot-password i,
.back-to-login i {
    margin-right: 5px;
    font-size: 0.85rem;
}

/* Back to Home Button */
.back-to-home {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid transparent;
}

.btn-home:hover {
    color: #fff;
    background: linear-gradient(145deg, #000c1a, #002a4a, #004a7a);
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.btn-home i {
    margin-right: 5px;
    font-size: 0.8rem;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert i {
    font-size: 1rem;
}

/* Login/Reset Footer */
.login-footer,
.reset-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.7rem;
    color: #999;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.login-footer i,
.reset-footer i {
    color: var(--csc-blue);
    margin-right: 5px;
    font-size: 0.65rem;
}

.login-footer p,
.reset-footer p {
    margin: 3px 0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container, 
    .reset-container {
        padding: 25px 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .login-container, 
    .reset-container {
        padding: 20px 15px;
    }
    
    .logo-container img {
        max-width: 140px;
    }
    
    h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .subtitle {
        font-size: 0.8rem;
        margin-bottom: 15px;
    }
    
    .ssl-secure-message {
        font-size: 0.6rem;
        margin-bottom: 15px;
        padding: 5px 10px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    label {
        font-size: 0.8rem; /* Smaller on mobile */
        margin-bottom: 4px;
    }
    
    label i {
        font-size: 0.8rem;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .btn i {
        font-size: 0.85rem;
    }
    
    .remember-me {
        margin: 12px 0;
    }
    
    .remember-me label {
        font-size: 0.8rem;
    }
    
    .forgot-password a,
    .back-to-login a {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .forgot-password i,
    .back-to-login i {
        font-size: 0.8rem;
    }
    
    .back-to-home {
        margin-top: 15px;
        padding-top: 15px;
    }
    
    .btn-home {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .btn-home i {
        font-size: 0.75rem;
    }
    
    .login-footer,
    .reset-footer {
        margin-top: 15px;
        padding-top: 12px;
        font-size: 0.65rem;
    }
}

@media (max-width: 360px) {
    .login-container, 
    .reset-container {
        padding: 15px 12px;
    }
    
    .logo-container img {
        max-width: 120px;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .subtitle {
        font-size: 0.75rem;
    }
    
    label {
        font-size: 0.75rem;
    }
    
    label i {
        font-size: 0.75rem;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 8px;
        font-size: 0.85rem;
    }
}