/* ==============================================
   BALLARI INSTITUTE OF TECHNOLOGY
   Authentication Styles - Matching Website Theme
   Navy Blue (#3d4e68) + Gold (#c9a961)
   ============================================== */

/* Color Palette - Extracted from BIT Website */
:root {
    --bit-navy: #3d4e68;
    --bit-navy-dark: #2d3e50;
    --bit-navy-light: #4d5e78;
    --bit-gold: #c9a961;
    --bit-gold-dark: #b89951;
    --bit-gold-light: #d9b971;
    --bit-white: #ffffff;
    --bit-light-bg: #f8f9fa;
    --bit-text-dark: #2c3e50;
    --bit-text-light: #ffffff;
    --bit-success: #4CAF50;
    --bit-success-dark: #388E3C;
    --bit-error: #e74c3c;
    --bit-error-dark: #c0392b;
    --bit-shadow: rgba(61, 78, 104, 0.15);
    --bit-shadow-dark: rgba(61, 78, 104, 0.3);
    --bit-overlay: rgba(61, 78, 104, 0.85);
}

/* ==============================================
   NOTIFICATION STYLES
   ============================================== */

.notification {
    position: fixed;
    top: -100px;
    right: 20px;
    background: var(--bit-white);
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--bit-shadow-dark);
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 320px;
    max-width: 500px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 169, 97, 0.2);
}

.notification.show {
    top: 30px;
    animation: slideInBounce 0.6s ease-out;
}

