/* 
 * Talentfort Employee Management System
 * Professional CSS Stylesheet with Video Background & New Year Effects
 */

/* ===== CSS Variables & Theme ===== */
:root {
    /* Primary Colors */
    --primary-color: #2c3e50;
    --primary-dark: #1a252f;
    --primary-light: #34495e;
    
    /* Secondary Colors */
    --secondary-color: #3498db;
    --secondary-dark: #2980b9;
    --secondary-light: #5dade2;
    
    /* Accent Colors */
    --accent-color: #e74c3c;
    --accent-dark: #c0392b;
    --accent-light: #ec7063;
    
    /* Success Colors */
    --success-color: #27ae60;
    --success-dark: #229954;
    --success-light: #58d68d;
    
    /* Warning Colors */
    --warning-color: #f39c12;
    --warning-dark: #e67e22;
    --warning-light: #f8c471;
    
    /* Info Colors */
    --info-color: #17a2b8;
    --info-dark: #138496;
    --info-light: #48cae4;
    
    /* Neutral Colors */
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --muted-color: #6c757d;
    --border-color: #dee2e6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-success: linear-gradient(135deg, var(--success-color), var(--info-color));
    --gradient-warning: linear-gradient(135deg, var(--warning-color), var(--accent-color));
    --gradient-dark: linear-gradient(135deg, var(--primary-dark), var(--dark-color));
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --shadow-xl: 0 12px 36px rgba(0,0,0,0.18);
    
    /* Border Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.1s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
}

/* ===== Base Styles & Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
    position: relative;
    background: #000;
}

/* ===== Video Background Container ===== */
#video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

/* ===== Video Element Styling ===== */
#background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    
    /* Smooth scaling animation */
    animation: videoScale 30s infinite alternate ease-in-out;
}

@keyframes videoScale {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.05); }
}

/* ===== Content Overlay for Better Readability ===== */
.content-overlay {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.4); /* Semi-transparent dark overlay */
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 20px 0;
}

/* ===== Main Content Container ===== */
.container-fluid {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.05); /* Very transparent background */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    margin: 20px auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 1400px;
}

/* ===== New Year Overlay Styles ===== */
#nyOverlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, #0f2027, #000);
    z-index: 99999;
    overflow: hidden;
}

#fxCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ny-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 100000;
    animation: titleIn 1.8s cubic-bezier(.2,.8,.2,1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.ny-year {
    font-size: 5.5rem;
    opacity: 0.08;
    letter-spacing: 8px;
    font-weight: 900;
    font-family: 'Segoe UI', sans-serif;
    display: block;
    margin-bottom: 20px;
}

.ny-title h1 {
    font-size: 3.8rem;
    background: linear-gradient(90deg, #fff, #ffd700, #ff8c00, #ffd700, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shimmer 3s infinite linear;
    margin-bottom: 20px;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.ny-title p {
    margin-top: 10px;
    font-size: 1.3rem;
    opacity: 0;
    animation: fadeUp 1.2s ease forwards;
    animation-delay: 1.2s;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

@keyframes titleIn {
    from { 
        opacity: 0; 
        transform: translate(-50%, -45%) scale(0.9); 
        filter: blur(12px); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1); 
        filter: blur(0); 
    }
}

@keyframes fadeUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 0.85; 
        transform: translateY(0); 
    }
}

/* ===== Cards with Video-Transparent Design ===== */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.93); /* More opaque for readability */
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all var(--transition-normal);
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-light);
    background: rgba(255, 255, 255, 0.97);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0.8;
    transition: opacity var(--transition-normal);
}

.card-header {
    background: rgba(52, 152, 219, 0.15) !important;
    border-bottom: 1px solid rgba(52, 152, 219, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--dark-color);
    position: relative;
}

h1 { 
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}

h2 { 
    font-size: 2rem;
    color: var(--secondary-dark);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.display-1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ===== Containers ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ===== Enhanced Navbar ===== */
.navbar {
    background: rgba(44, 62, 80, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        var(--shadow-lg),
        0 4px 30px rgba(0, 0, 0, 0.25);
    padding: var(--space-sm) 0;
    border-bottom: 2px solid rgba(52, 152, 219, 0.7);
    position: relative;
    overflow: hidden;
    z-index: 1000;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal);
}

.navbar-brand:hover {
    transform: translateY(-1px);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all var(--transition-fast);
    position: relative;
    padding: var(--space-sm) var(--space-md) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-1px);
}

/* ===== Buttons ===== */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), var(--success-light));
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
    border: none;
    color: #000 !important;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), var(--info-light));
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    border: none;
}

