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

body {
  font-family: "Cinzel", "Georgia", serif;
  color: #f1e6c8;
  background: radial-gradient(circle at 40% 20%, #1b2735 0%, #0a0f18 80%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

.topbar {
  position: fixed;
  top: 12px;
  left: 20px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  color: #00ff99;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 255, 153, 0.4);
  z-index: 10;
}

.hero {
  text-align: center;
  margin-top: 120px;
  padding: 40px 20px;
}

.hero h1 {
  font-size: 54px;
  color: #c8aa6e;
  text-shadow: 0 0 12px rgba(200, 155, 60, 0.4);
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { text-shadow: 0 0 12px rgba(200,155,60,0.3); }
  to { text-shadow: 0 0 24px rgba(255,215,120,0.7); }
}

.tagline {
  color: #a7a9ac;
  font-size: 18px;
  margin-top: 10px;
}

.league-lookup {
  background: rgba(15, 20, 28, 0.85);
  border: 1px solid #c8aa6e;
  border-radius: 10px;
  padding: 40px;
  margin: 40px auto;
  width: 90%;
  max-width: 640px;
  box-shadow: 0 0 25px rgba(200, 155, 60, 0.15);
}

.league-lookup h3 {
  color: #f1e6c8;
  font-size: 28px;
  text-align: center;
  margin-bottom: 10px;
}

.league-lookup > p {
  color: #9da3a6;
  text-align: center;
  margin-bottom: 24px;
}

.lookup-form-container {
  max-width: 400px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  color: #c8aa6e;
  font-weight: 700;
  margin-bottom: 6px;
}

input,
select {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #3d4044;
  background: #0e131a;
  color: #f1e6c8;
  font-size: 15px;
}

.lookup-submit-btn {
  background: linear-gradient(90deg, #c8aa6e, #8c7853);
  border: none;
  color: #fff;
  padding: 12px 30px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  margin: 20px auto;
  transition: all 0.2s ease;
}
.lookup-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(200, 155, 60, 0.4);
}

.loading {
  text-align: center;
  color: #c8aa6e;
  font-weight: 600;
  margin-top: 16px;
}

.shimmer {
  background: linear-gradient(90deg, rgba(200,155,60,0.1) 25%, rgba(200,155,60,0.3) 50%, rgba(200,155,60,0.1) 75%);
  background-size: 200% 100%;
  animation: shimmerMove 1.5s infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes shimmerMove {
  from { background-position: -200% 0; }
  to { background-position: 200% 0; }
}

.lookup-message {
  text-align: center;
  font-weight: 600;
  margin-bottom: 20px;
  border-radius: 6px;
  padding: 10px;
}
.lookup-message.success {
  background: rgba(22, 44, 29, 0.5);
  color: #00ff99;
}
.lookup-message.error {
  background: rgba(44, 22, 22, 0.5);
  color: #ff6b6b;
}

.summoner-results {
  background: rgba(12, 15, 22, 0.8);
  border: 1px solid #c8aa6e;
  border-radius: 10px;
  padding: 20px;
  color: #f1e6c8;
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.summoner-card {
  text-align: center;
  margin-bottom: 20px;
}
.summoner-card h5 {
  font-size: 26px;
  color: #c8aa6e;
  text-shadow: 0 0 8px rgba(200,155,60,0.5);
}

.champions-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 12px;
  animation: fadeIn 0.6s ease both;
}

.champion-card {
  background: rgba(18, 22, 30, 0.9);
  border: 1px solid #3d4044;
  border-left: 4px solid #c8aa6e;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  animation: fadeIn 0.8s ease forwards;
  transition: all 0.2s ease-in-out;
}
.champion-card:hover {
  transform: scale(1.02);
  box-shadow: 0 0 12px rgba(200,155,60,0.4);
}

.champion-img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  border: 2px solid #c8aa6e;
  box-shadow: 0 0 8px rgba(200,155,60,0.5);
}

footer {
  text-align: center;
  color: #777;
  font-size: 14px;
  padding: 40px 0;
  margin-top: 40px;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .hero h1 { font-size: 36px; }
  .league-lookup { padding: 24px; }
  .lookup-submit-btn { width: 100%; }
  .topbar { font-size: 12px; padding: 4px 8px; }
}

/* -------------------------------------------------------------------
   Chat widget styles (Day 7 integration)
   ------------------------------------------------------------------ */
.chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 340px;
  height: 480px;
  background: linear-gradient(135deg, rgba(27, 39, 53, 0.95), rgba(118, 75, 162, 0.9));
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s ease;
  border: 1px solid rgba(200, 155, 60, 0.2);
  backdrop-filter: blur(6px);
}

.chat-container.minimized {
  height: 64px;
  transform: translateY(416px);
}

.chat-header {
  background: rgba(255, 255, 255, 0.08);
  padding: 14px 16px;
  border-radius: 14px 14px 0 0;
  color: #f1e6c8;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.5px;
}

.connection-status {
  font-size: 12px;
  opacity: 0.85;
}

.chat-messages {
  flex: 1;
  padding: 16px 18px;
  overflow-y: auto;
  background: rgba(10, 15, 24, 0.92);
  margin: 0 12px 12px;
  border-radius: 10px;
  max-height: 340px;
  border: 1px solid rgba(200, 155, 60, 0.15);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(118, 75, 162, 0.5);
  border-radius: 3px;
}

.message {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 82%;
  word-wrap: break-word;
  line-height: 1.4;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.user-message {
  background: linear-gradient(120deg, #007bff, #00c0ff);
  color: #ffffff;
  margin-left: auto;
  text-align: right;
}

.assistant-message {
  background: rgba(241, 230, 200, 0.12);
  color: #f1e6c8;
  margin-right: auto;
  border: 1px solid rgba(241, 230, 200, 0.15);
}

.chat-input-container {
  padding: 14px 16px 18px;
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  padding: 11px 14px;
  border: none;
  border-radius: 20px;
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  color: #f1e6c8;
  font-size: 14px;
}

.chat-input::placeholder {
  color: rgba(241, 230, 200, 0.6);
}

.chat-send-btn {
  background: linear-gradient(135deg, #28a745, #36d96c);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 18px;
}

.chat-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(40, 167, 69, 0.35);
}

.typing-indicator {
  padding: 8px 12px;
  background: rgba(241, 230, 200, 0.1);
  border-radius: 14px;
  margin-bottom: 12px;
  max-width: 80%;
  font-style: italic;
  color: rgba(241, 230, 200, 0.75);
}

@media (max-width: 768px) {
  .chat-container {
    width: calc(100vw - 24px);
    bottom: 12px;
    right: 12px;
    left: 12px;
    height: 420px;
  }

  .chat-container.minimized {
    transform: translateY(356px);
  }
}
