/* =========================================
   ScoreSight - Main Styles
   ========================================= */

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

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

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0b132b, #1c2541, #3a506b, #5bc0be);
  min-height: 100vh;
  color: #ffffff;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ========================================
   Utility Classes
   ======================================== */

.gradient-text {
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-button {
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  border: none;
  color: #0b132b;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.glow-button:hover {
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.8), 0 0 60px rgba(0, 255, 204, 0.4);
  transform: translateY(-2px);
}

.glow-button:active {
  transform: translateY(0);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px 0 rgba(0, 212, 255, 0.2);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.form-control {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 10px;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: #00d4ff;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
  color: #ffffff;
}

.form-label {
  color: #00e0ff;
  font-weight: 500;
  margin-bottom: 8px;
}

/* Enhanced Dropdown Styles */
select.form-control {
  background: #1c2541 !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300d4ff'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 20px !important;
  padding-right: 40px !important;
  cursor: pointer;
}

select.form-control option {
  background: #1c2541;
  color: #ffffff;
  padding: 10px;
}

select.form-control option:checked {
  background: linear-gradient(#00d4ff, #00d4ff);
  color: #0b132b;
}

select.form-control:hover {
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

select.form-control:focus {
  background: #1c2541 !important;
  border-color: #00d4ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

/* ========================================
   Navbar Styles
   ======================================== */

.navbar {
  background: rgba(11, 19, 43, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  padding: 1rem 2rem;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00ffcc !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand:hover {
  color: #00d4ff !important;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 500;
  transition: all 0.3s ease;
  margin: 0 10px;
}

.nav-link:hover {
  color: #00ffcc !important;
}

.nav-link.active {
  color: #00d4ff !important;
}

.user-welcome {
  background: rgba(0, 212, 255, 0.08) !important;
  border-radius: 8px;
  padding: 8px 15px !important;
  transition: all 0.3s ease;
}

.user-welcome:hover {
  background: rgba(0, 212, 255, 0.15) !important;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
  color: #00ffcc !important;
}

.user-icon {
  margin-right: 5px;
  font-size: 1.1rem;
}

.logout-link {
  background: rgba(255, 67, 67, 0.12) !important;
  border-radius: 8px;
  padding: 8px 15px !important;
  transition: all 0.3s ease;
  color: #ff6b6b !important;
}

.logout-link:hover {
  background: rgba(255, 67, 67, 0.2) !important;
  box-shadow: 0 0 15px rgba(255, 67, 67, 0.4);
  color: #ff8a8a !important;
}

/* ========================================
   Login/Signup Page
   ======================================== */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  animation: slideIn 0.6s ease;
}

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

.auth-card h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
}

.auth-card p {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 30px;
  font-size: 0.95rem;
}

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

.auth-card .glow-button {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 10px;
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.auth-link a {
  color: #00ffcc;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-link a:hover {
  color: #00d4ff;
}

.alert {
  border-radius: 12px;
  border: 1px solid;
  margin-bottom: 20px;
  animation: slideIn 0.3s ease;
  padding: 16px 20px;
  font-weight: 500;
  font-size: 0.95rem;
}

.alert-danger {
  background: rgba(255, 67, 67, 0.15);
  color: #ff6b6b;
  border-color: rgba(255, 67, 67, 0.4);
  box-shadow: 0 0 20px rgba(255, 67, 67, 0.25), inset 0 0 15px rgba(255, 67, 67, 0.08);
}

.alert-success {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
  border-color: rgba(76, 175, 80, 0.4);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.25), inset 0 0 15px rgba(76, 175, 80, 0.08);
}

/* ========================================
   Dashboard Page
   ======================================== */

.dashboard-container {
  min-height: 100vh;
  padding: 40px 20px;
}

.welcome-section {
  text-align: center;
  margin: 40px 0 60px 0;
  animation: fadeInUp 0.8s ease;
}

.welcome-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#welcomeName {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

#welcomeName[style*="opacity: 1"] {
  opacity: 1;
}

.welcome-section p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
}

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

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 60px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease;
  animation-fill-mode: both;
}

.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
  animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.3s;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px 0 rgba(0, 212, 255, 0.3);
  border-color: #00d4ff;
  transform: translateY(-5px);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #00ffcc;
  margin-bottom: 5px;
}

.stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  font-weight: 500;
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.action-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 15px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease;
}

.action-card:nth-child(1) {
  animation-delay: 0.4s;
}

.action-card:nth-child(2) {
  animation-delay: 0.5s;
}

.action-card:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px 0 rgba(0, 212, 255, 0.4);
  border-color: #00d4ff;
  transform: translateY(-8px);
}

.action-card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.action-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #00ffcc;
}

.action-card p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.action-card .glow-button {
  width: 100%;
  padding: 12px 25px;
}

/* ========================================
   Predict Match Page
   ======================================== */

.predict-container {
  min-height: 100vh;
  padding: 40px 20px;
}

.predict-header {
  text-align: center;
  margin-bottom: 50px;
  animation: slideIn 0.6s ease;
}

.predict-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.predict-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
}

.predict-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 992px) {
  .predict-content {
    grid-template-columns: 1fr;
  }
}

.predict-form {
  animation: slideIn 0.6s ease;
  animation-delay: 0.1s;
}

.predict-form .form-group {
  margin-bottom: 25px;
}

.predict-form select {
  width: 100%;
}

.predict-form input[type="date"] {
  width: 100%;
}

.predict-result {
  animation: slideIn 0.6s ease;
  animation-delay: 0.2s;
}

.result-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 15px;
  padding: 35px;
  min-height: 500px;
  display: none;
}

.result-card.show {
  display: block;
  animation: slideIn 0.6s ease;
}

.result-match-info {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #00ffcc;
}

.result-date {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 30px;
}

.result-outcome {
  font-size: 2rem;
  font-weight: 700;
  margin: 30px 0;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.outcome-home {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.outcome-away {
  background: rgba(255, 67, 67, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(255, 67, 67, 0.4);
}

.outcome-draw {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.4);
}

.confidence-section {
  margin: 30px 0;
}

.confidence-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
}

.confidence-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  border-radius: 10px;
  transition: width 0.8s ease;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
}

/* Probability Breakdown Styles */
.probability-breakdown {
  margin: 25px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.prob-item {
  margin-bottom: 15px;
}

.prob-item:last-child {
  margin-bottom: 0;
}

.prob-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.prob-value {
  font-weight: 700;
  color: #00ffcc;
  font-size: 1rem;
}

.prob-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 255, 0.15);
}

.prob-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.8s ease;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
}

.stat-item label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-item .value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #00ffcc;
}

.loading {
  text-align: center;
  padding: 40px;
}

.spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 212, 255, 0.2);
  border-top-color: #00ffcc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   Enhanced Predict Form Styles
   ======================================== */

.predict-form-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .predict-form-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.predict-form {
  animation: slideIn 0.6s ease;
  animation-delay: 0.1s;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
}

.predict-form::-webkit-scrollbar {
  width: 8px;
}

.predict-form::-webkit-scrollbar-track {
  background: transparent;
}

.predict-form::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 4px;
}

.predict-form::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

.form-section {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

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

.form-control-lg {
  font-size: 1rem;
  height: auto;
  padding: 12px 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.form-control-lg:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

.predict-button {
  font-weight: 700;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #2b3cff, #00d4ff);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

.predict-button:hover {
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.7), 0 0 80px rgba(0, 255, 204, 0.3);
  transform: translateY(-3px);
}

.predict-button:active {
  transform: translateY(-1px);
}

/* ========================================
   AI Predictor Page
   ======================================== */

.ai-predictor-container {
  min-height: 100vh;
  padding: 40px 20px;
}

.ai-header {
  text-align: center;
  margin-bottom: 60px;
  animation: slideIn 0.6s ease;
}

.ai-header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #2b3cff, #00d4ff, #00ffcc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-header p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
}

.ai-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 35px;
  max-width: 1300px;
  margin: 0 auto 60px;
}

@media (max-width: 768px) {
  .ai-cards-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

.ai-info-card {
  padding: 35px;
  position: relative;
  overflow: hidden;
  animation: slideIn 0.6s ease;
  transition: all 0.3s ease;
}

.ai-info-card.card-1 {
  animation-delay: 0.1s;
}

.ai-info-card.card-2 {
  animation-delay: 0.2s;
}

.ai-info-card.card-3 {
  animation-delay: 0.3s;
}

.ai-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  opacity: 0.6;
}

