:root {
  --hogwarts-bg: #1a1a2e;
  --hogwarts-bg-dark: #0f0f1a;
  --hogwarts-text: #e8e8e8;
  --hogwarts-text-muted: #a0a0a0;
  --hogwarts-border: #2d2d4a;
  --hogwarts-gold: #d4af37;
  --hogwarts-gold-light: #f4d03f;
  
  --parchment-bg: #f4e4c1;
  --parchment-dark: #d4c4a1;
  --parchment-border: #b8956e;
  --ink-color: #2c1810;
  --ink-faded: #5a4030;
  
  --gryffindor-primary: #740001;
  --gryffindor-secondary: #D3A625;
  
  --slytherin-primary: #1A472A;
  --slytherin-secondary: #AAAAAA;
  
  --ravenclaw-primary: #0E1A40;
  --ravenclaw-secondary: #B08A68;
  
  --hufflepuff-primary: #372E29;
  --hufflepuff-secondary: #FFDB00;
  
  --success-color: #67c23a;
  --error-color: #f56c6c;
  --warning-color: #e6a23c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cinzel', 'Times New Roman', Georgia, serif;
  background: var(--hogwarts-bg);
  color: var(--hogwarts-text);
  min-height: 100vh;
  overflow-x: hidden;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: 
    radial-gradient(ellipse at top, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(116, 0, 1, 0.05) 0%, transparent 50%),
    var(--hogwarts-bg);
  position: relative;
  overflow: hidden;
  padding-right: 280px;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.02) 0%, transparent 30%);
  pointer-events: none;
}

.auth-card {
  background: 
    linear-gradient(145deg, rgba(244, 228, 193, 0.95) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 3px solid var(--parchment-border);
  border-radius: 8px;
  padding: 40px 36px 32px 36px;
  width: 400px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(212, 175, 55, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  background: 
    radial-gradient(ellipse at top left, transparent 0%, rgba(139, 90, 43, 0.3) 100%),
    radial-gradient(ellipse at bottom right, transparent 0%, rgba(139, 90, 43, 0.3) 100%);
  border-radius: 15px;
  z-index: -1;
  opacity: 0.5;
}

.seal-stamp {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, #c41e3a 0%, #8b1a2b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: bold;
  color: var(--hogwarts-gold);
  box-shadow: 
    0 3px 15px rgba(0, 0, 0, 0.4),
    inset 0 -2px 5px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(196, 30, 58, 0.3);
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.house-crests {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 3;
}

.house-crest {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
  transition: all 0.3s ease;
}

.house-crest:hover {
  opacity: 1;
  transform: scale(1.15) translateY(-5px);
}

.house-crest.gryffindor {
  background: linear-gradient(135deg, #740001, #ae0001);
  border: 2px solid #D3A625;
}

.house-crest.slytherin {
  background: linear-gradient(135deg, #1A472A, #2a623d);
  border: 2px solid #AAAAAA;
}

.house-crest.ravenclaw {
  background: linear-gradient(135deg, #0E1A40, #222f5b);
  border: 2px solid #B08A68;
}

.house-crest.hufflepuff {
  background: linear-gradient(135deg, #372E29, #60514a);
  border: 2px solid #FFDB00;
}

.auth-title {
  text-align: center;
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink-color);
  letter-spacing: 3px;
  text-shadow: 1px 1px 0 rgba(212, 175, 55, 0.3);
}

.auth-subtitle {
  text-align: center;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--ink-faded);
  letter-spacing: 1px;
}

.magic-divider {
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--parchment-border) 20%, 
    var(--hogwarts-gold) 50%, 
    var(--parchment-border) 80%, 
    transparent 100%);
  margin: 0 auto 24px;
  width: 60%;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink-faded);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 250, 240, 0.6);
  border: 2px solid var(--parchment-border);
  border-radius: 4px;
  color: var(--ink-color);
  font-size: 14px;
  font-family: 'Cinzel', serif;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--hogwarts-gold);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.8);
}

.form-input::placeholder {
  color: rgba(90, 64, 48, 0.5);
}

.form-select option {
  background: var(--parchment-bg);
  color: var(--ink-color);
}

