* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 15px;
  line-height: 1.6;
}

.container {
  max-width: 100%;
  margin: 0 auto;
}

/* Header - كشخة ومميزة */
header {
  text-align: center;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 30px 20px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

header p {
  color: #a8d0ff;
  font-size: 1.05rem;
  font-weight: 500;
}

/* Sections - تصميم نظيف */
.section {
  background: white;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-weight: 700;
  border-bottom: 3px solid #667eea;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hint {
  color: #7f8c8d;
  margin-bottom: 20px;
  font-size: 1rem;
  background: #f8f9fa;
  padding: 12px 15px;
  border-radius: 10px;
  border-left: 4px solid #667eea;
}

.highlight {
  color: #e74c3c;
  font-weight: 700;
}

/* Defense Type Grid - أزرار كبيرة للموبايل */
.defense-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.defense-type-btn {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border: 3px solid transparent;
  border-radius: 15px;
  padding: 25px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.defense-type-btn:active {
  transform: scale(0.95);
}

.defense-type-btn.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.defense-type-btn.selected h3,
.defense-type-btn.selected p {
  color: white;
}

.defense-type-btn .icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 1.8rem;
  font-weight: 700;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.defense-type-btn.selected .icon {
  background: white;
  color: #667eea;
}

.defense-type-btn h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 700;
}

.defense-type-btn p {
  font-size: 0.9rem;
  color: #7f8c8d;
}

/* Defense Moves */
.defense-move-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.defense-move-btn {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border: 3px solid transparent;
  border-radius: 15px;
  padding: 25px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.defense-move-btn:active {
  transform: scale(0.95);
}

.defense-move-btn.selected {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  border-color: #11998e;
  color: white;
  box-shadow: 0 8px 25px rgba(17, 153, 142, 0.4);
}

.defense-move-btn h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 700;
}

.defense-move-btn.selected h3 {
  color: white;
}

.defense-move-btn p {
  font-size: 0.9rem;
  color: #7f8c8d;
}

.defense-move-btn.selected p {
  color: rgba(255, 255, 255, 0.9);
}

/* Combo Display - بوكس مميز */
.combo-display-box {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 15px;
  padding: 25px;
  margin: 20px 0;
  border: 3px solid #667eea;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.combo-title {
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.combo-sequence {
  min-height: 80px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  margin: 15px 0;
  border: 2px solid rgba(102, 126, 234, 0.2);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.empty {
  color: #adb5bd;
  text-align: center;
  padding: 15px;
  font-size: 1rem;
}

.combo-item {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 18px;
  margin: 5px;
  border-radius: 25px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  font-size: 1rem;
}

.defense-item {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.against-item {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  font-size: 0.95rem;
  padding: 10px 15px;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.combo-info {
  display: flex;
  gap: 25px;
  justify-content: center;
  margin-top: 15px;
  flex-wrap: wrap;
}

.info-item {
  font-size: 1rem;
  color: #6c757d;
  background: white;
  padding: 10px 20px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-item span {
  font-weight: 700;
  color: #667eea;
}

/* Techniques Grid */
.techniques-grid {
  margin: 25px 0;
}

.category {
  margin-bottom: 30px;
}

.category h3 {
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tech-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tech-btn {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 3px solid #e9ecef;
  border-radius: 12px;
  padding: 18px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.tech-btn:active {
  transform: scale(0.95);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

.tech-btn:active .num,
.tech-btn:active .name {
  color: white;
}

.tech-btn .num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e74c3c;
  margin-bottom: 8px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.tech-btn .name {
  font-size: 0.85rem;
  color: #495057;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

/* Buttons - أزرار كبيرة للموبايل */
.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 25px;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 15px 10px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: scale(0.95);
}

.control-btn {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
}

.save-btn {
  width: 100%;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 20px;
  font-size: 1.2rem;
  margin-top: 20px;
}

.clear-btn {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  padding: 12px 25px;
}

/* Form */
.save-form {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: #495057;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

input,
textarea {
  width: 100%;
  padding: 15px;
  border: 3px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Saved Combos */
.saved-list {
  margin-top: 20px;
}

.empty-saved {
  text-align: center;
  padding: 50px 20px;
  color: #adb5bd;
}

.empty-saved i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #dee2e6;
}

.combo-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
  border: 2px solid #e9ecef;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.combo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.combo-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: #2c3e50;
}

.combo-type {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.counter-type {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.defense-info {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  padding: 15px 20px;
  border-radius: 12px;
  margin: 12px 0;
  border-left: 5px solid #28a745;
  font-weight: 600;
}

.defense-info strong {
  color: #e74c3c;
  font-weight: 700;
}

.combo-moves {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.move-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 10px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.defense-tag {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.combo-notes {
  color: #6c757d;
  font-style: italic;
  margin: 15px 0;
  padding: 15px;
  border-top: 2px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 8px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.card-btn {
  padding: 15px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.card-btn:active {
  transform: scale(0.95);
}

.practice-btn {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
}

.delete-btn {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px;
  margin-top: 30px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.footer-stats {
  text-align: left;
}

.footer-stats p {
  margin-bottom: 8px;
  color: #495057;
  font-weight: 600;
  font-size: 1rem;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  border: 2px solid transparent;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #495057;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-btn:active {
  transform: scale(0.95);
}

.filter-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Utility */
.hidden {
  display: none;
}

/* Responsive للموبايل */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.6rem;
  }

  .defense-type-grid {
    grid-template-columns: 1fr;
  }

  .defense-move-grid {
    grid-template-columns: 1fr;
  }

  .tech-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .controls {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }

  .footer-stats {
    text-align: center;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .section {
    padding: 20px;
  }

  header {
    padding: 25px 15px;
  }

  h2 {
    font-size: 1.2rem;
  }

  .tech-btn {
    min-height: 80px;
    padding: 15px 10px;
  }

  .tech-btn .num {
    font-size: 1.3rem;
  }

  .tech-btn .name {
    font-size: 0.8rem;
  }
}

/* تحسينات للموبايل - أزرار أكبر */
@media (hover: none) and (pointer: coarse) {
  .tech-btn,
  .defense-type-btn,
  .defense-move-btn,
  .btn {
    min-height: 100px;
  }

  .tech-btn {
    padding: 20px 15px;
  }
}