.ai-info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 212, 255, 0.25);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: inline-block;
}

.ai-info-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #00ffcc;
  margin-bottom: 20px;
}

.card-content p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.feature-list {
  list-style: none;
  margin-top: 15px;
}

.feature-list li {
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 0;
  padding-left: 5px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.feature-list li:hover {
  color: #00d4ff;
  padding-left: 15px;
}

/* Accuracy Metrics */
.accuracy-metrics {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.metric-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 15px;
  align-items: center;
}

.metric-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.metric-bar {
  grid-column: 1 / -1;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.metric-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.metric-value {
  font-weight: 700;
  color: #00ffcc;
  font-size: 1.1rem;
}

/* Roadmap */
.roadmap {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.roadmap-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 15px;
  align-items: start;
}

.roadmap-marker {
  background: linear-gradient(135deg, #2b3cff, #00d4ff);
  color: #0b132b;
  font-weight: 700;
  font-size: 0.8rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
  flex-shrink: 0;
}

.roadmap-item p {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  margin: 0;
  font-size: 0.9rem;
}

.roadmap-item p strong {
  color: #00ffcc;
}

/* Performance Section */
.performance-section {
  max-width: 900px;
  margin: 60px auto 40px;
  animation: slideIn 0.6s ease;
  animation-delay: 0.4s;
}

.chart-placeholder {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 40px;
  border: 1px solid rgba(0, 212, 255, 0.1);
}

/* ========================================
   Chatbox Styles
   ======================================== */

.chat-icon {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b132b;
  font-weight: bold;
}

.chat-icon:hover {
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.8);
  transform: scale(1.1);
}

.chat-popup {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 380px;
  height: 500px;
  background: rgba(11, 19, 43, 0.95);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(0, 212, 255, 0.5);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 212, 255, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpChat 0.4s ease;
  z-index: 101;
}

.chat-popup.show {
  display: flex;
}

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

@media (max-width: 576px) {
  .chat-popup {
    width: calc(100vw - 40px);
    height: 80vh;
    bottom: auto;
    right: 20px;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
  }
}

.chat-header {
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  color: #0b132b;
  padding: 20px;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-close {
  background: none;
  border: none;
  color: #0b132b;
  font-size: 1.5rem;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.chat-close:hover {
  transform: rotate(90deg);
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.chat-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.chat-body::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.4);
  border-radius: 3px;
}

.chat-message {
  display: flex;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

.chat-message.bot {
  justify-content: flex-start;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-text {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 12px;
  word-wrap: break-word;
  font-size: 0.9rem;
  line-height: 1.4;
}

.chat-message.bot .chat-text {
  background: rgba(0, 212, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.chat-message.user .chat-text {
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  color: #0b132b;
}

.chat-footer {
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  padding: 15px;
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: #ffffff;
  border-radius: 10px;
  padding: 10px 15px;
  font-family: 'Poppins', sans-serif;
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.chat-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.chat-send {
  background: linear-gradient(90deg, #00d4ff, #00ffcc);
  border: none;
  color: #0b132b;
  width: 45px;
  height: 45px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-send:hover {
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
  transform: scale(1.05);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
  .welcome-section h1 {
    font-size: 2rem;
  }

  .stats-container {
    grid-template-columns: 1fr;
  }

  .action-cards {
    grid-template-columns: 1fr;
  }

  .predict-header h1 {
    font-size: 1.75rem;
  }

  .auth-card {
    max-width: 100%;
  }

  .chat-icon {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .chat-popup {
    width: calc(100vw - 40px);
    height: 70vh;
    bottom: auto;
    right: 20px;
    left: 20px;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 14px;
  }

  .navbar {
    padding: 0.75rem 1rem;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .nav-link {
    font-size: 0.9rem;
    margin: 0 5px;
  }

  .welcome-section h1 {
    font-size: 1.5rem;
  }

  .auth-card {
    padding: 20px;
  }

  .glass-card {
    padding: 20px;
  }

  .predict-header h1 {
    font-size: 1.3rem;
  }

  .predict-header p {
    font-size: 0.85rem;
  }
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.8);
  }
}