@keyframes slideInBounce {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    60% {
        transform: translateY(10px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.notification-success {
    border-left: 5px solid var(--bit-success);
    background: linear-gradient(135deg, var(--bit-white) 0%, #f1f8f4 100%);
}

.notification-success .notification-icon {
    background: linear-gradient(135deg, var(--bit-success) 0%, var(--bit-success-dark) 100%);
    color: white;
}

.notification-error {
    border-left: 5px solid var(--bit-error);
    background: linear-gradient(135deg, var(--bit-white) 0%, #fef1f0 100%);
}

.notification-error .notification-icon {
    background: linear-gradient(135deg, var(--bit-error) 0%, var(--bit-error-dark) 100%);
    color: white;
}

.notification-info {
    border-left: 5px solid var(--bit-navy);
    background: linear-gradient(135deg, var(--bit-white) 0%, #f0f2f5 100%);
}

.notification-info .notification-icon {
    background: linear-gradient(135deg, var(--bit-navy) 0%, var(--bit-navy-dark) 100%);
    color: white;
}

.notification-message {
    flex: 1;
    color: var(--bit-text-dark);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
}

/* ==============================================
   ADMIN NOTIFICATION STYLES
   ============================================== */

.admin-notification {
    position: fixed;
    top: -100px;
    right: 20px;
    background: var(--bit-white);
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--bit-shadow-dark);
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 320px;
    max-width: 500px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 169, 97, 0.2);
}

.admin-notification.show {
    top: 90px; /* Below admin header */
    animation: slideInBounce 0.6s ease-out;
}

/* ==============================================
   MODAL STYLES (BIT Navy Blue & Gold Theme)
   ============================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bit-overlay);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bit-white);
    padding: 40px;
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUpScale 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-top: 5px solid var(--bit-gold);
}

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

.modal-content h2 {
    margin-bottom: 25px;
    color: var(--bit-navy);
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.modal-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--bit-gold) 0%, var(--bit-gold-light) 100%);
    border-radius: 2px;
}

.modal-content form input,
.modal-content form textarea,
.modal-content form select {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: var(--bit-light-bg);
}

.modal-content form input:focus,
.modal-content form textarea:focus,
.modal-content form select:focus {
    outline: none;
    border-color: var(--bit-gold);
    background: var(--bit-white);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.15);
    transform: translateY(-2px);
}

.modal-content form input::placeholder,
.modal-content form textarea::placeholder {
    color: #999;
}

.modal-content form button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--bit-gold) 0%, var(--bit-gold-dark) 100%);
    color: var(--bit-navy);
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(201, 169, 97, 0.4);
    position: relative;
    overflow: hidden;
}

.modal-content form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.modal-content form button:hover::before {
    left: 100%;
}

.modal-content form button:hover {
    background: linear-gradient(135deg, var(--bit-gold-light) 0%, var(--bit-gold) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.5);
}

.modal-content form button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(201, 169, 97, 0.4);
}

.modal-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 15px;
}

.modal-switch a {
    color: var(--bit-navy);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.modal-switch a:hover {
    color: var(--bit-gold);
    text-decoration: underline;
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--bit-error);
    background: rgba(231, 76, 60, 0.1);
    transform: rotate(90deg);
}

/* ==============================================
   LOGIN BUTTON STATES (Matching Header)
   ============================================== */

.login-btn {
    background: linear-gradient(135deg, var(--bit-gold) 0%, var(--bit-gold-dark) 100%);
    color: var(--bit-navy);
    padding: 10px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.3);
    text-transform: capitalize;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
    background: linear-gradient(135deg, var(--bit-gold-light) 0%, var(--bit-gold) 100%);
}

.login-btn.active {
    background: linear-gradient(135deg, var(--bit-success) 0%, var(--bit-success-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.login-btn.active:hover {
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* ==============================================
   BIT BRANDING ENHANCEMENTS
   ============================================== */

/* Add subtle navy pattern to modals */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(61, 78, 104, 0.02) 100%);
    pointer-events: none;
    border-radius: 20px;
}

/* Success state with BIT colors */
.auth-success {
    background: linear-gradient(135deg, var(--bit-success) 0%, var(--bit-success-dark) 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin: 15px 0;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* Error state with BIT colors */
.auth-error {
    background: linear-gradient(135deg, var(--bit-error) 0%, var(--bit-error-dark) 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin: 15px 0;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Gold accent line */
.modal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--bit-gold) 0%, var(--bit-gold-light) 50%, var(--bit-gold) 100%);
    border-radius: 20px 20px 0 0;
}

/* ==============================================
   HEADER NAVIGATION MATCHING
   ============================================== */

/* If you need to style nav items */
.nav-link {
    color: var(--bit-text-dark);
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--bit-gold);
}

.nav-link.active {
    color: var(--bit-gold);
    border-bottom: 2px solid var(--bit-gold);
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
    .notification,
    .admin-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        padding: 15px 18px;
    }
    
    .notification.show,
    .admin-notification.show {
        top: 15px;
    }
    
    .modal-content {
        padding: 30px 20px;
        width: 95%;
        border-radius: 15px;
    }
    
    .modal-content h2 {
        font-size: 24px;
    }
    
    .close {
        top: 15px;
        right: 15px;
        font-size: 28px;
    }
    
    .notification-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 25px 15px;
    }
    
    .modal-content h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .modal-content form input,
    .modal-content form textarea,
    .modal-content form select {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .modal-content form button {
        padding: 13px;
        font-size: 15px;
    }
}

/* ==============================================
   LOADING ANIMATION
   ============================================== */

.auth-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(61, 78, 104, 0.3);
    border-radius: 50%;
    border-top-color: var(--bit-gold);
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

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

/* ==============================================
   HERO SECTION COMPATIBILITY
   ============================================== */

/* Ensure modals work well over hero sections */
.modal {
    backdrop-filter: blur(8px);
}

/* Text on navy blue background (like hero section) */
.text-on-navy {
    color: var(--bit-gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* CTA Button matching "Explore More" style */
.cta-button {
    background: linear-gradient(135deg, var(--bit-gold) 0%, var(--bit-gold-dark) 100%);
    color: var(--bit-navy);
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(201, 169, 97, 0.3);
    text-transform: capitalize;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.4);
    background: linear-gradient(135deg, var(--bit-gold-light) 0%, var(--bit-gold) 100%);
}

/* ==============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================== */

.notification:focus,
.modal-content:focus {
    outline: 3px solid var(--bit-gold);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .notification,
    .admin-notification,
    .modal-content {
        border: 2px solid var(--bit-navy);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .notification,
    .admin-notification,
    .modal-content,
    .modal-content form button {
        animation: none;
        transition: none;
    }
    
    .close:hover {
        transform: none;
    }
}

/* ==============================================
   PRINT STYLES
   ============================================== */

@media print {
    .notification,
    .admin-notification,
    .modal {
        display: none !important;
    }
}

/* ==============================================
   CUSTOM SCROLLBAR (Optional)
   ============================================== */

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bit-light-bg);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--bit-gold);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--bit-gold-dark);
}