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

:root {
  --primary-color: #2c5f2d;
  --secondary-color: #97bc62;
  --accent-color: #f4a460;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-dark: #2d3748;
  --text-light: #718096;
  --border-color: #e2e8f0;
  --success-color: #48bb78;
  --error-color: #f56565;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: var(--text-dark);
  min-height: 100vh;
  direction: rtl;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e4620 100%);
  color: white;
  padding: 2rem 1rem;
  box-shadow: var(--shadow-lg);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.tagline {
  font-size: 1.1rem;
  opacity: 0.95;
  font-weight: 300;
}

.lang-switcher {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 70px;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: white;
  transform: translateY(-2px);
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.4);
  border-color: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.section {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.section.active {
  display: block;
}

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

.section h2 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  text-align: center;
}

.exercise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.exercise-btn {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: var(--shadow);
}

.exercise-btn:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.exercise-btn .icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.exercise-btn .title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  display: block;
}

.symbols-section {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.symbols-section h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  text-align: center;
}

.symbols-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.symbol-card {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  padding: 1.5rem;
  border-radius: 8px;
  border-right: 4px solid var(--secondary-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.symbol-card:hover {
  transform: translateX(-5px);
  box-shadow: var(--shadow);
  border-right-color: var(--primary-color);
}

.symbol-title {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.symbol-meaning {
  color: var(--text-light);
  font-size: 0.95rem;
}

.exercise-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
}

.back-btn {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-weight: 600;
}

.back-btn:hover {
  background: var(--primary-color);
  transform: translateX(3px);
}

#exerciseTitle {
  flex: 1;
  text-align: center;
}

.exercise-container {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
}

.situation {
  background: linear-gradient(135deg, #fff5eb 0%, #fef5e7 100%);
  padding: 1.5rem;
  border-radius: 8px;
  border-right: 4px solid var(--accent-color);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.situation-label {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  display: block;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.choice-btn {
  background: white;
  border: 2px solid var(--border-color);
  padding: 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: right;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-weight: 500;
}

.choice-btn:hover:not(:disabled) {
  background: #f7fafc;
  border-color: var(--primary-color);
  transform: translateX(-3px);
}

.choice-btn.correct {
  background: #c6f6d5;
  border-color: var(--success-color);
}

.choice-btn.incorrect {
  background: #fed7d7;
  border-color: var(--error-color);
}

.choice-btn:disabled {
  cursor: not-allowed;
}

.verse-choice {
  padding: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  font-family: 'Traditional Arabic', 'Arial', sans-serif;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback {
  background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
  padding: 1.5rem;
  border-radius: 8px;
  border-right: 4px solid var(--success-color);
  margin-top: 1.5rem;
  animation: slideIn 0.4s ease;
}

.feedback.error {
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
  border-right-color: var(--error-color);
}

.feedback.correct {
  background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
  border-right-color: var(--success-color);
}

.feedback.incorrect {
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
  border-right-color: var(--error-color);
}

.feedback.info {
  background: linear-gradient(135deg, #fffaf0 0%, #feebc8 100%);
  border-right-color: #f6ad55;
}

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

.feedback-title {
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.feedback p {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.input-area {
  margin: 2rem 0;
}

.input-area label {
  display: block;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.input-area textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.input-area textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.submit-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: block;
  margin: 1.5rem auto 0;
}

.submit-btn:hover {
  background: #1e4620;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.show-answer-btn {
  background: #f6ad55;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 1.5rem;
  display: block;
  width: 100%;
}

.show-answer-btn:hover {
  background: #ed8936;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(246, 173, 85, 0.3);
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
  align-items: center;
}

.button-group .submit-btn,
.button-group .show-answer-btn {
  margin: 0;
  flex: 1;
  max-width: 250px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.close-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--error-color);
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: #c53030;
  transform: rotate(90deg);
}

.symbol-detail-title {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--secondary-color);
}

.symbol-detail-meaning {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.symbol-detail-example {
  background: #f7fafc;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-right: 4px solid var(--accent-color);
}

.symbol-detail-example h4 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.symbol-detail-behavior {
  background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
  padding: 1.5rem;
  border-radius: 8px;
  border-right: 4px solid var(--success-color);
}

.symbol-detail-behavior h4 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.symbol-reference {
  background: #f7fafc;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  border-right: 4px solid var(--primary-color);
}

.symbol-reference strong {
  color: var(--primary-color);
}

footer {
  background: var(--text-dark);
  color: white;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.8rem;
  }

  .tagline {
    font-size: 0.95rem;
  }

  .exercise-grid {
    grid-template-columns: 1fr;
  }

  .exercise-btn {
    padding: 1.5rem 1rem;
  }

  .symbols-list {
    grid-template-columns: 1fr;
  }

  .exercise-container {
    padding: 1.5rem;
  }

  .modal-content {
    padding: 1.5rem;
    width: 95%;
  }
}

/* ========================================
   التصميمات الجديدة للتمارين العقلية
   ======================================== */

.exercise-category {
  margin-bottom: 3rem;
}

.category-label {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-align: center;
}

.exercise-btn.featured {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
}

.exercise-btn.featured:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(44, 95, 45, 0.3);
}

.exercise-btn.featured .icon {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.exercise-btn.featured .title,
.exercise-btn.featured .desc {
  color: white;
}

.exercise-btn .desc {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 0.5rem;
  display: block;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  background: var(--border-color);
  border-radius: 20px;
  height: 30px;
  margin: 1rem 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 20px;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Question Container */
#questionContainer {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 2rem 0;
}

.question {
  text-align: center;
}

.situation {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  border-right: 4px solid var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.question-prompt {
  font-size: 1.2rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.choice-btn {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

.choice-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateX(-5px);
}

.text-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  margin: 1rem 0;
  direction: rtl;
}

.text-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* تنسيقات تمرين حفظ الآيات */
.verse-display {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 3px solid var(--primary-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
  box-shadow: var(--shadow);
}

.verse-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 2;
  margin-bottom: 0.5rem;
  font-family: 'Traditional Arabic', 'Amiri', 'Scheherazade', serif;
}

.verse-reference {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 0.5rem;
}

.verse-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1.1rem;
  margin: 1rem 0;
  direction: rtl;
  font-family: 'Traditional Arabic', 'Amiri', 'Scheherazade', serif;
  line-height: 1.8;
  resize: vertical;
  min-height: 80px;
}

.verse-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

.submit-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0.5rem;
}

.submit-btn:hover {
  background: #1e4620;
  transform: scale(1.05);
}

.submit-btn.secondary {
  background: var(--secondary-color);
}

/* Memory Chain */
.memory-chain {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.chain-item {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  padding: 1rem;
  border-radius: 8px;
  border-right: 4px solid var(--accent-color);
}

.chain-number {
  background: var(--accent-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-left: 1rem;
}

.chain-symbol {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Feedback */
.feedback-container {
  margin: 2rem 0;
  display: none;
}

.feedback {
  padding: 1.5rem;
  border-radius: 8px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.feedback.correct {
  background: #e6fffa;
  border-right: 4px solid var(--success-color);
  color: #2c7a7b;
}

.feedback.incorrect {
  background: #fff5f5;
  border-right: 4px solid var(--error-color);
  color: #c53030;
}

/* Results */
.results {
  text-align: center;
  padding: 2rem;
}

.score-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 2rem auto;
  box-shadow: var(--shadow-lg);
}

.score-number {
  font-size: 3rem;
  font-weight: bold;
}

.score-percentage {
  font-size: 1.5rem;
  opacity: 0.9;
}

.result-message {
  font-size: 1.3rem;
  color: var(--primary-color);
  font-weight: 600;
  margin: 1rem 0;
}

/* Search Box */
.search-box {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-box input {
  flex: 1;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #1e4620;
}

.btn-browse {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 1.2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.btn-browse:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Symbols Container */
.symbols-container {
  margin-top: 2rem;
}

.symbols-by-category {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.category-section {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.category-title {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--secondary-color);
  padding-bottom: 0.5rem;
}

.symbols-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.symbol-card {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-right: 4px solid var(--accent-color);
}

.symbol-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  background: var(--primary-color);
  color: white;
}

.symbol-card:hover .symbol-title,
.symbol-card:hover .symbol-meaning,
.symbol-card:hover .symbol-category {
  color: white;
}

.symbol-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.symbol-meaning {
  font-size: 0.95rem;
  color: var(--text-light);
}

.symbol-category {
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Modal Updates */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}

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

.close-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--error-color);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.close-btn:hover {
  transform: rotate(90deg);
  background: #e53e3e;
}

#modalContent h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.symbol-detail {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 8px;
}

.symbol-detail strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
}

.symbol-detail.alternative {
  background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
  border-right: 4px solid var(--success-color);
}

.no-results {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  padding: 3rem;
}

.results-count {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* Stats Button */
.stats-btn-container {
  margin-top: 2rem;
  text-align: center;
}

.stats-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.stats-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.stats-btn .icon {
  font-size: 1.3rem;
}

/* Stats Dashboard */
.stats-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.stat-card.users-card::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.stat-card.active-card::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
.stat-card.time-card::before { background: linear-gradient(90deg, #4facfe, #00f2fe); }
.stat-card.loyalty-card::before { background: linear-gradient(90deg, #43e97b, #38f9d7); }

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

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

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Exercise Stats Section */
.exercise-stats-section {
  margin-bottom: 2rem;
}

.exercise-stats-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.exercise-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.exercise-stat-card {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.exercise-stat-card:hover {
  border-color: var(--primary-color);
  transform: scale(1.02);
}

.exercise-stat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.exercise-stat-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.exercise-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.exercise-stat-score {
  font-size: 0.9rem;
  color: var(--text-light);
}

.exercise-stat-score span:last-child {
  color: var(--success-color);
  font-weight: 600;
}

/* Daily Stats Section */
.daily-stats-section {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.daily-stats-section h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.daily-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.daily-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.daily-date {
  min-width: 100px;
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: left;
}

.daily-bar-container {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.daily-bar-fill {
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 30px;
  transition: width 0.5s ease;
}

.daily-bar-fill.visits { background: linear-gradient(90deg, #667eea, #764ba2); }
.daily-bar-fill.new-users { background: linear-gradient(90deg, #43e97b, #38f9d7); }
.daily-bar-fill.returning { background: linear-gradient(90deg, #f093fb, #f5576c); }

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.legend-color.visits { background: linear-gradient(90deg, #667eea, #764ba2); }
.legend-color.new-users { background: linear-gradient(90deg, #43e97b, #38f9d7); }
.legend-color.returning { background: linear-gradient(90deg, #f093fb, #f5576c); }

/* Responsive */
@media (max-width: 768px) {
  .exercise-grid {
    grid-template-columns: 1fr;
  }
  
  .symbols-grid {
    grid-template-columns: 1fr;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .modal-content {
    max-width: 95%;
    margin: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .exercise-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-value {
    font-size: 2rem;
  }
}

