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

:root {
  --bg-primary: #191919;
  --bg-secondary: #202020;
  --bg-tertiary: #2f2f2f;
  --bg-hover: #363636;
  --text-primary: #ebebeb;
  --text-secondary: #9b9b9b;
  --text-muted: #6b6b6b;
  --accent: #2383e2;
  --accent-hover: #0077d4;
  --border: #363636;
  --success: #2ecc71;
  --error: #e74c3c;
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-height: 100vh;
  padding: 40px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.container.shifted {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.minimized {
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--border);
  max-width: 320px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: white;
}

.card-header h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

.input-group {
  margin-bottom: 20px;
  transition: all 0.3s ease;
  overflow: hidden;
  max-height: 100px;
  opacity: 1;
}

.input-group.hidden {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.15);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  width: auto;
  padding: 12px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 32px;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.results-panel {
  background: var(--bg-primary);
  padding: 48px 64px;
  flex: 1;
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}

.results-panel.visible {
  opacity: 1;
  transform: translateX(0);
}

.results-panel.hidden {
  display: none;
}

.loader-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.loader-container.hidden {
  display: none;
}

.loader-text {
  color: var(--text-secondary);
  font-size: 14px;
}

.results-content {
  width: 100%;
  max-width: 700px;
}

.results-content.hidden {
  display: none;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.user-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.user-info h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.user-meta {
  color: var(--text-secondary);
  font-size: 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.info-item {
  background: var(--bg-secondary);
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.info-item.full-width {
  grid-column: span 3;
}

.info-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.enrollments-section h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.enrollments-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  max-height: none;
}

.enrollments-list::-webkit-scrollbar {
  width: 6px;
}

.enrollments-list::-webkit-scrollbar-track {
  background: transparent;
}

.enrollments-list::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 3px;
}

.enrollment-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.enrollment-item:hover {
  border-color: var(--text-muted);
}

.enrollment-info {
  flex: 1;
  min-width: 0;
}

.enrollment-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.enrollment-subject {
  font-size: 12px;
  color: var(--text-secondary);
}

.enrollment-stats {
  text-align: right;
  flex-shrink: 0;
}

.enrollment-grade {
  font-size: 14px;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 2px;
}

.enrollment-progress {
  font-size: 11px;
  color: var(--text-muted);
}

.enrollment-badge {
  display: inline-block;
  padding: 2px 6px;
  background: var(--accent);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: white;
  margin-left: 8px;
  vertical-align: middle;
}

.error-content {
  text-align: center;
  width: 100%;
}

.error-content.hidden {
  display: none;
}

.error-icon {
  color: var(--error);
  margin-bottom: 16px;
}

.error-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.error-content p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
  
  .card {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-width: 100%;
    padding: 32px 24px;
  }
  
  .container.shifted {
    justify-content: flex-start;
  }
  
  .card.minimized {
    max-width: 100%;
  }
  
  .results-panel {
    padding: 24px;
  }
}
