@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700;800&display=swap');

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --accent: #f43f5e;
  --bg-body: #f1f5f9;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius: 16px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Navbar --- */
.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
  border: none;
}

.icon-btn:hover {
  transform: translateY(-2px);
  color: var(--primary);
  background: #f8fafc;
}

/* --- Layout Wrappers --- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 650px;
  margin: 30px auto;
  padding: 0 20px;
}

/* --- Progress Bar (Thicker & Cleaner) --- */
.progress-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  margin-bottom: 25px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
  box-sizing: border-box;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 600;
}

.progress-percent {
  color: var(--primary);
}

.progress-track {
  width: 100%;
  height: 24px; /* Taller height */
  background: #e2e8f0;
  border-radius: 50px;
  overflow: hidden;
  position: relative;
}

/*.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 50px;
  transition: width 0.8s ease-out;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
}*/

/* Update this specific class in styles.css */

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 50px;
  transition: width 0.5s ease;
  
  /* FLEXBOX centering */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* TEXT STYLING */
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap; /* Prevents text wrapping */
  
  /* THE FIX: This ensures the bar is always wide enough to show the text */
  min-width: max-content; 
  padding: 0 15px; /* Add breathing room on sides */
}

/* Ensure this is in your CSS for the Reset Page */
.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
  border: 1px solid white;
  margin: 0 auto;
}

.error-msg {
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 15px;
}

.success-msg {
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 15px;
}

/* --- Cards (Game & Auth) --- */
.game-card, .auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  text-align: center;
  border: 1px solid white;
  box-sizing: border-box;
}

.auth-card {
  max-width: 400px; /* Slightly slimmer for login forms */
  margin: 0 auto;
}

.instruction-message {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  color: var(--text-main);
  line-height: 1.4;
}

.image-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 25px;
  box-shadow: var(--shadow-sm);
  background: #f8fafc;
}

.challenge-image {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Forms, Inputs & Buttons --- */
input[type="text"], 
input[type="email"], 
input[type="password"], 
select {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  outline: none;
  background: #f8fafc;
  transition: all 0.2s;
  box-sizing: border-box;
  margin-bottom: 12px;
  color: var(--text-main);
}

input:focus, select:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Primary Button (Login, Signup, Submit) */
button.primary-btn, #submitAnswer {
  width: 100%;
  padding: 16px;
  background: var(--text-main);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
  margin-top: 10px;
}

button.primary-btn:hover, #submitAnswer:hover {
  background: black;
}

button.primary-btn:active, #submitAnswer:active {
  transform: scale(0.98);
}

button:disabled {
  background: #cbd5e1 !important;
  cursor: not-allowed;
  transform: none;
}

/* --- Result & Share --- */
.result-box {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1e3a8a;
  padding: 20px;
  border-radius: 14px;
  margin-top: 20px;
  text-align: center;
}



.share-btn-large {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-weight: 700;
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: transform 0.2s;
}

.share-btn-large:hover {
  transform: translateY(-2px);
}

/* --- Bootstrap Dropdown Overrides --- */
.dropdown-menu {
  border: none !important;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.15);
  border-radius: 16px !important;
  padding: 10px !important;
  min-width: 200px;
}

.dropdown-header {
  font-weight: 600;
  color: var(--text-main);
  padding: 8px 16px;
}

.dropdown-item {
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
}

.dropdown-item:hover {
  background-color: #f1f5f9;
  color: var(--primary);
}

/* --- Footer & Links --- */
a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
a:hover {
  text-decoration: underline;
}

/* --- NEW SHARE MODAL STYLES --- */
.copy-box-container {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid #e2e8f0;
}
#shareUrlInput {
  border: none;
  background: transparent;
  flex: 1;
  padding: 8px;
  font-family: 'Inter', monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
  outline: none;
}
#copyLinkBtn {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
#copyLinkBtn:hover { background: #e2e8f0; }

.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
}
.social-btn {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 10px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.social-btn:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.social-btn span {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
  color: var(--text-main);
}
.social-btn.twitter { color: #1DA1F2; font-size: 1.5rem; }
.social-btn.whatsapp { color: #25D366; font-size: 1.5rem; }
.social-btn.email { color: var(--text-main); font-size: 1.5rem; }

/* Modal Content */
.modal-content { border: none; }
.modal-backdrop.show { opacity: 0.5; }



footer {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: auto;
}

/* --- Mobile Tweaks --- */
@media (max-width: 480px) {
  .navbar { padding: 15px 20px; }
  main { padding: 0 15px; margin-top: 20px; }
  .logo-text { font-size: 1.4rem; }
}