/* Body Styles */
body {
  font-family: Arial, sans-serif;
  background: #1e1e2f;
  color: #fff;
  text-align: center;
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* Background iframe (full screen) */
.background-iframe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: -1;
}

/* Main Container */
.container {
  max-width: 900px;
  width: 100%;
  margin: 20px;
  padding: 2rem;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(0, 0, 255, 0.8);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-bottom: 2rem;
  flex-grow: 1;
}

/* Textarea Styling */
#input-area {
  width: 100%;
  height: 100px;
  font-size: 1.5rem;
  margin-top: 1rem;
  padding: 10px;
  border: 2px solid rgba(0, 0, 255, 0.8);
  border-radius: 8px;
  resize: none;
  background: rgba(0, 0, 0, 0.6);
  color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.difficulty-time-container {
  width: 100%;
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  gap: 35px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 3px solid #00eaff;
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.5);
  margin-bottom: 25px;
  font-family: 'Orbitron', sans-serif;
}

.difficulty-time-container label {
  color: #00eaff;
  font-weight: 700;
  font-size: 1rem;
  margin-right: 6px;
  text-shadow: 0 0 6px #00eaff, 0 0 12px #00bcd4;
}

.difficulty-time-container select {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 2px solid #00eaff;
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 12px #00eaff;
  transition: all 0.3s ease;
}

.difficulty-time-container select:hover {
  box-shadow: 0 0 20px #00eaff, 0 0 40px #00bcd4;
  color: #00ffea;
}

.difficulty-time-container select option {
  background: #1e1e2f;
  color: #00eaff;
}

/* Toggle Button */
.keyboard-toggle {
  display: none;
}

#keyboard-toggle:checked ~ #keyboard {
  display: flex;
}

#toggle-keyboard {
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.6);
  border: 2px solid #00bcd4;
  padding: 10px 20px;
  border-radius: 8px;
  color: #00e5ff;
  font-size: 16px;
  margin-top: 10px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
  transition: all 0.3s ease;
}

#toggle-keyboard:hover {
  box-shadow: 0 0 20px rgba(0, 255, 255, 1);
  color: #fff;
}

/* Footer */
footer {
  width: 100%;
  padding: 1rem;
  text-align: center;
  background: none;
  color: white;
  margin-top: 20px;
}

/* Keyboard keys */
.key-row {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

/* Virtual Keyboard Styling (matches title) */
#keyboard {
  margin-top: 2rem;
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-family: 'Orbitron', sans-serif;
}

.key {
  width: 55px;
  height: 55px;
  font-size: 1.6rem;
  font-weight: 700;
  background-color: rgba(0, 0, 0, 0.8);
  color: #00e5ff;
  border-radius: 10px;
  text-align: center;
  line-height: 55px;
  margin: 0 4px;
  cursor: pointer;
  border: 2px solid #00bcd4;

  text-shadow: 0 0 5px #00e5ff, 0 0 10px #00bcd4;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
  transition: all 0.2s ease;
}

.key.active,
.key:hover {
  background-color: #00bcd4;
  color: #fff;
  text-shadow: 0 0 10px #fff, 0 0 20px #00e5ff;
  box-shadow: 0 0 25px rgba(0, 229, 255, 1);
  transform: translateY(-2px);
}

/* Special keys wider */
.key#key-SPACE { width: 200px; }
.key#key-SHIFT { width: 150px; }
.key#key-ENTER { width: 120px; }
.key#key-BACKSPACE { width: 120px; }
.key#key-TAB { width: 100px; }
.key#key-CAPS { width: 120px; }

/* Modal (Result Popup) */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: rgba(0, 0, 0, 0.6);
  padding: 2rem;
  border-radius: 15px;
  color: #00e5ff;
  text-align: center;
  border: 2px solid rgba(0, 0, 255, 0.8);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
  max-width: 400px;
  width: 90%;
}

.modal-content button {
  margin-top: 1rem;
  padding: 10px 20px;
  border: 2px solid #00bcd4;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #00e5ff;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.modal-content button:hover {
  box-shadow: 0 0 20px rgba(0, 255, 255, 1);
  color: #fff;
}

/* Keyboard-style heading */
.keyboard-title {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  font-family: 'Orbitron', sans-serif;
}

.keyboard-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #00e5ff;
  border-radius: 10px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #00e5ff;
  text-transform: uppercase;

  text-shadow: 0 0 5px #00e5ff, 0 0 10px #00bcd4;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.6);
  transition: all 0.3s ease;
}

.keyboard-title span:hover {
  background: #00bcd4;
  color: #fff;
  text-shadow: 0 0 10px #fff, 0 0 20px #00e5ff;
  box-shadow: 0 0 25px rgba(0, 229, 255, 1);
  transform: translateY(-3px);
}
footer {
  width: 100%;
  padding: 1rem;
  text-align: center;
  background: none;
  color: #00e5ff; /* default footer text is blue neon */
  font-size: 0.95rem;
  text-shadow: 0 0 5px #00e5ff, 0 0 10px #00bcd4;
  box-shadow: 0 -2px 10px rgba(0, 229, 255, 0.3) inset;
}

