body {
    background-color: #f8f9fa;
  }
  .category-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    margin-bottom: 15px;
  }
  .category-header {
    cursor: pointer;
  }
  .subcategory-list {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .subcategory-badge {
    padding: 10px 15px;
    background-color: #e3f2fd;
    border-radius: 30px;
    transition: all 0.3s ease;
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
  }
  .subcategory-badge:hover {
    background-color: #bbdefb;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transform: translateY(-2px);
  }

  .exam-info-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  }

  .exam-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
  }
  .exam-card:hover {
    transform: translateY(-5px);
  }
  .view-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: #0d6efd;
  }
  .view-toggle.active {
    font-weight: bold;
    text-decoration: underline;
  }
  .search-container {
    width: 75%;
    margin: 0 auto;
  }
  .search-input {
    height: 60px;
    font-size: 1.2rem;
  }
  .search-icon {
    height: 60px;
    font-size: 1.2rem;
  }

  .category-card {
    transition: transform 0.2s ease;
    cursor: pointer;
  }
  .category-card:hover {
    transform: scale(1.03);
  }
  .category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    transition: all 0.3s ease;
  }
  .category-card:hover .category-icon {
    transform: rotate(360deg);
  }
  .leaderboard-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
  }

  .subcategory-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
    text-align: center;
  }
  .subcategory-card:hover {
    transform: translateY(-4px);
  }
  .subcategory-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    object-fit: contain;
  }


  .exam-container {
    flex: 1;
    display: flex;
    width: 100%;
    padding: 20px;
}
.progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    height: 10px;
    margin-bottom: 20px;
}
.progress-bar {
    height: 100%;
    background-color: #00acc1;
    transition: width 0.3s ease;
}
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 20px;
}
.question-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
}
.timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e53e3e;
    margin-bottom: 15px;
}
.question {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #2d3748;
}
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.option {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}
.option:hover {
    background-color: #f0f0f0;
}
.option input {
    display: none;
}
.option.selected {
    background-color: #e0f7fa;
    border-color: #00acc1;
}
.option img {
    max-width: 80px;
    height: auto;
    margin: 5px;
}
.navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}
.nav-btn {
    background: linear-gradient(135deg, #00acc1, #007b8f);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}
.nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.nav-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.sidebar {
    width: 200px;
    background: #f7f7f7;
    padding: 15px;
    border-left: 1px solid #ddd;
    overflow-y: auto;
}
.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}
.grid-item {
    width: 30px;
    height: 30px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
}
.grid-item.answered {
    background: #00acc1;
    color: #fff;
}
.grid-item.marked {
    background: #ffca28;
    color: #fff;
}
.grid-item.current {
    background: #80deea;
    color: #fff;
}
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #fff;
    border-top: 1px solid #ddd;
}
.status {
    font-size: 0.9rem;
}
.status span {
    font-weight: bold;
}
.status-answered { color: #00acc1; }
.status-marked { color: #ffca28; }
.status-skipped { color: #ff5252; }
.status-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mark-btn {
    background: linear-gradient(135deg, #ffca28, #ffb300);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.mark-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.mark-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.info-btn {
    position: relative;
    background: linear-gradient(135deg, #00acc1, #007b8f);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.info-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.info-btn:hover .tooltip, .info-btn.active .tooltip {
    visibility: visible;
    opacity: 1;
}
.tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 40px;
    right: 0;
    background: linear-gradient(135deg, #333, #555);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(5px);
}
.tooltip.visible {
    transform: translateY(0);
}
.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 10px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header {
        padding: 8px 10px;
    }
    .header .logo img {
        height: 25px;
    }
    .header .user {
        font-size: 0.9rem;
    }
    .exam-container {
        padding: 10px;
    }
    .main-content {
        padding-right: 0;
    }
    .question-card {
        padding: 15px;
        max-width: 100%;
    }
    .timer {
        font-size: 1.2rem;
    }
    .question {
        font-size: 1rem;
    }
    .option {
        padding: 8px;
        font-size: 0.9rem;
    }
    .option img {
        max-width: 60px;
    }
    .navigation {
        margin-top: 10px;
    }
    .nav-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    .sidebar {
        display: none; /* Hide number list on mobile */
    }
    .status-bar {
        padding: 8px 10px;
        flex-direction: column;
        gap: 8px;
    }
    .status {
        font-size: 0.8rem;
    }
    .status-actions {
        gap: 8px;
    }
    .mark-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    .info-btn {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
    .tooltip {
        font-size: 0.7rem;
        bottom: 35px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 6px 8px;
    }
    .header .logo img {
        height: 20px;
    }
    .header .user {
        font-size: 0.8rem;
    }
    .question {
        font-size: 0.9rem;
    }
    .option {
        padding: 6px;
        font-size: 0.8rem;
    }
    .option img {
        max-width: 50px;
    }
    .nav-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    .tooltip {
        right: -20px;
    }
}