/* Custom CSS for College Management System */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* PDF Container - Apply print styles for PDF generation */
.pdf-container #result-sheet-clone {
    width: 200mm !important;
    max-width: 200mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    box-shadow: none !important;
    border: none !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
}

/* Make PDF clone use same styles as print */
.pdf-container #result-sheet-clone.result-sheet {
    max-height: 287mm !important;
    overflow: visible !important;
}

/* Apply print-style spacing to PDF */
.pdf-container #result-sheet-clone .print-info-section {
    padding: 2mm 4mm !important;
    margin-bottom: 2mm !important;
    background: white !important;
}

.pdf-container #result-sheet-clone .print-summary-section {
    padding: 2mm !important;
    margin-bottom: 2mm !important;
    background: #f9fafb !important;
}

/* Remove shadows in PDF */
.pdf-container #result-sheet-clone *,
.pdf-container #result-sheet-clone *::before,
.pdf-container #result-sheet-clone *::after {
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Print styles for results - Beautiful A4 Single Page Layout */
@media print {
    /* Hide everything except result sheet */
    body * {
        visibility: hidden;
    }
    
    #result-sheet, #result-sheet * {
        visibility: visible;
    }
    
    /* Hide navigation, footer, search form, and action buttons */
    nav, footer, .no-print, 
    #result-search-form, 
    .bg-gray-50 > section:first-child,
    button, .action-buttons,
    .result-container > *:not(#result-sheet) {
        display: none !important;
        visibility: hidden !important;
    }
    
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* A4 Page Settings */
    @page {
        size: A4 portrait;
        margin: 5mm;
    }
    
    /* Result sheet - Auto-fit to single A4 page */
    #result-sheet {
        position: absolute;
        left: 0 !important;
        top: 0 !important;
        width: 200mm !important;
        max-width: 200mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        transform-origin: top center;
        font-size: 10px !important;
        line-height: 1.3 !important;
    }
    
    /* Optimize result sheet for printing */
    .result-sheet {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
    }
    
    /* Preserve colors for print */
    .result-sheet .bg-blue-900,
    .result-sheet .bg-gradient-to-br {
        background: linear-gradient(to bottom right, #1e3a8a, #1e40af, #312e81) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    /* Header Section - Luxury Result Sheet Design for Print */
    .result-sheet .print-header,
    .result-sheet .luxury-header {
        padding: 4mm 5mm !important;
        border-radius: 0 !important;
        background: linear-gradient(to bottom, #1e3a8a, #1e40af, #312e81) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        border-top: 2px solid #facc15 !important;
        border-bottom: 2px solid #facc15 !important;
    }
    
    .result-sheet .print-header-content {
        padding: 3mm 2mm !important;
        position: relative !important;
    }
    
    /* College Name - Elegant Typography */
    .result-sheet .print-college-name {
        font-size: 14px !important;
        font-weight: bold !important;
        letter-spacing: 1px !important;
        line-height: 1.3 !important;
        margin-bottom: 1.5mm !important;
        text-transform: uppercase !important;
        font-family: serif !important;
    }
    
    .result-sheet .print-college-name-wrapper {
        margin-bottom: 2mm !important;
    }
    
    /* Logo - Premium Styling */
    .result-sheet .print-logo {
        height: 28px !important;
        width: 28px !important;
        margin-bottom: 2mm !important;
        border-width: 2px !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
    }
    
    .result-sheet .print-logo-container {
        margin-bottom: 2mm !important;
    }
    
    .result-sheet .print-logo-glow,
    .result-sheet .print-logo-ring {
        display: none !important;
    }
    
    /* Decorative Elements - Luxury Design */
    .result-sheet .print-decorative-line {
        height: 1px !important;
        background: linear-gradient(to right, transparent, #facc15, transparent) !important;
        opacity: 0.8 !important;
    }
    
    .result-sheet .print-decorative-pattern {
        display: none !important;
    }
    
    /* Ornamental Corners - Elegant Touch */
    .result-sheet .print-ornament {
        border-color: rgba(255, 255, 255, 0.3) !important;
        border-width: 1px !important;
        width: 6mm !important;
        height: 6mm !important;
    }
    
    .result-sheet .print-ornament-tl {
        top: 1.5mm !important;
        left: 1.5mm !important;
    }
    
    .result-sheet .print-ornament-tr {
        top: 1.5mm !important;
        right: 1.5mm !important;
    }
    
    .result-sheet .print-ornament-bl {
        bottom: 1.5mm !important;
        left: 1.5mm !important;
    }
    
    .result-sheet .print-ornament-br {
        bottom: 1.5mm !important;
        right: 1.5mm !important;
    }
    
    /* Divider - Certificate Style */
    .result-sheet .print-divider {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 2mm 0 !important;
        gap: 2mm !important;
    }
    
    .result-sheet .print-divider-line {
        height: 0.5px !important;
        background: rgba(255, 255, 255, 0.4) !important;
        flex: 0 1 auto !important;
        max-width: 15mm !important;
    }
    
    .result-sheet .print-divider-dot {
        width: 1mm !important;
        height: 1mm !important;
        background: rgba(255, 255, 255, 0.5) !important;
        border-radius: 50% !important;
    }
    
    .result-sheet .print-certificate-text {
        font-size: 6px !important;
        font-weight: 600 !important;
        letter-spacing: 1px !important;
        white-space: nowrap !important;
        opacity: 0.9 !important;
        padding: 0 1mm !important;
    }
    
    /* Hide decorative patterns in print - but keep ornaments */
    .result-sheet .print-hide-decorative {
        display: none !important;
    }
    
    /* Rounded corners for result sheet */
    .result-sheet.print-header-compact {
        border-radius: 4px !important;
        overflow: hidden !important;
    }
    
    /* Student & Exam Info Cards - Ultra Compact for Print */
    .result-sheet .print-info-section {
        padding: 2mm 4mm !important;
        margin-bottom: 2mm !important;
        background: white !important;
    }
    
    /* Print card backgrounds */
    .result-sheet .print-info-card {
        background: white !important;
        border-color: #e5e7eb !important;
    }
    
    .result-sheet .print-info-card .print-card-padding {
        background: white !important;
    }
    
    .result-sheet .print-info-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 3mm !important;
        margin-bottom: 2mm !important;
        width: 100% !important;
    }
    
    .result-sheet .print-info-card {
        border: 1px solid #e5e7eb !important;
        border-radius: 2px !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        margin: 0 !important;
    }
    
    .result-sheet .print-card-padding {
        padding: 2mm !important;
    }
    
    .result-sheet .print-card-header {
        margin-bottom: 1.5mm !important;
        padding-bottom: 1mm !important;
        border-bottom: 1px solid #e5e7eb !important;
    }
    
    .result-sheet .print-icon-container,
    .result-sheet .print-icon {
        display: none !important;
    }
    
    .result-sheet .print-card-title {
        font-size: 9px !important;
        font-weight: bold !important;
        margin: 0 !important;
        padding: 0 !important;
        text-transform: uppercase !important;
    }
    
    .result-sheet .print-info-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .result-sheet .print-info-row {
        padding: 1mm 0 !important;
        margin: 0 !important;
        border-bottom: 0.5px solid #f3f4f6 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .result-sheet .print-info-row:last-child {
        border-bottom: none !important;
    }
    
    .result-sheet .print-label {
        font-size: 7px !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        color: #6b7280 !important;
        min-width: 25mm !important;
    }
    
    .result-sheet .print-value {
        font-size: 8px !important;
        font-weight: bold !important;
        color: #111827 !important;
        text-align: right !important;
        flex: 1 !important;
        word-break: break-word !important;
    }
    
    .result-sheet .print-position {
        font-size: 10px !important;
        color: #2563eb !important;
        -webkit-text-fill-color: #2563eb !important;
        background: none !important;
    }
    
    /* Remove top border accent in print */
    .result-sheet .print-info-card > div:first-child {
        display: none !important;
    }
    
    .result-sheet .px-6,
    .result-sheet .px-12 {
        padding-left: 4mm !important;
        padding-right: 4mm !important;
    }
    
    .result-sheet .py-10 {
        padding-top: 2mm !important;
        padding-bottom: 2mm !important;
    }
    
    .result-sheet .py-8 {
        padding-top: 2mm !important;
        padding-bottom: 2mm !important;
    }
    
    .result-sheet .rounded-xl {
        border-radius: 2px !important;
        padding: 2mm !important;
        margin-bottom: 2mm !important;
    }
    
    /* Typography - Readable sizes */
    .result-sheet .text-4xl {
        font-size: 20px !important;
    }
    
    .result-sheet .text-3xl {
        font-size: 18px !important;
    }
    
    .result-sheet .text-2xl {
        font-size: 14px !important;
    }
    
    .result-sheet .text-xl {
        font-size: 12px !important;
    }
    
    .result-sheet .text-lg {
        font-size: 11px !important;
    }
    
    .result-sheet .text-base {
        font-size: 10px !important;
    }
    
    .result-sheet .text-sm {
        font-size: 9px !important;
    }
    
    .result-sheet .text-xs {
        font-size: 8px !important;
    }
    
    /* Grid spacing - Compact */
    .result-sheet .gap-6,
    .result-sheet .gap-8 {
        gap: 3mm !important;
    }
    
    .result-sheet .mb-10,
    .result-sheet .mb-8 {
        margin-bottom: 3mm !important;
    }
    
    .result-sheet .mb-6 {
        margin-bottom: 2mm !important;
    }
    
    /* Summary Metrics Section - Compact Single Line */
    .result-sheet .print-summary-section {
        padding: 2mm !important;
        margin-bottom: 2mm !important;
        border-radius: 2px !important;
        border: 1px solid #cbd5e1 !important;
        background: #f9fafb !important;
    }
    
    .result-sheet .print-summary-title {
        color: #111827 !important;
    }
    
    .result-sheet .print-hide {
        display: none !important;
    }
    
    .result-sheet .print-summary-title {
        font-size: 8px !important;
        font-weight: bold !important;
        margin-bottom: 1.5mm !important;
        padding-bottom: 1mm !important;
        border-bottom: 1px solid #e5e7eb !important;
        text-transform: uppercase !important;
    }
    
    .result-sheet .print-summary-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-around !important;
        align-items: center !important;
        gap: 2mm !important;
        width: 100% !important;
    }
    
    .result-sheet .print-summary-item {
        display: flex !important;
        align-items: center !important;
        gap: 1mm !important;
        white-space: nowrap !important;
        flex: 0 0 auto !important;
    }
    
    .result-sheet .print-summary-label {
        font-size: 6px !important;
        font-weight: bold !important;
        color: #6b7280 !important;
        text-transform: uppercase !important;
    }
    
    .result-sheet .print-summary-value {
        font-size: 9px !important;
        font-weight: bold !important;
    }
    
    .result-sheet .print-summary-item .text-lg {
        font-size: 9px !important;
    }
    
    .result-sheet .print-summary-item .text-base {
        font-size: 8px !important;
    }
    
    /* Hide decorative blur elements */
    .result-sheet .absolute.blur-3xl,
    .result-sheet .absolute.blur-xl {
        display: none !important;
    }
    
    /* Subject Marks Table - Auto-fit */
    .result-marks-table {
        font-size: 8px !important;
        margin-bottom: 2mm !important;
        width: 100% !important;
    }
    
    .result-marks-table th {
        padding: 2mm 1.5mm !important;
        font-size: 7px !important;
        font-weight: bold !important;
        line-height: 1.2 !important;
        background: linear-gradient(to right, #2563eb, #2563eb, #1e40af) !important; /* blue-600 to blue-700 */
        color: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    .result-marks-table td {
        padding: 1.5mm 1mm !important;
        font-size: 8px !important;
        line-height: 1.3 !important;
    }
    
    .result-marks-table .text-lg {
        font-size: 10px !important;
    }
    
    .result-marks-table .text-base {
        font-size: 9px !important;
    }
    
    /* Table optimization */
    .result-sheet table {
        page-break-inside: avoid !important;
        border-collapse: collapse !important;
        width: 100% !important;
        table-layout: auto !important;
    }
    
    .result-sheet thead {
        display: table-header-group !important;
    }
    
    .result-sheet tbody {
        display: table-row-group !important;
    }
    
    /* Table borders */
    .result-sheet table td, 
    .result-sheet table th {
        border: 0.5px solid #d1d5db !important;
    }
    
    /* Compact table rows */
    .result-sheet table tbody tr {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    /* Hide icons in cards for print - save space */
    .result-sheet .fa-user-graduate,
    .result-sheet .fa-file-alt,
    .result-sheet .fa-trophy,
    .result-sheet .fa-star,
    .result-sheet .fa-medal,
    .result-sheet .fa-check-circle,
    .result-sheet .fa-times-circle {
        display: none !important;
    }
    
    /* Remove icon containers - but keep grade badges in table */
    .result-sheet .print-icon-container,
    .result-sheet .print-summary-item .inline-flex.items-center.justify-center.w-12,
    .result-sheet .print-card-header .inline-flex.items-center.justify-center.w-12 {
        display: none !important;
    }
    
    /* Keep grade badges in table visible */
    .result-sheet .result-marks-table .inline-flex {
        display: inline-flex !important;
        visibility: visible !important;
    }
    
    /* Grade badge styling for print */
    .result-sheet .result-marks-table td .inline-flex {
        width: auto !important;
        height: auto !important;
        padding: 1mm 2mm !important;
        font-size: 7px !important;
        border-radius: 2px !important;
        display: inline-flex !important;
        visibility: visible !important;
    }
    
    /* Section titles */
    .result-sheet h3 {
        font-size: 10px !important;
        margin-bottom: 2mm !important;
        font-weight: bold !important;
    }
    
    /* Hide gradients text effects - use solid colors */
    .result-sheet .bg-clip-text {
        -webkit-text-fill-color: initial !important;
        background: none !important;
        color: inherit !important;
    }
    
    /* Action buttons section - hidden */
    .result-sheet .bg-gradient-to-r.from-gray-50 {
        display: none !important;
    }
    
    /* Hide animations and transitions */
    * {
        animation: none !important;
        transition: none !important;
    }
    
    /* Remove all shadows for print */
    .result-sheet *,
    .result-sheet *::before,
    .result-sheet *::after {
        box-shadow: none !important;
        text-shadow: none !important;
        filter: none !important;
        drop-shadow: none !important;
    }
    
    /* Remove shadow classes specifically */
    .result-sheet .shadow-sm,
    .result-sheet .shadow,
    .result-sheet .shadow-md,
    .result-sheet .shadow-lg,
    .result-sheet .shadow-xl,
    .result-sheet .shadow-2xl,
    .result-sheet [class*="shadow"] {
        box-shadow: none !important;
    }
    
    /* Remove drop-shadow classes */
    .result-sheet .drop-shadow-sm,
    .result-sheet .drop-shadow,
    .result-sheet .drop-shadow-md,
    .result-sheet .drop-shadow-lg,
    .result-sheet .drop-shadow-xl,
    .result-sheet [class*="drop-shadow"] {
        filter: none !important;
    }
    
    /* Ensure content fits on single page - auto scale */
    .result-sheet {
        max-height: 287mm !important;
        overflow: visible !important;
    }
    
    /* Responsive table for many subjects */
    .result-marks-table {
        font-size: clamp(6px, 1.2vw, 8px) !important;
    }
    
    /* Compact spacing for multiple subjects */
    .result-sheet table tbody tr {
        height: auto !important;
        min-height: 4mm !important;
    }
    
    /* Optimization for many subjects */
    .result-sheet.print-many-subjects .result-marks-table {
        font-size: 7px !important;
    }
    
    .result-sheet.print-many-subjects table td,
    .result-sheet.print-many-subjects table th {
        padding: 1mm 0.8mm !important;
        font-size: 7px !important;
    }
    
    .result-sheet.print-many-subjects .mb-10,
    .result-sheet.print-many-subjects .mb-8 {
        margin-bottom: 2mm !important;
    }
    
    .result-sheet.print-many-subjects .py-10 {
        padding-top: 2mm !important;
        padding-bottom: 2mm !important;
    }
    
    .result-sheet.print-many-subjects .bg-gradient-to-br.from-blue-50 {
        padding: 2mm !important;
        margin-bottom: 2mm !important;
    }
    
    .result-sheet.print-many-subjects .bg-gradient-to-br {
        padding: 4mm 3mm !important;
    }
    
    /* Moderate optimization */
    .result-sheet.print-moderate-subjects .result-marks-table {
        font-size: 7.5px !important;
    }
    
    .result-sheet.print-moderate-subjects table td,
    .result-sheet.print-moderate-subjects table th {
        padding: 1.2mm 1mm !important;
        font-size: 7.5px !important;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button hover effects */
button, .btn {
    transition: all 0.3s ease;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active, .btn:active {
    transform: translateY(0);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Form focus effects */
input:focus, select:focus, textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Alert animations */
.alert-enter {
    animation: slideInDown 0.3s ease;
}

.alert-exit {
    animation: fadeIn 0.3s ease reverse;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-full-width {
        width: 100% !important;
    }
}

/* All columns visible on all screen sizes */
.mobile-hide-component {
    display: table-cell !important;
}

/* Web View - Reduced Spacing for Info Cards */
@media screen and (min-width: 640px) {
    .print-info-section {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    
    .print-info-grid {
        gap: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .print-card-padding {
        padding: 0.75rem 1rem !important;
    }
    
    .print-card-header {
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .print-info-content {
        gap: 0.5rem !important;
    }
    
    .print-info-row {
        padding: 0.375rem 0 !important;
    }
}

@media print {
    /* Override web view styles for print */
}

/* Mobile Responsive Styles for Result Sheet */
@media (max-width: 640px) {
    /* Result sheet container */
    #result-sheet {
        margin: 0.5rem auto;
        border-radius: 1rem;
        width: calc(100% - 1rem) !important;
        max-width: 100% !important;
    }
    
    /* Container padding */
    .print-info-section,
    .print-summary-section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Header responsive */
    .luxury-header {
        padding: 0.75rem 0.5rem !important;
    }
    
    .print-header-content {
        padding: 0.5rem 0.25rem !important;
    }
    
    .print-college-name {
        font-size: 0.875rem !important;
        line-height: 1.2 !important;
        padding: 0 0.5rem;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .print-college-name-wrapper {
        overflow: hidden;
    }
    
    /* Cards - 2 columns on mobile */
    .print-info-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }
    
    .print-info-card {
        margin-bottom: 0.5rem;
    }
    
    .print-card-padding {
        padding: 0.5rem !important;
    }
    
    .print-card-header {
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .print-card-title {
        font-size: 0.625rem !important;
        line-height: 1.2 !important;
    }
    
    .print-icon-container {
        padding: 0.25rem !important;
    }
    
    .print-icon {
        font-size: 0.625rem !important;
    }
    
    .print-info-content {
        gap: 0.125rem !important;
    }
    
    /* Info rows - compact on mobile */
    .print-info-row {
        padding: 0.125rem 0 !important;
        gap: 0.125rem !important;
    }
    
    .print-label {
        font-size: 0.5rem !important;
        min-width: auto !important;
        flex: 0 0 auto;
        line-height: 1.2 !important;
    }
    
    .print-value {
        font-size: 0.625rem !important;
        text-align: right !important;
        flex: 1;
        word-break: break-word !important;
        line-height: 1.3 !important;
    }
    
    .print-position {
        font-size: 0.75rem !important;
    }
    
    /* Summary section - one line on mobile */
    .print-summary-grid {
        gap: 0.25rem !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0.25rem 0 !important;
    }
    
    .print-summary-item {
        flex-shrink: 0 !important;
        padding: 0.25rem 0.375rem !important;
        background: transparent !important;
        border-radius: 0.25rem !important;
    }
    
    .print-summary-separator {
        flex-shrink: 0;
    }
    
    .print-summary-label {
        font-size: 0.5rem !important;
    }
    
    .print-summary-value {
        font-size: 0.625rem !important;
    }
    
    /* Table - scrollable on mobile, visible on desktop */
    .mobile-table-container {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
        width: calc(100% + 1rem) !important;
        scrollbar-width: thin !important;
        scrollbar-color: #cbd5e1 #f1f5f9 !important;
    }
    
    .mobile-table-container::-webkit-scrollbar {
        height: 6px !important;
    }
    
    .mobile-table-container::-webkit-scrollbar-track {
        background: #f1f5f9 !important;
        border-radius: 3px !important;
    }
    
    .mobile-table-container::-webkit-scrollbar-thumb {
        background: #cbd5e1 !important;
        border-radius: 3px !important;
    }
    
    .mobile-table-container::-webkit-scrollbar-thumb:hover {
        background: #94a3b8 !important;
    }
    
    /* Desktop - no scroll needed */
    @media screen and (min-width: 640px) {
        .mobile-table-container {
            overflow-x: visible !important;
        }
    }
    
    /* Ensure table cells don't hide content */
    .mobile-table-container table {
        min-width: 900px !important;
    }
    
    @media screen and (min-width: 640px) {
        .mobile-table-container table {
            min-width: 100% !important;
        }
    }
    
    .mobile-table-container table td {
        overflow: visible !important;
        position: relative !important;
    }
    
    /* Reduce section padding on mobile */
    @media (max-width: 640px) {
        .bg-gray-50 {
            padding-left: 0.25rem !important;
            padding-right: 0.25rem !important;
            padding-bottom: 0.5rem !important;
            padding-top: 0.5rem !important;
        }
        
        /* Reduce header spacing */
        .bg-gray-50 .text-center {
            margin-bottom: 0.375rem !important;
        }
        
        .bg-gray-50 .inline-flex.items-center {
            margin-bottom: 0.25rem !important;
        }
        
        .bg-gray-50 p {
            margin-top: 0.125rem !important;
            margin-bottom: 0.25rem !important;
        }
    }
    
    .mobile-marks-table {
        width: 100% !important;
        min-width: 900px !important;
        table-layout: fixed !important;
        border-spacing: 0 !important;
    }
    
    @media screen and (min-width: 640px) {
        .mobile-marks-table {
            min-width: 100% !important;
            table-layout: auto !important;
        }
    }
    
    /* Prevent text cutting */
    .mobile-marks-table th,
    .mobile-marks-table td {
        overflow: visible !important;
        word-wrap: break-word !important;
        word-break: normal !important;
    }
    
    @media screen and (min-width: 640px) {
        .mobile-marks-table {
            table-layout: auto !important;
        }
    }
    
    .result-marks-table {
        font-size: inherit !important;
    }
    
    /* Blue header styling - theme color */
    .result-marks-table thead tr {
        background: linear-gradient(to right, #2563eb, #2563eb, #1e40af) !important; /* blue-600 to blue-700 */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .result-marks-table thead th {
        color: white !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Mobile responsive header text */
    @media (max-width: 640px) {
        .result-marks-table thead th {
            font-size: 0.5625rem !important; /* 9px */
            padding: 0.25rem 0.25rem !important;
            line-height: 1.2 !important;
        }
        
        .result-marks-table thead tr:last-child th {
            font-size: 0.5rem !important; /* 8px for Theory/Practical/MCQ */
            padding: 0.25rem 0.25rem !important;
        }
        
        /* Abbreviate long text on mobile */
        .result-marks-table thead th[rowspan="2"] {
            word-break: break-word !important;
        }
    }
    
    /* Ensure marks are fully visible */
    .mobile-table-cell.whitespace-nowrap {
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
    
    /* Column widths for new structure - 10 columns: Code, Name, 1st(CQ/MCQ/Prac), 2nd(CQ/MCQ/Prac), Total, Grade */
    /* Mobile: Fixed widths for scrolling */
    .mobile-marks-table thead tr:first-child th:nth-child(1),
    .mobile-marks-table tbody td:nth-child(1) {
        width: 70px !important; /* Subject Code */
        min-width: 70px !important;
    }
    
    .mobile-marks-table thead tr:first-child th:nth-child(2),
    .mobile-marks-table tbody td:nth-child(2) {
        width: 140px !important; /* Subject Name */
        min-width: 140px !important;
    }
    
    /* 1st Paper columns */
    .mobile-marks-table tbody td:nth-child(3),
    .mobile-marks-table tbody td:nth-child(4),
    .mobile-marks-table tbody td:nth-child(5) {
        width: 65px !important; /* 1st Paper CQ, MCQ, Practical */
        min-width: 65px !important;
    }
    
    /* 2nd Paper columns */
    .mobile-marks-table tbody td:nth-child(6),
    .mobile-marks-table tbody td:nth-child(7),
    .mobile-marks-table tbody td:nth-child(8) {
        width: 65px !important; /* 2nd Paper CQ, MCQ, Practical */
        min-width: 65px !important;
    }
    
    .mobile-marks-table thead tr:first-child th:nth-child(9),
    .mobile-marks-table tbody td:nth-child(9) {
        width: 75px !important; /* Total */
        min-width: 75px !important;
    }
    
    .mobile-marks-table thead tr:first-child th:nth-child(10),
    .mobile-marks-table tbody td:nth-child(10) {
        width: 70px !important; /* Grade */
        min-width: 70px !important;
    }
    
    /* Desktop: Percentage widths */
    @media screen and (min-width: 640px) {
        .mobile-marks-table thead tr:first-child th:nth-child(1),
        .mobile-marks-table tbody td:nth-child(1) {
            width: 8% !important;
            min-width: auto !important;
        }
        
        .mobile-marks-table thead tr:first-child th:nth-child(2),
        .mobile-marks-table tbody td:nth-child(2) {
            width: 18% !important;
            min-width: auto !important;
        }
        
        /* 1st & 2nd Paper columns - equal widths */
        .mobile-marks-table tbody td:nth-child(3),
        .mobile-marks-table tbody td:nth-child(4),
        .mobile-marks-table tbody td:nth-child(5),
        .mobile-marks-table tbody td:nth-child(6),
        .mobile-marks-table tbody td:nth-child(7),
        .mobile-marks-table tbody td:nth-child(8) {
            width: 8% !important;
            min-width: auto !important;
        }
        
        .mobile-marks-table thead tr:first-child th:nth-child(9),
        .mobile-marks-table tbody td:nth-child(9) {
            width: 10% !important;
            min-width: auto !important;
        }
        
        .mobile-marks-table thead tr:first-child th:nth-child(10),
        .mobile-marks-table tbody td:nth-child(10) {
            width: 10% !important;
            min-width: auto !important;
        }
    }
    
    /* Mobile responsive font sizes */
    @media (max-width: 640px) {
        .mobile-marks-table thead th {
            font-size: 0.5625rem !important; /* 9px for main headers */
            padding: 0.25rem 0.125rem !important;
            line-height: 1.3 !important;
        }
        
        .mobile-marks-table thead tr:nth-child(2) th {
            font-size: 0.5rem !important; /* 8px for 1st/2nd Paper */
            padding: 0.25rem 0.125rem !important;
        }
        
        .mobile-marks-table thead tr:nth-child(3) th {
            font-size: 0.5rem !important; /* 8px for CQ/MCQ/Prac */
            padding: 0.25rem 0.125rem !important;
        }
        
        .mobile-marks-table tbody td {
            font-size: 0.625rem !important; /* 10px */
            padding: 0.375rem 0.25rem !important;
        }
        
        .mobile-marks-table tbody td:nth-child(9) {
            font-size: 0.75rem !important; /* 12px for Total */
            font-weight: bold !important;
        }
    }
    
    /* Allow table to expand if needed */
    .mobile-marks-table {
        min-width: 100% !important;
    }
    
    /* Grade badge smaller on mobile */
    .result-marks-table td .inline-flex {
        width: 0.875rem !important; /* 14px */
        height: 0.875rem !important; /* 14px */
        font-size: 0.3125rem !important; /* 5px */
        padding: 0 !important;
        min-width: 0.875rem !important;
    }
    
    /* Remove borders on mobile for more space */
    @media (max-width: 640px) {
        .mobile-marks-table th,
        .mobile-marks-table td {
            border-width: 0.5px !important;
        }
        
        .mobile-marks-table th {
            border-right-color: rgba(59, 130, 246, 0.15) !important;
        }
        
        .mobile-marks-table td {
            border-right-color: rgba(229, 231, 235, 0.8) !important;
            border-bottom-color: rgba(229, 231, 235, 0.8) !important;
        }
    }
    
    /* Subject name truncation on mobile */
    .mobile-table-cell .line-clamp-1 {
        display: -webkit-box !important;
        -webkit-line-clamp: 1 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        max-width: 100% !important;
    }
    
    /* Buttons - full width on mobile */
    .no-print button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Hide decorative ornaments on very small screens */
    .print-ornament {
        display: none !important;
    }
    
    /* Adjust certificate text */
    .print-certificate-text {
        font-size: 0.5rem !important;
        padding: 0 0.25rem !important;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile */
    .print-college-name {
        font-size: 0.875rem !important;
    }
    
    .print-logo {
        height: 3rem !important;
        width: 3rem !important;
    }
    
    .print-summary-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem !important;
    }
    
    .result-marks-table {
        font-size: 0.5rem !important;
        min-width: 500px !important;
    }
    
    .result-marks-table th,
    .result-marks-table td {
        padding: 0.25rem 0.125rem !important;
        font-size: 0.5rem !important;
    }
}

/* Gradient backgrounds */
.gradient-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Notice badge */
.notice-badge {
    position: relative;
    display: inline-block;
}

.notice-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success/Error message styles */
.message-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.message-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.message-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Footer link hover */
footer a {
    transition: color 0.3s ease;
}

/* Oxford/International Style Enhancements */
.letter-spacing {
    letter-spacing: 0.15em;
}

/* Result Card Typography - Compact Professional */
.result-sheet .text-3xl {
    font-weight: 300;
    letter-spacing: -0.01em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Prevent text overflow */
.result-sheet .break-words {
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}

/* Green table header (academic style) */
.result-table-header-green {
    background-color: #4CAF50 !important;
}

.result-table-header-green th {
    background-color: #4CAF50 !important;
    color: white !important;
    border-color: #45a049 !important;
}

/* Mobile menu transition */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Result card styles */
.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Notice timeline */
.notice-timeline {
    position: relative;
    padding-left: 30px;
}

.notice-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.notice-timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.notice-timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #3b82f6;
}

/* ========================================
   LUXURY HOME PAGE STYLING
   ======================================== */

/* Hero Swiper Customization */
.hero-swiper {
    position: relative;
    height: 60vh;
}

/* Ensure hero slides fit properly */
.hero-swiper .swiper-slide {
    height: 60vh;
}

/* Responsive hero height */
@media (min-width: 768px) {
    .hero-swiper {
        height: 70vh;
    }
    
    .hero-swiper .swiper-slide {
        height: 70vh;
    }
}

@media (min-width: 1024px) {
    .hero-swiper {
        height: 80vh;
    }
    
    .hero-swiper .swiper-slide {
        height: 80vh;
    }
}

.hero-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    width: 12px;
    height: 12px;
    opacity: 1;
    transition: all 0.3s;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: white;
    width: 32px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
}

/* Luxury Glassmorphism Effects */
.backdrop-blur-xl {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Smooth Reveal Animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure hero text is always visible */
.hero-swiper .swiper-slide .relative.z-10 {
    opacity: 1 !important;
    transform: none !important;
}

/* Hero text styles - white text on black gradient */
.hero-swiper h2.text-white {
    color: white !important;
    text-shadow: none !important;
}

.hero-swiper p.text-gray-200 {
    color: #e5e7eb !important;
    text-shadow: none !important;
}

/* Professional Glass Effect Buttons */
.hero-swiper a[href*="result.php"],
.hero-swiper a[href*="about.php"] {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
}

.hero-swiper a[href*="result.php"]::before,
.hero-swiper a[href*="about.php"]::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Enhanced glass effect on hover */
.hero-swiper a[href*="result.php"]:hover,
.hero-swiper a[href*="about.php"]:hover {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Responsive text adjustments */
@media (max-width: 640px) {
    .hero-swiper h2 {
        line-height: 1.1 !important;
    }
    
    .hero-swiper p {
        line-height: 1.5 !important;
    }
}

/* Luxury Card Hover Effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:rotate-12 {
    transform: rotate(12deg);
}

/* Premium Gradient Text */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

/* Enhanced Shadows */
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Smooth Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Luxury Navigation Sticky Effect */
nav.sticky {
    background: rgba(30, 58, 138, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Premium Button Hover States */
button:hover,
a:hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