.magic-btn {
  width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--hogwarts-gold) 0%, #b8956e 100%);
  border: none;
  border-radius: 4px;
  color: var(--ink-color);
  font-size: 15px;
  font-weight: 700;
  font-family: 'Cinzel', serif;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.magic-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 25px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(212, 175, 55, 0.3);
  background: linear-gradient(135deg, var(--hogwarts-gold-light) 0%, var(--hogwarts-gold) 100%);
}

.magic-btn:active {
  transform: translateY(0);
}

.magic-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--ink-faded);
}

.auth-link {
  color: var(--hogwarts-gold);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-link:hover {
  color: var(--ink-color);
  text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.error-message {
  color: #8b1a2b;
  font-size: 12px;
  margin-top: 6px;
  min-height: 18px;
}

.success-message {
  color: #2d5a27;
  font-size: 14px;
  text-align: center;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(45, 90, 39, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(45, 90, 39, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.loading-shimmer {
  background: linear-gradient(90deg, 
    var(--hogwarts-gold) 0%, 
    var(--hogwarts-gold-light) 50%, 
    var(--hogwarts-gold) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.dumbledore-panel {
  position: fixed;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  width: 240px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
}

.dumbledore-panel.dragging {
  transition: none;
}

.bubble-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-height: 380px;
  overflow: hidden;
  padding: 5px;
}

.bubble {
  background: 
    linear-gradient(145deg, rgba(244, 228, 193, 0.95) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 2px solid var(--parchment-border);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: bubbleIn 0.5s ease-out;
  position: relative;
  opacity: 0;
}

.bubble.show {
  opacity: 1;
}

.bubble::before {
  content: '⚠️';
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 16px;
}

.bubble-text {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--ink-color);
  line-height: 1.5;
  text-align: center;
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateX(50px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.dumbledore-avatar {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: 
    linear-gradient(145deg, var(--parchment-bg) 0%, var(--parchment-dark) 100%);
  border: 3px solid var(--hogwarts-gold);
  box-shadow: 
    0 6px 25px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(212, 175, 55, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: grab;
  transition: all 0.3s ease;
  overflow: hidden;
}

.dumbledore-avatar:hover {
  transform: scale(1.08);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(212, 175, 55, 0.5);
}

.dumbledore-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}

.dumbledore-avatar::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(45deg, transparent, rgba(212, 175, 55, 0.4), transparent);
  animation: rotate 4s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.dumbledore-label {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  color: var(--hogwarts-gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  text-align: center;
  margin-top: -3px;
}

.magic-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--hogwarts-gold);
  border-radius: 50%;
  opacity: 0.4;
  animation: float 8s infinite ease-in-out;
  box-shadow: 0 0 6px var(--hogwarts-gold);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-120px) translateX(40px) scale(0.8);
    opacity: 0.2;
  }
}

.logs-container {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 10px;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.logs-table th {
  background: rgba(212, 175, 55, 0.2);
  color: var(--ink-color);
  padding: 10px 8px;
  text-align: left;
  border-bottom: 2px solid var(--parchment-border);
  font-weight: 600;
  letter-spacing: 1px;
}

.logs-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(184, 149, 110, 0.3);
  color: var(--ink-color);
}

.logs-table tr:hover {
  background: rgba(212, 175, 55, 0.1);
}

.score-positive {
  color: #2d5a27;
  font-weight: 600;
}

.score-negative {
  color: #8b1a2b;
  font-weight: 600;
}

.no-logs {
  text-align: center;
  color: var(--ink-faded);
  padding: 20px;
  font-size: 14px;
}

.info-container {
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(255, 250, 240, 0.4);
  border: 1px solid var(--parchment-border);
  border-radius: 4px;
  margin-bottom: 10px;
}

.info-label {
  font-size: 13px;
  color: var(--ink-faded);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

.info-value {
  font-size: 16px;
  color: var(--ink-color);
  font-weight: 600;
}

.house-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

.house-badge.gryffindor {
  background: linear-gradient(135deg, #740001, #ae0001);
  color: #D3A625;
}

.house-badge.slytherin {
  background: linear-gradient(135deg, #1A472A, #2a623d);
  color: #AAAAAA;
}

.house-badge.ravenclaw {
  background: linear-gradient(135deg, #0E1A40, #222f5b);
  color: #B08A68;
}

.house-badge.hufflepuff {
  background: linear-gradient(135deg, #372E29, #60514a);
  color: #FFDB00;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.98) 0%, rgba(26, 26, 46, 0.95) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}

.brand-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--hogwarts-gold);
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
  border: 2px solid var(--hogwarts-gold);
  border-radius: 8px;
  color: var(--hogwarts-gold);
  font-size: 16px;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: linear-gradient(135deg, var(--hogwarts-gold) 0%, #b8956e 100%);
  color: var(--hogwarts-bg);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
}

.user-btn {
  background: linear-gradient(135deg, rgba(116, 0, 1, 0.3) 0%, rgba(212, 175, 55, 0.2) 100%);
}

.logout-nav-btn {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid rgba(245, 108, 108, 0.5);
  color: var(--error-color);
  font-size: 14px;
}

.logout-nav-btn:hover {
  background: rgba(245, 108, 108, 0.2);
  border-color: var(--error-color);
  color: var(--error-color);
  box-shadow: 0 0 15px rgba(245, 108, 108, 0.3);
}

.btn-icon {
  font-size: 18px;
}

.great-hall-container {
  min-height: 100vh;
  padding: 100px 40px 60px 40px;
  background: 
    radial-gradient(ellipse at top, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(116, 0, 1, 0.05) 0%, transparent 50%),
    var(--hogwarts-bg);
}

.hall-header {
  text-align: center;
  margin-bottom: 50px;
}

.hall-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--hogwarts-gold);
  letter-spacing: 4px;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.title-icon {
  font-size: 36px;
  animation: sparkle 2s infinite ease-in-out;
}

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.hall-subtitle {
  font-size: 18px;
  color: var(--hogwarts-text-muted);
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.ranking-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto 60px auto;
}

.house-card {
  position: relative;
  background: linear-gradient(145deg, rgba(244, 228, 193, 0.95) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 3px solid var(--parchment-border);
  border-radius: 16px;
  padding: 30px 25px;
  text-align: center;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(212, 175, 55, 0.2);
  transition: all 0.4s ease;
  overflow: hidden;
}

.house-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(212, 175, 55, 0.4);
}

.house-card.gryffindor {
  border-color: #D3A625;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(116, 0, 1, 0.3);
}

.house-card.slytherin {
  border-color: #AAAAAA;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(26, 71, 42, 0.3);
}

.house-card.ravenclaw {
  border-color: #B08A68;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(14, 26, 64, 0.3);
}

.house-card.hufflepuff {
  border-color: #FFDB00;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(55, 46, 41, 0.3);
}

.house-rank {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.house-icon {
  font-size: 60px;
  margin-bottom: 15px;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.house-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-color);
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.house-name-en {
  font-size: 14px;
  color: var(--ink-faded);
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.house-points-container {
  background: rgba(212, 175, 55, 0.15);
  border: 2px solid var(--hogwarts-gold);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
}

.house-points-label {
  font-size: 12px;
  color: var(--ink-faded);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.house-points-value {
  font-size: 42px;
  font-weight: 700;
  color: var(--hogwarts-gold);
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

.house-values {
  font-size: 13px;
  color: var(--ink-faded);
  font-style: italic;
}

.house-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.house-card:hover .house-glow {
  opacity: 1;
}

.dumbledore-section {
  max-width: 800px;
  margin: 0 auto 60px auto;
}

.dumbledore-card {
  background: linear-gradient(145deg, rgba(244, 228, 193, 0.95) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 3px solid var(--parchment-border);
  border-radius: 16px;
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 30px;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(212, 175, 55, 0.2);
}

.dumbledore-portrait {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
  animation: floatPortrait 3s infinite ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dumbledore-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

@keyframes floatPortrait {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.dumbledore-content {
  flex: 1;
}

.dumbledore-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-color);
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.dumbledore-title-text {
  font-size: 14px;
  color: var(--ink-faded);
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.dumbledore-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--hogwarts-gold) 50%, transparent 100%);
  margin-bottom: 15px;
}

.dumbledore-message {
  font-size: 16px;
  color: var(--ink-color);
  line-height: 1.6;
  font-style: italic;
}

.recent-activity {
  max-width: 1000px;
  margin: 0 auto;
}

.activity-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--hogwarts-gold);
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.activity-container {
  background: rgba(26, 26, 46, 0.5);
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 25px;
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(244, 228, 193, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.activity-item:hover {
  background: rgba(244, 228, 193, 0.1);
  border-color: rgba(212, 175, 55, 0.4);
}

.activity-icon {
  font-size: 24px;
}

.activity-content {
  flex: 1;
}

.activity-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.student-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--hogwarts-text);
}

.score-change {
  font-size: 18px;
  font-weight: 700;
}

.activity-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--hogwarts-text-muted);
}

.professor-name {
  color: var(--hogwarts-gold);
}

.activity-divider {
  opacity: 0.5;
}

.activity-reason {
  font-style: italic;
}

.activity-time {
  font-size: 12px;
  color: var(--hogwarts-text-muted);
  white-space: nowrap;
}

.loading-text,
.no-data,
.error-text {
  text-align: center;
  padding: 40px;
  font-size: 16px;
  color: var(--hogwarts-text-muted);
}

.error-text {
  color: var(--error-color);
}

.house-crests-floating {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
}

.crest {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.crest:hover {
  opacity: 1;
  transform: scale(1.2);
}

.gryffindor-crest {
  background: linear-gradient(135deg, #740001, #ae0001);
  border: 2px solid #D3A625;
}

.slytherin-crest {
  background: linear-gradient(135deg, #1A472A, #2a623d);
  border: 2px solid #AAAAAA;
}

.ravenclaw-crest {
  background: linear-gradient(135deg, #0E1A40, #222f5b);
  border: 2px solid #B08A68;
}

.hufflepuff-crest {
  background: linear-gradient(135deg, #372E29, #60514a);
  border: 2px solid #FFDB00;
}

.course-card {
  max-width: 1000px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.course-item-card {
  background: linear-gradient(145deg, rgba(244, 228, 193, 0.95) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 2px solid var(--parchment-border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.course-item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(184, 149, 110, 0.3);
}

.course-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-color);
  letter-spacing: 1px;
  margin: 0;
}

.course-actions-btn {
  display: flex;
  gap: 8px;
}

.course-action-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--hogwarts-gold) 0%, #b8956e 100%);
  border: none;
  border-radius: 6px;
  color: var(--ink-color);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.course-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.course-action-btn.delete-btn {
  background: linear-gradient(135deg, #8b1a2b 0%, #6b1520 100%);
  color: white;
}

.course-body {
  color: var(--ink-color);
}

.course-info {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.5;
}

.enroll-btn {
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--hogwarts-gold) 0%, #b8956e 100%);
  border: none;
  border-radius: 8px;
  color: var(--ink-color);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.enroll-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.enroll-btn.enrolled {
  background: linear-gradient(135deg, #2d5a27 0%, #1e3d1a 100%);
  color: white;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: linear-gradient(145deg, rgba(244, 228, 193, 0.98) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 3px solid var(--parchment-border);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid var(--parchment-border);
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
  color: var(--ink-color);
  letter-spacing: 2px;
}

.modal-close {
  font-size: 28px;
  font-weight: bold;
  color: var(--ink-color);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #8b1a2b;
}

.modal-body {
  padding: 20px;
  color: var(--ink-color);
}

.tab-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 24px;
  background: rgba(244, 228, 193, 0.3);
  border: 2px solid var(--parchment-border);
  border-radius: 8px;
  color: var(--ink-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: rgba(244, 228, 193, 0.5);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--hogwarts-gold) 0%, #b8956e 100%);
  border-color: var(--hogwarts-gold);
  color: var(--ink-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.schedule-table-container {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(244, 228, 193, 0.95);
  border-radius: 8px;
  overflow: hidden;
}

.schedule-table th {
  background: linear-gradient(135deg, var(--hogwarts-gold) 0%, #b8956e 100%);
  color: var(--ink-color);
  padding: 15px 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
}

.schedule-table td {
  padding: 12px 10px;
  border: 1px solid var(--parchment-border);
  vertical-align: top;
  min-width: 120px;
}

.time-cell {
  background: rgba(212, 175, 55, 0.2);
  font-weight: 600;
  text-align: center;
}

.course-cell {
  background: rgba(212, 175, 55, 0.15);
}

.schedule-course {
  font-weight: 600;
  color: var(--ink-color);
  margin-bottom: 5px;
}

.schedule-room {
  font-size: 12px;
  color: var(--ink-faded);
}

.schedule-professor {
  font-size: 12px;
  color: var(--ink-faded);
  font-style: italic;
}

.empty-cell {
  background: rgba(255, 255, 255, 0.3);
}

.performances-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.performance-item {
  background: rgba(244, 228, 193, 0.95);
  border: 2px solid var(--parchment-border);
  border-radius: 10px;
  padding: 15px;
}

.performance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--parchment-border);
}

.performance-course {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-color);
}

.performance-type {
  padding: 4px 12px;
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  font-size: 12px;
  color: var(--ink-color);
}

.performance-body p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-color);
}

.schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(212, 175, 55, 0.2);
  border-radius: 6px;
  margin-bottom: 8px;
}

.schedule-item span {
  font-size: 14px;
  color: var(--ink-color);
}

.delete-schedule-btn {
  padding: 4px 10px;
  background: linear-gradient(135deg, #8b1a2b 0%, #6b1520 100%);
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 12px;
  cursor: pointer;
}

.delete-schedule-btn:hover {
  opacity: 0.8;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.loading-content {
  background: linear-gradient(145deg, rgba(244, 228, 193, 0.98) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 3px solid var(--parchment-border);
  border-radius: 12px;
  padding: 30px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(212, 175, 55, 0.3);
  border-top: 4px solid var(--hogwarts-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-color);
  letter-spacing: 2px;
}

.toast-container {
  position: fixed;
  top: 90px;
  right: 30px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
}

.toast {
  background: linear-gradient(145deg, rgba(244, 228, 193, 0.98) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 2px solid var(--parchment-border);
  border-radius: 10px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.4s ease-out;
  min-width: 300px;
}

.toast.hide {
  animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 15px;
  color: var(--ink-color);
  font-weight: 500;
}

.toast.success {
  border-color: #2d5a27;
}

.toast.success .toast-icon {
  color: #2d5a27;
}

.toast.error {
  border-color: #8b1a2b;
}

.toast.error .toast-icon {
  color: #8b1a2b;
}

.toast.warning {
  border-color: #e6a23c;
}

.toast.warning .toast-icon {
  color: #e6a23c;
}

.toast.info {
  border-color: var(--hogwarts-gold);
}

.toast.info .toast-icon {
  color: var(--hogwarts-gold);
}

.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9997;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.confirm-overlay.show {
  opacity: 1;
  visibility: visible;
}

.confirm-dialog {
  background: linear-gradient(145deg, rgba(244, 228, 193, 0.98) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 3px solid var(--parchment-border);
  border-radius: 12px;
  padding: 30px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: confirmIn 0.3s ease-out;
}

@keyframes confirmIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.confirm-icon {
  text-align: center;
  font-size: 48px;
  margin-bottom: 15px;
}

.confirm-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-color);
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.confirm-message {
  text-align: center;
  font-size: 15px;
  color: var(--ink-color);
  line-height: 1.6;
  margin-bottom: 25px;
}

.confirm-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.confirm-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
}

.confirm-btn.cancel {
  background: rgba(184, 149, 110, 0.3);
  color: var(--ink-color);
  border: 2px solid var(--parchment-border);
}

.confirm-btn.cancel:hover {
  background: rgba(184, 149, 110, 0.5);
  transform: translateY(-2px);
}

.confirm-btn.confirm {
  background: linear-gradient(135deg, var(--hogwarts-gold) 0%, #b8956e 100%);
  color: var(--ink-color);
}

.confirm-btn.confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.confirm-btn.danger {
  background: linear-gradient(135deg, #8b1a2b 0%, #6b1520 100%);
  color: white;
}

.confirm-btn.danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.course-color-1 { background: rgba(116, 0, 1, 0.25); border-left: 4px solid #740001; }
.course-color-2 { background: rgba(26, 71, 42, 0.25); border-left: 4px solid #1A472A; }
.course-color-3 { background: rgba(14, 26, 64, 0.25); border-left: 4px solid #0E1A40; }
.course-color-4 { background: rgba(55, 46, 41, 0.25); border-left: 4px solid #372E29; }
.course-color-5 { background: rgba(212, 175, 55, 0.25); border-left: 4px solid #d4af37; }
.course-color-6 { background: rgba(176, 138, 104, 0.25); border-left: 4px solid #B08A68; }
.course-color-7 { background: rgba(170, 170, 170, 0.25); border-left: 4px solid #AAAAAA; }
.course-color-8 { background: rgba(211, 166, 37, 0.25); border-left: 4px solid #D3A625; }

@media (max-width: 1200px) {
  .ranking-container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .courses-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0 20px;
    height: 60px;
  }
  
  .brand-text {
    font-size: 18px;
    letter-spacing: 2px;
  }
  
  .nav-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .great-hall-container {
    padding: 80px 20px 40px 20px;
  }
  
  .hall-title {
    font-size: 28px;
    letter-spacing: 2px;
  }
  
  .auth-container {
    padding-right: 20px;
    padding-left: 20px;
  }
  
  .auth-card {
    width: 100%;
    max-width: 400px;
    padding: 30px 25px 25px 25px;
  }
  
  .dumbledore-panel {
    display: none;
  }
  
  .house-crests-floating {
    display: none;
  }
  
  .ranking-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .courses-grid {
    grid-template-columns: 1fr;
  }
  
  .schedule-table-container {
    overflow-x: scroll;
  }
  
  .schedule-table {
    min-width: 600px;
  }
  
  .tab-container {
    flex-wrap: wrap;
  }
  
  .tab-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .modal-content {
    width: 95%;
    max-width: none;
  }
  
  .toast-container {
    right: 15px;
    left: 15px;
    max-width: none;
  }
  
  .toast {
    min-width: auto;
  }
  
  .confirm-dialog {
    padding: 20px;
  }
  
  .confirm-actions {
    flex-direction: column;
  }
  
  .confirm-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 16px;
  }
  
  .nav-btn {
    padding: 6px 12px;
    font-size: 12px;
    letter-spacing: 1px;
  }
  
  .hall-title {
    font-size: 24px;
  }
  
  .hall-subtitle {
    font-size: 14px;
  }
  
  .house-card {
    padding: 20px 15px;
  }
  
  .house-points-value {
    font-size: 32px;
  }
  
  .course-item-card {
    padding: 15px;
  }
  
  .course-title {
    font-size: 18px;
  }
}

.sorting-hat-trigger {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, rgba(244, 228, 193, 0.95) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 3px solid var(--hogwarts-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
  z-index: 999;
  animation: hatFloat 3s ease-in-out infinite;
}

.sorting-hat-trigger:hover {
  transform: scale(1.15) rotate(10deg);
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(212, 175, 55, 0.5);
}

@keyframes hatFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

.sorting-hat-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.sorting-hat-modal.show {
  opacity: 1;
  visibility: visible;
}

.sorting-hat-content {
  background: linear-gradient(145deg, rgba(244, 228, 193, 0.98) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 4px solid var(--parchment-border);
  border-radius: 20px;
  padding: 40px 35px;
  max-width: 600px;
  width: 90%;
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(212, 175, 55, 0.3);
  animation: hatModalIn 0.5s ease-out;
}

@keyframes hatModalIn {
  from {
    opacity: 0;
    transform: scale(0.7) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.sorting-hat-icon {
  text-align: center;
  font-size: 80px;
  margin-bottom: 15px;
  animation: hatWiggle 2s ease-in-out infinite;
}

@keyframes hatWiggle {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

.sorting-hat-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink-color);
  letter-spacing: 4px;
  margin-bottom: 5px;
  text-shadow: 2px 2px 0 rgba(212, 175, 55, 0.3);
}

.sorting-hat-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--ink-faded);
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.sorting-hat-divider {
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--parchment-border) 20%, 
    var(--hogwarts-gold) 50%, 
    var(--parchment-border) 80%, 
    transparent 100%);
  margin: 0 auto 25px;
  width: 80%;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.sorting-hat-message {
  font-size: 18px;
  color: var(--ink-color);
  line-height: 1.8;
  text-align: center;
  margin-bottom: 30px;
  min-height: 80px;
  font-style: italic;
  padding: 0 10px;
}

.sorting-hat-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.sorting-hat-option {
  padding: 15px 25px;
  background: rgba(255, 250, 240, 0.6);
  border: 2px solid var(--parchment-border);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
  text-align: center;
}

.sorting-hat-option:hover:not(:disabled) {
  background: rgba(212, 175, 55, 0.3);
  border-color: var(--hogwarts-gold);
  transform: translateX(10px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.sorting-hat-option:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.sorting-hat-option.correct {
  background: rgba(45, 90, 39, 0.3);
  border-color: #2d5a27;
  animation: correctPulse 0.5s ease;
}

@keyframes correctPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.sorting-hat-option.wrong {
  background: rgba(139, 26, 43, 0.3);
  border-color: #8b1a2b;
  animation: wrongShake 0.5s ease;
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.sorting-hat-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.sorting-hat-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Cinzel', serif;
  letter-spacing: 2px;
}

.sorting-hat-btn.close-btn {
  background: rgba(184, 149, 110, 0.3);
  color: var(--ink-color);
  border: 2px solid var(--parchment-border);
}

.sorting-hat-btn.close-btn:hover {
  background: rgba(184, 149, 110, 0.5);
  transform: translateY(-2px);
}

.sorting-hat-btn.next-btn {
  background: linear-gradient(135deg, var(--hogwarts-gold) 0%, #b8956e 100%);
  color: var(--ink-color);
}

.sorting-hat-btn.next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.house-effect-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--house-bg);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  overflow: hidden;
}

.house-effect-overlay.show {
  opacity: 1;
}

.house-effect-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.effect-particle {
  position: absolute;
  animation: effectFloat 3s ease-out forwards;
  opacity: 0;
  filter: drop-shadow(0 0 10px var(--house-color));
}

@keyframes effectFloat {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) scale(1.5) rotate(360deg);
  }
}

.house-effect-content {
  text-align: center;
  z-index: 1;
  animation: contentFadeIn 0.8s ease-out;
}

@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.house-effect-icon {
  font-size: 120px;
  margin-bottom: 20px;
  animation: iconPulse 1s ease-in-out infinite;
  filter: drop-shadow(0 0 30px var(--house-color));
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.house-effect-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--house-color);
  letter-spacing: 6px;
  margin-bottom: 20px;
  text-shadow: 
    0 0 20px var(--house-color),
    0 0 40px var(--house-color);
  animation: titleGlow 1.5s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { 
    text-shadow: 
      0 0 20px var(--house-color),
      0 0 40px var(--house-color);
  }
  50% { 
    text-shadow: 
      0 0 30px var(--house-color),
      0 0 60px var(--house-color),
      0 0 80px var(--house-color);
  }
}

.house-effect-message {
  font-size: 28px;
  color: var(--hogwarts-text);
  letter-spacing: 3px;
  margin-bottom: 30px;
  font-weight: 600;
}

.house-effect-quote {
  font-size: 18px;
  color: var(--hogwarts-text-muted);
  font-style: italic;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.time-turner-trigger {
  position: fixed;
  bottom: 100px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.95) 0%, rgba(184, 149, 110, 0.98) 100%);
  border: 3px solid var(--hogwarts-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(212, 175, 55, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  z-index: 998;
  animation: timeTurnerGlow 2s ease-in-out infinite;
}

.time-turner-trigger:hover {
  transform: scale(1.15) rotate(360deg);
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(212, 175, 55, 0.7);
}

@keyframes timeTurnerGlow {
  0%, 100% { 
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.4),
      0 0 30px rgba(212, 175, 55, 0.5);
  }
  50% { 
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.4),
      0 0 50px rgba(212, 175, 55, 0.8);
  }
}

.time-turner-panel {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  max-height: 80vh;
  background: linear-gradient(145deg, rgba(244, 228, 193, 0.98) 0%, rgba(212, 196, 161, 0.98) 100%);
  border: 3px solid var(--parchment-border);
  border-radius: 16px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(212, 175, 55, 0.3);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
  padding: 20px;
}

.time-turner-panel.show {
  opacity: 1;
  visibility: visible;
}

.time-turner-header {
  text-align: center;
  margin-bottom: 15px;
  cursor: move;
}

.time-turner-icon {
  font-size: 48px;
  margin-bottom: 10px;
  animation: timeTurnerSpin 3s linear infinite;
}

@keyframes timeTurnerSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.time-turner-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-color);
  letter-spacing: 3px;
}

.time-turner-subtitle {
  font-size: 12px;
  color: var(--ink-faded);
  letter-spacing: 1px;
  margin-top: 5px;
}

.time-turner-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: rgba(139, 26, 43, 0.2);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  color: var(--ink-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.time-turner-close:hover {
  background: rgba(139, 26, 43, 0.4);
  transform: rotate(90deg);
}

.time-turner-info {
  margin-bottom: 15px;
}

.time-turner-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3) 0%, rgba(212, 175, 55, 0.2) 100%);
  border: 2px solid var(--hogwarts-gold);
  border-radius: 8px;
}

.badge-icon {
  font-size: 20px;
}

.badge-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-color);
  letter-spacing: 1px;
}

.time-turner-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--hogwarts-gold) 50%, transparent 100%);
  margin: 15px 0;
}

.time-turner-instruction {
  text-align: center;
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
}

.time-turner-instruction p {
  margin: 5px 0;
  font-size: 13px;
  color: var(--ink-color);
}

.instruction-note {
  font-size: 11px !important;
  color: var(--ink-faded) !important;
  font-style: italic;
}

.time-turner-activities {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.time-turner-activity {
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid var(--parchment-border);
  border-radius: 10px;
  padding: 12px;
  cursor: grab;
  transition: all 0.3s ease;
}

.time-turner-activity:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--hogwarts-gold);
  transform: translateX(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.time-turner-activity.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.time-turner-activity.enrolled {
  background: rgba(45, 90, 39, 0.15);
  border-color: #2d5a27;
  cursor: default;
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.activity-icon {
  font-size: 18px;
}

.activity-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-color);
  flex: 1;
}

.enrolled-badge {
  padding: 2px 8px;
  background: #2d5a27;
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.activity-time, .activity-location, .activity-info, .activity-desc {
  font-size: 12px;
  color: var(--ink-faded);
  margin: 4px 0;
}

.activity-desc {
  font-size: 11px;
  line-height: 1.4;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--parchment-border);
}

.schedule-table td.drop-highlight {
  background: rgba(212, 175, 55, 0.4) !important;
  border: 3px dashed var(--hogwarts-gold) !important;
  animation: dropPulse 0.5s ease infinite;
}

@keyframes dropPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.schedule-table td.drop-reject {
  background: rgba(139, 26, 43, 0.3) !important;
  border: 3px dashed #8b1a2b !important;
}

.schedule-table td.drag-over {
  background: rgba(212, 175, 55, 0.6) !important;
  border: 3px solid var(--hogwarts-gold) !important;
}

.schedule-table td.split-cell {
  padding: 0 !important;
  vertical-align: top;
}

.split-cell-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.split-cell-top, .split-cell-bottom {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 40px;
}

.split-cell-divider {
  height: 2px;
  background: var(--parchment-border);
  margin: 0;
}

.split-course-name, .split-activity-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-color);
  margin-bottom: 3px;
}

.split-detail {
  font-size: 11px;
  color: var(--ink-faded);
}

.split-cell-bottom {
  position: relative;
}

.activity-delete-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  background: rgba(139, 26, 43, 0.7);
  border: 1px solid #8b1a2b;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.split-cell-bottom:hover .activity-delete-btn {
  opacity: 1;
}

.activity-delete-btn:hover {
  background: rgba(139, 26, 43, 1);
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(139, 26, 43, 0.5);
}
