* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
  }
  
  /* Header */
  .header {
    background: linear-gradient(135deg, #6b46c1, #9333ea);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
  }
  
  .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
  }
  
  .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
  }
  
  .user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    cursor: pointer;
  }
  
  /* Sidebar */
  .sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 280px;
    height: calc(100vh - 70px);
    background: white;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 999;
  }
  
  .sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .logo-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b46c1;
    font-weight: bold;
  }
  
  .sidebar-nav {
    padding: 0;
  }
  
  .sidebar-nav > ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .sidebar-nav li {
    position: relative;
  }
  
  .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
  }
  
  .nav-link:hover {
    background-color: #f3f4f6;
    color: #6b46c1;
  }
  
  .nav-link.active {
    background-color: #e0e7ff;
    color: #6b46c1;
    border-right: 3px solid #6b46c1;
  }
  
  .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
  }
  
  /* Dropdown Styles */
  .nav-item-dropdown {
    position: relative;
  }
  
  .dropdown-toggle {
    position: relative;
  }
  
  .dropdown-toggle .fa-chevron-down {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
  }
  
  .nav-item-dropdown.active .fa-chevron-down {
    transform: rotate(180deg);
  }
  
  .dropdown-menu {
    display: none;
    background-color: #f8fafc;
    border-left: 3px solid #6b46c1;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    transition: all 0.3s ease;
  }
  
  .nav-item-dropdown.active .dropdown-menu {
    display: block;
    animation: slideDown 0.3s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      max-height: 0;
    }
    to {
      opacity: 1;
      max-height: 500px;
    }
  }
  
  .dropdown-menu li {
    position: relative;
  }
  
  .dropdown-menu .nav-link {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.9rem;
    color: #4b5563;
    border-left: none;
  }
  
  .dropdown-menu .nav-link:hover {
    background-color: #e5e7eb;
    color: #6b46c1;
    padding-left: 2.75rem;
  }
  
  .dropdown-menu .nav-link.active {
    background-color: #ddd6fe;
    color: #6b46c1;
    border-right: 2px solid #6b46c1;
  }
  
  /* Nested dropdown */
  .dropdown-menu .nav-item-dropdown .dropdown-menu {
    background-color: #f1f5f9;
    border-left: 2px solid #a855f7;
    margin-left: 1rem;
  }
  
  .dropdown-menu .nav-item-dropdown .nav-link {
    padding-left: 3rem;
    font-size: 0.85rem;
  }
  
  .dropdown-menu .nav-item-dropdown .dropdown-menu .nav-link {
    padding-left: 4rem;
    color: #6b7280;
  }
  
  .dropdown-menu .nav-item-dropdown .dropdown-menu .nav-link:hover {
    background-color: #e2e8f0;
    padding-left: 4.25rem;
  }
  
  /* Sidebar icons */
  .nav-link i.fas {
    color: #6b7280;
    transition: color 0.2s;
  }
  
  .nav-link:hover i.fas,
  .nav-link.active i.fas {
    color: #6b46c1;
  }
  
  /* Mobile sidebar improvements */
  @media (max-width: 768px) {
    .sidebar {
      transform: translateX(-100%);
      transition: transform 0.3s ease;
    }
  
    .sidebar.active {
      transform: translateX(0);
      box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
  
    .nav-link {
      padding: 1rem;
    }
  
    .dropdown-menu .nav-link {
      padding: 0.75rem 1rem 0.75rem 2.5rem;
    }
  }
  
  /* Main Content */
  .main-content {
    margin-left: 280px;
    margin-top: 70px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
  }
  
  .page-header {
    margin-bottom: 2rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
  }
  
  .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
  }
  
  .breadcrumb a {
    color: #6b46c1;
    text-decoration: none;
  }
  
  /* Messages */
  .messages {
    margin-bottom: 1rem;
  }
  
  .alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
  }
  
  .alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
  }
  
  .alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
  }
  
  .alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
  }
  
  /* Statistics Cards */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
  }
  
  .stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
  }
  
  .stat-card.purple {
    background: linear-gradient(135deg, #6b46c1, #8b5cf6);
    color: white;
  }
  
  .stat-card.blue {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
  }
  
  .stat-card.pink {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: white;
  }
  
  .stat-card.light-blue {
    background: linear-gradient(135deg, #06b6d4, #0ea5e9);
    color: white;
  }
  
  .stat-card.green {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
  }
  
  .stat-content h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
  }
  
  .stat-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
  }
  
  .stat-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1rem;
  }
  
  .stat-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
  }
  
  /* Documents Grid */
  .documents-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
  
  .document-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
  }
  
  .documents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .document-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
  }
  
  .document-card:hover {
    border-color: #6b46c1;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
  }
  
  .document-icon {
    font-size: 2rem;
    color: #dc2626;
    width: 60px;
    text-align: center;
  }
  
  .document-info {
    flex: 1;
  }
  
  .document-info h3 {
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
  }
  
  .document-info p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .document-meta {
    font-size: 0.8rem;
    color: #9ca3af;
  }
  
  .document-actions {
    display: flex;
    gap: 0.5rem;
  }
  
  /* Materials Grid */
  .materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
  }
  
  .material-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .material-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
  }
  
  .material-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .material-type-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #e0e7ff;
    color: #6b46c1;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
  }
  
  .duration {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
    font-size: 0.8rem;
  }
  
  .material-content {
    padding: 1.5rem;
  }
  
  .material-content h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
  }
  
  .material-content p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  
  .material-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }
  
  .credits {
    font-weight: bold;
    color: #1f2937;
  }
  
  .date {
    color: #9ca3af;
  }
  
  .material-actions {
    display: flex;
    gap: 0.5rem;
  }
  
  /* Controls Grid */
  .controls-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
  
  .control-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .controls-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .control-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
  }
  
  .control-card:hover {
    border-color: #6b46c1;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
  }
  
  .control-header h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
  }
  
  .control-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
  }
  
  .control-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .control-content p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  
  .control-actions {
    display: flex;
    gap: 0.5rem;
  }
  
  /* Test Container */
  .test-container {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .test-info {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .test-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
  }
  
  .test-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .timer-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: #dc2626;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #fef2f2;
    border-radius: 8px;
  }
  
  .question-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .question-number {
    font-weight: bold;
    color: #6b46c1;
  }
  
  .question-points {
    background-color: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
  }
  
  .question-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #1f2937;
  }
  
  .answers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .answer-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .answer-option:hover {
    background-color: #f8fafc;
    border-color: #6b46c1;
  }
  
  .answer-option input[type="radio"] {
    margin: 0;
  }
  
  .answer-text {
    flex: 1;
    line-height: 1.5;
  }
  
  .written-answer textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
  }
  
  .written-answer textarea:focus {
    outline: none;
    border-color: #6b46c1;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
  }
  
  .test-actions {
    text-align: center;
    margin-top: 2rem;
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.9rem;
  }
  
  .btn-primary {
    background-color: #f59e0b;
    color: white;
  }
  
  .btn-primary:hover {
    background-color: #d97706;
  }
  
  .btn-outline {
    background-color: transparent;
    color: #6b46c1;
    border: 2px solid #6b46c1;
  }
  
  .btn-outline:hover {
    background-color: #6b46c1;
    color: white;
  }
  
  .btn-success {
    background-color: #10b981;
    color: white;
  }
  
  .btn-success:hover {
    background-color: #059669;
  }
  
  .btn-disabled {
    background-color: #9ca3af;
    color: white;
    cursor: not-allowed;
  }
  
  .btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  /* No content states */
  .no-documents,
  .no-materials,
  .no-controls {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .sidebar {
      transform: translateX(-100%);
    }
  
    .sidebar.active {
      transform: translateX(0);
    }
  
    .main-content {
      margin-left: 0;
    }
  
    .stats-grid {
      grid-template-columns: 1fr;
    }
  
    .materials-grid {
      grid-template-columns: 1fr;
    }
  
    .documents-grid {
      gap: 1rem;
    }
  
    .document-card {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .document-actions {
      width: 100%;
      justify-content: flex-start;
    }
  
    .control-meta {
      flex-direction: column;
      gap: 0.5rem;
    }
  
    .test-meta {
      flex-direction: column;
      gap: 0.5rem;
    }
  
    .material-actions {
      flex-direction: column;
    }
  }
  
  @media (max-width: 480px) {
    .main-content {
      padding: 1rem;
    }
  
    .page-header h1 {
      font-size: 1.5rem;
    }
  
    .stat-number {
      font-size: 2rem;
    }
  
    .btn {
      padding: 0.5rem 1rem;
      font-size: 0.8rem;
    }
  }
  
  /* Notification Styles */
  .notification {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1001;
    min-width: 300px;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
  }
  
  .notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    gap: 1rem;
  }
  
  .notification-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
  }
  
  .notification-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
  }
  
  .notification-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
  }
  
  .notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
  }
  
  .notification-close:hover {
    opacity: 1;
  }
  
  @keyframes slideInRight {
    from {
      transform: translateX(100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  /* Sidebar improvements */
  .sidebar::-webkit-scrollbar {
    width: 6px;
  }
  
  .sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  .sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
  }
  
  .sidebar::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
  }
  