/* ============================================
   BIHAR TEACHER TOOL - MODERN PREMIUM STYLES
   ============================================ */

:root {
    --primary-color: #1e3a5f;
    --primary-light: #2c5282;
    --secondary-color: #38b2ac;
    --accent-color: #ed8936;
    --success-color: #48bb78;
    --danger-color: #e53e3e;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #f0f4f8;
    --card-bg: #ffffff;
    --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --border-radius: 16px;
    --box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #1e3a5f 0%, #2c5282 50%, #3182ce 100%);
    --gradient-accent: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: var(--bg-color);
    background-image:
        radial-gradient(circle at 20% 80%, rgba(56, 178, 172, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(237, 137, 54, 0.1) 0%, transparent 50%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   HEADER - PREMIUM GLASSMORPHISM
   ============================================ */
header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header h1 a {
    background: linear-gradient(90deg, #fff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* ============================================
   TOOLS GRID - MODERN LAYOUT
   ============================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
    perspective: 1000px;
}

/* ============================================
   TOOL CARD - 3D GLASSMORPHISM
   ============================================ */
.tool-card {
    background: var(--gradient-card);
    border-radius: var(--border-radius);
    padding: 1.8rem;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 2px 10px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.tool-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 40%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.tool-card:hover::after {
    transform: translateX(100%);
}

.tool-card:hover {
    transform: translateY(-12px) rotateX(2deg);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.tool-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-card h3 i {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(56, 178, 172, 0.3);
    flex-shrink: 0;
}

.tool-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.2rem;
    flex-grow: 1;
    line-height: 1.5;
}

/* ============================================
   BUTTONS - GRADIENT & 3D
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gradient-primary);
    color: white;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::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 ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ============================================
   SECTION TITLES - MODERN
   ============================================ */
.section-title {
    margin: 2.5rem 0 1.5rem;
    padding: 1rem 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.section-title::after {
    content: '';
    flex-grow: 1;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), transparent);
    border-radius: 3px;
}

.section-title i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color), #dd6b20);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: var(--gradient-primary);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(30, 58, 95, 0.3);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(56, 178, 172, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.hero-section p {
    font-size: 1.1rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* ============================================
   FORM STYLES - MODERN
   ============================================ */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(56, 178, 172, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.6s ease forwards;
}

.tools-grid .tool-card:nth-child(1) {
    animation-delay: 0.1s;
}

.tools-grid .tool-card:nth-child(2) {
    animation-delay: 0.2s;
}

.tools-grid .tool-card:nth-child(3) {
    animation-delay: 0.3s;
}

.tools-grid .tool-card:nth-child(4) {
    animation-delay: 0.4s;
}

.tools-grid .tool-card:nth-child(5) {
    animation-delay: 0.5s;
}

/* ============================================
   USER MENU STYLES
   ============================================ */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.4rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 1.5rem;
    }

    .hero-section h2 {
        font-size: 1.5rem;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .show-on-mobile {
        display: block !important;
    }
}

@media (min-width: 1025px) {
    .show-on-mobile {
        display: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body * {
        visibility: hidden;
    }

    #printable-area,
    #printable-area * {
        visibility: visible;
    }

    #printable-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* ============================================
   MOBILE DESIGN SYSTEM (PREMIUM)
   ============================================ */

/* Bottom Navigation Bar */
/* MODERN FLOATING NAVIGATION (App-Like) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    /* Floating effect */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.85);
    /* Highly transparent */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    /* Rounded Pill Shape */
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    z-index: 2000;
    padding: 10px 20px;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    width: 60px;
    height: 50px;
    position: relative;
    border-radius: 16px;
    transition: all 0.3s;
}

.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 3px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.nav-item span {
    font-size: 0.65rem;
    font-weight: 700;
    transition: all 0.3s;
    opacity: 0.8;
}

/* Active State - Premium App Feel */
.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active i {
    transform: translateY(-4px) scale(1.1);
    filter: drop-shadow(0 4px 6px rgba(30, 58, 95, 0.2));
    color: var(--primary-color);
}

.nav-item.active span {
    opacity: 1;
    font-weight: 800;
    color: var(--primary-color);
}

/* Optional: Active Indicator Dot */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-color);
}

/* Mobile Utilities */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block !important;
}

/* FAB Button */
.fab-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.5);
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.fab:active {
    transform: scale(0.95);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
        /* Space for bottom nav */
    }

    .bottom-nav {
        display: flex;
    }

    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    /* Touch Friendly Inputs */
    input,
    select,
    button,
    .btn {
        min-height: 48px;
        /* Standard Touch Target */
    }

    /* Mobile Container */
    .container {
        padding: 0 12px;
        margin: 1rem auto;
    }

    /* Stacked Cards for Tables */
    .mobile-card-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /* Quick Actions (Horizontal Scroll) */
    .quick-actions-scroll {
        display: flex;
        gap: 15px;
        overflow-x: auto;
        padding: 10px 5px 20px 5px;
        /* Bottom padding for scrollbar/shadow */
        margin-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
    }

    .quick-actions-scroll::-webkit-scrollbar {
        display: none;
    }

    .quick-action-card {
        min-width: 100px;
        background: white;
        border-radius: 16px;
        padding: 15px 10px;
        text-align: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.05);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: var(--text-color);
    }

    .quick-action-icon {
        width: 45px;
        height: 45px;
        border-radius: 12px;
        background: var(--bg-color);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: var(--primary-color);
        margin-bottom: 5px;
    }
}