/* ===== Form Elements Enhancement ===== */
.form-control {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
    border-radius: var(--border-radius-sm);
    padding: var(--space-md);
}

.form-control:focus {
    background: white;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
    transform: translateY(-2px);
}

/* ===== Table Enhancement ===== */
.table {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--space-md);
    font-weight: 600;
}

.table td {
    padding: var(--space-md);
    border-color: rgba(0, 0, 0, 0.05);
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background: rgba(52, 152, 219, 0.08);
}

/* ===== Session Timeout Modal ===== */
#sessionTimeoutModal .modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

#sessionTimeoutModal .modal-header {
    background: linear-gradient(135deg, var(--warning-color), var(--accent-color));
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

#timeoutCountdown {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--accent-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===== Toast Notifications ===== */
.toast {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
}

/* ===== Marquee Styling ===== */
marquee {
    background: linear-gradient(90deg, 
        rgba(44, 62, 80, 0.9), 
        rgba(52, 152, 219, 0.8), 
        rgba(44, 62, 80, 0.9));
    color: white;
    padding: 12px 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-top: 2px solid var(--secondary-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

marquee::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    animation: marqueeShine 3s infinite;
}

@keyframes marqueeShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== Badges ===== */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
}

/* ===== Alert Enhancements ===== */
.alert {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-md);
}

.alert-success {
    background: linear-gradient(135deg, 
        rgba(39, 174, 96, 0.2), 
        rgba(46, 204, 113, 0.15));
    border-color: rgba(39, 174, 96, 0.3);
}

.alert-danger {
    background: linear-gradient(135deg, 
        rgba(231, 76, 60, 0.2), 
        rgba(192, 57, 43, 0.15));
    border-color: rgba(231, 76, 60, 0.3);
}

.alert-warning {
    background: linear-gradient(135deg, 
        rgba(243, 156, 18, 0.2), 
        rgba(230, 126, 34, 0.15));
    border-color: rgba(243, 156, 18, 0.3);
}

.alert-info {
    background: linear-gradient(135deg, 
        rgba(23, 162, 184, 0.2), 
        rgba(19, 132, 150, 0.15));
    border-color: rgba(23, 162, 184, 0.3);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
    
    .container-fluid {
        padding: var(--space-md);
        margin: 10px;
        backdrop-filter: blur(5px);
    }
    
    .display-1 {
        font-size: 2.5rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar::before {
        animation-duration: 6s;
    }
    
    #background-video {
        animation: none;
    }
    
    /* New Year Overlay Responsive */
    .ny-year {
        font-size: 3.5rem;
        letter-spacing: 4px;
    }
    
    .ny-title h1 {
        font-size: 2.5rem;
    }
    
    .ny-title p {
        font-size: 1rem;
        padding: 0 20px;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: var(--space-sm);
        backdrop-filter: blur(3px);
        margin: 5px;
    }
    
    .navbar-nav {
        background: rgba(44, 62, 80, 0.95);
        border-radius: var(--border-radius-md);
        padding: var(--space-sm);
        margin-top: var(--space-sm);
        backdrop-filter: blur(10px);
    }
    
    /* New Year Overlay Mobile */
    .ny-year {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .ny-title h1 {
        font-size: 1.8rem;
    }
    
    .ny-title p {
        font-size: 0.9rem;
    }
    
    .card {
        margin-bottom: var(--space-md);
    }
}

/* ===== Print Styles ===== */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .container-fluid {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        backdrop-filter: none !important;
    }
    
    .navbar {
        display: none !important;
    }
    
    #video-background,
    .video-overlay,
    #nyOverlay {
        display: none !important;
    }
    
    marquee {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        background: white !important;
    }
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
}

/* ===== Custom Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Loading States ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    100% { left: 100%; }
}

/* ===== Utility Classes ===== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-soft {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ===== Dashboard Specific Styles ===== */
.dashboard-cards .card {
    animation: cardSlideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.dashboard-cards .card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-cards .card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-cards .card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-cards .card:nth-child(4) { animation-delay: 0.4s; }
.dashboard-cards .card:nth-child(5) { animation-delay: 0.5s; }

@keyframes cardSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Statistics Cards Special Styling ===== */
.statistics-card {
    background: rgba(255, 255, 255, 0.95);
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.statistics-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ===== Download Section Cards ===== */
.download-card {
    background: rgba(255, 255, 255, 0.98);
    transition: all 0.3s ease;
    border-top: 3px solid;
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* ===== Recent Activity Cards ===== */
.recent-activity-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.recent-activity-card .card-header {
    background: linear-gradient(135deg, 
        rgba(52, 152, 219, 0.2), 
        rgba(41, 128, 185, 0.15)) !important;
}