footer a {
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

/* Neon green style for developer name */
footer a.dev-name {
  color: #39ff14;
  text-shadow: 0 0 5px #39ff14, 0 0 10px #00ff00;
}

footer a.dev-name:hover {
  color: #fff;
  text-shadow: 0 0 10px #fff, 0 0 20px #39ff14;
}

/* Version box */
footer .version {
  margin-left: 10px;
  padding: 2px 8px;
  border: 2px solid #00e5ff;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
  color: #00e5ff;
  text-shadow: 0 0 5px #00e5ff, 0 0 10px #00bcd4;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}
/* Analytics Bars */
.bar-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}

.bar {
  width: 0;
  height: 25px;
  border-radius: 10px;
  color: #000;
  font-weight: bold;
  line-height: 25px;
  text-align: center;
  overflow: hidden;
  transition: width 1s ease;
}

.neon-bar {
  background: linear-gradient(90deg, #00e5ff, #00ff99);
  box-shadow: 0 0 10px #00e5ff, 0 0 20px #00ff99;
  color: #000;
}

/* Category Text */
.categories {
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  text-shadow: 0 0 5px #00e5ff, 0 0 10px #00bcd4;
}
.ranking-chart {
  margin-top: 20px;
}

.ranking-bar {
  display: flex;
  align-items: center;
  margin: 6px 0;
}

.ranking-label {
  width: 60px;
  text-align: right;
  margin-right: 10px;
  font-weight: bold;
}

.ranking-fill {
  height: 25px;
  background: linear-gradient(90deg, #00ffcc, #0066ff);
  border-radius: 6px;
  transition: width 0.6s ease-in-out;
}

.ranking-value {
  margin-left: 10px;
  font-size: 14px;
  font-family: monospace;
}


/* Fullscreen welcome overlay */
#welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #02070f;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

/* Neon popup box like a giant key */
#welcome-overlay .welcome-content {
  max-width: 720px;
  background: rgba(6,12,25,0.9);
  color: #dffbff;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  border: 6px solid #00eaff; /* thicker border */
  box-shadow:
    0 0 15px #00eaff,
    0 0 40px #00eaff,
    inset 0 0 20px rgba(0,234,255,0.4);
}

/* h2 styled like a keyboard key */
#welcome-overlay .welcome-content h2 {
  display: inline-block;
  padding: 14px 28px;
  margin-bottom: 25px;
  border: 4px solid #ff00ff;
  border-radius: 8px;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  background: rgba(20,20,40,0.9);
  color: #fff;
  box-shadow:
    0 0 10px #ff00ff,
    0 0 20px #ff00ff,
    inset 0 0 12px rgba(255,0,255,0.4);
  text-shadow: 0 0 6px #ff66ff, 0 0 20px #ff00ff;
}

/* --- ring, circles, keys --- */
#welcome-overlay .ring-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}
#welcome-overlay .neon-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
#welcome-overlay .outer-circle {
  width: 280px;
  height: 280px;
  border: 3px solid rgba(0,230,255,0.9);
  box-shadow: 0 0 25px rgba(0,230,255,0.7);
}
#welcome-overlay .inner-circle {
  width: 170px;
  height: 170px;
  border: 3px solid rgba(255,70,210,0.9);
  box-shadow: 0 0 25px rgba(255,70,210,0.7);
}
#welcome-overlay .key-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  transform-origin: 50% 50%;
  animation: ring-spin 12s linear infinite;
}
@keyframes ring-spin {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg); }
}
#welcome-overlay .key-wrapper {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
}

/* Neon colorful rotating keys */
#welcome-overlay .key {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  color: #fff;
  text-shadow: 0 0 6px rgba(255,255,255,0.9);

  border: 2px solid rgba(255,255,255,0.3);
  box-shadow:
    0 0 8px currentColor,
    0 0 18px currentColor,
    inset 0 0 6px rgba(255,255,255,0.2);

  background: linear-gradient(135deg, #ff00ff, #00eaff, #00ff80, #ffff00);
  background-size: 300% 300%;
  animation: key-glow 5s linear infinite;
}

@keyframes key-glow {
  0%   { background-position: 0% 50%; color: #ff66ff; }
  25%  { background-position: 50% 50%; color: #00eaff; }
  50%  { background-position: 100% 50%; color: #00ff80; }
  75%  { background-position: 50% 100%; color: #ffff00; }
  100% { background-position: 0% 50%; color: #ff66ff; }
}

#welcome-overlay .center-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(0,230,255,0.2);
}

/* Start button like a glowing Enter key */
#welcome-overlay #start-btn {
  width: 100px;
  height: 60px;
  border-radius: 10px;
  border: 2px solid #00eaff;
  background: linear-gradient(180deg, #00eaff, #0077ff);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  box-shadow:
    0 0 10px #00eaff,
    0 0 25px #0077ff,
    inset 0 0 10px rgba(255,255,255,0.3);
  transition: transform .2s, box-shadow .2s;
}
#welcome-overlay #start-btn:hover {
  transform: scale(1.1);
  box-shadow:
    0 0 20px #00eaff,
    0 0 40px #0077ff,
    inset 0 0 15px rgba(255,255,255,0.5);
}
#view-analytics-btn-top {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 2px solid #00eaff;
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 12px #00eaff;
  font-family: 'Orbitron', sans-serif;
  transition: all 0.3s ease;
}

#view-analytics-btn-top:hover {
  box-shadow: 0 0 20px #00eaff, 0 0 40px #00bcd4;
  color: #00ffea;
}

.difficulty-time-container {
  width: 100%;
  max-width: 900px;      /* Match container width */
  margin: 20px auto 30px auto; /* Center and space around */
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  gap: 35px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 3px solid #00eaff;
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.5);
  font-family: 'Orbitron', sans-serif;
  border-radius: 12px;
  align-items: center; /* Vertically align */
  user-select: none;
  position: relative; /* if you want to add dropdowns later */
  z-index: 10;
}
