/* GyanRank Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* General Styles */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.08);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
}

/* Dashboard Cards */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
    padding: 20px;
}

.dashboard-card.success {
    border-left-color: var(--success-color);
}

.dashboard-card.danger {
    border-left-color: var(--danger-color);
}

.dashboard-card.warning {
    border-left-color: var(--warning-color);
}

.dashboard-card.info {
    border-left-color: var(--info-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #495057;
}

/* Tables */
.table {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #6c757d;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 6px;
}

/* Institute Cards - Modern Design */
.institute-card {
    overflow: hidden;
    transition: all 0.3s ease;
}

.institute-card .institute-banner {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.institute-card .institute-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    margin-top: -40px;
    object-fit: cover;
}

/* Modern Institute Card Hover Effects */
.institute-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25) !important;
}

.institute-card-modern .btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Smooth animations for stats */
.institute-card-modern .row > div > div {
    transition: all 0.3s ease;
}

.institute-card-modern:hover .row > div > div {
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%), url('../images/hero-bg.svg');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Sidebar (Admin panels) */
.sidebar {
    background-color: #2c3e50;
    min-height: 100vh;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    z-index: 1000;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    margin: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

.main-content {
    margin-left: 250px;
    padding: 20px;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 40px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .institute-card .institute-banner {
        height: 150px;
    }
    
    .institute-card .institute-logo {
        width: 60px;
        height: 60px;
        margin-top: -30px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Utility Classes */
.text-primary-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.cursor-pointer {
    cursor: pointer;
}

/* Status Indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-dot.active {
    background-color: var(--success-color);
}

.status-dot.inactive {
    background-color: var(--danger-color);
}

.status-dot.pending {
    background-color: var(--warning-color);
}

/* Exam Timer */
.exam-timer {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.exam-timer.warning {
    background-color: #fff3cd;
    border: 2px solid var(--warning-color);
}

.exam-timer.danger {
    background-color: #f8d7da;
    border: 2px solid var(--danger-color);
}

/* OMR Sheet */
.omr-sheet {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.omr-sheet.show {
    right: 0;
}

.omr-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1002;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.omr-question {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.omr-option {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    margin: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.omr-option:hover {
    border-color: var(--primary-color);
    background-color: #f0f8ff;
}

.omr-option.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
/* ================================
   MOBILE RESPONSIVE STYLES
   ================================ */

/* Mobile Base Styles */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Headers */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Tables - Responsive */
    .table-responsive {
        border: none;
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.85rem;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 14px;
        padding: 0.5rem 0.75rem;
    }
    
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.25rem;
    }
    
    /* Modal */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* Navbar/Header adjustments */
    .navbar-brand {
        font-size: 1rem;
    }
    
    .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Stats/Dashboard Cards */
    .dashboard-card {
        margin-bottom: 0.75rem;
    }
    
    .dashboard-card h3 {
        font-size: 1.5rem;
    }
    
    .dashboard-card h6 {
        font-size: 0.8rem;
    }
    
    /* Alerts */
    .alert {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Badges */
    .badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.5rem;
    }
    
    /* Spacing utilities */
    .mb-4, .my-4 {
        margin-bottom: 1rem !important;
    }
    
    .mt-4, .my-4 {
        margin-top: 1rem !important;
    }
    
    .p-4 {
        padding: 1rem !important;
    }
    
    /* Hide on mobile */
    .d-md-none-mobile {
        display: none !important;
    }
}

/* Small Mobile - Card Layout for Tables */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Convert tables to cards */
    .table-mobile-card thead {
        display: none;
    }
    
    .table-mobile-card tbody {
        display: block;
    }
    
    .table-mobile-card tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 1rem;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .table-mobile-card td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right !important;
        padding: 0.6rem 0 !important;
        border: none !important;
        border-bottom: 1px solid #f7fafc !important;
    }
    
    .table-mobile-card td:last-child {
        border-bottom: none !important;
        padding-top: 1rem !important;
    }
    
    .table-mobile-card td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #4a5568;
        text-align: left;
        font-size: 0.85rem;
        flex: 0 0 45%;
    }
    
    .table-mobile-card td[data-label="Action"]:before,
    .table-mobile-card td[data-label="Actions"]:before {
        display: none;
    }
    
    .table-mobile-card td[data-label="Action"],
    .table-mobile-card td[data-label="Actions"] {
        justify-content: center;
    }
    
    /* Full width buttons in table cards */
    .table-mobile-card .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .table-mobile-card .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Grid adjustments */
    .row.g-4 {
        row-gap: 0.75rem !important;
    }
    
    .row.g-3 {
        row-gap: 0.5rem !important;
    }
    
    /* Full width on small screens */
    .col-sm-6,
    .col-md-6,
    .col-lg-4,
    .col-lg-3 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-dialog {
        max-width: 90%;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets */
    .btn,
    .nav-link,
    .page-link,
    .form-check-input,
    .form-check-label {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-check-label {
        padding: 0.5rem;
    }
    
    /* Better spacing for touch */
    .list-group-item {
        padding: 1rem;
    }
}