* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1f1f1f 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  position: relative;
  overflow: hidden;
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 50%;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.game-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: min(90vw, 400px);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
  transition: all 0.3s ease;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
}

.game-header {
  text-align: center;
  margin-bottom: 1rem;
}

.game-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.score-streak {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.question-container {
  text-align: center;
  margin-bottom: 1rem;
}

.question {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  animation: slideIn 0.5s ease-out;
  color: #2d2d2d;
}

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

.number1 { color: #4a4a4a; }
.operator { color: #1a1a1a; }
.number2 { color: #4a4a4a; }
.equals { color: #333; }

.difficulty-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.difficulty-btn {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: #f5f5f5;
  color: #666;
}

.difficulty-btn.active {
  background: #1a1a1a;
  color: white;
  transform: scale(1.05);
}

.input-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

input[type="number"] {
  flex: 1 1 150px;
  border: 2px solid #e5e5e5;
  border-radius: 16px;
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  background: #fafafa;
  transition: all 0.3s;
  text-align: center;
  font-weight: 600;
  color: #2d2d2d;
}

input[type="number"]:focus {
  border: 2px solid #4a4a4a;
  outline: none;
  background: #fff;
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(74, 74, 74, 0.15);
}

.check-btn {
  flex: 0 1 auto;
  border: none;
  background: #1a1a1a;
  color: white;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 1.5rem;
  transition: all 0.3s;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(26, 26, 26, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.check-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.check-btn:hover::before {
  left: 100%;
}

.check-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26, 26, 26, 0.3);
  background: #2d2d2d;
}

.check-btn:active {
  transform: translateY(0);
}

.arrow-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

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

.modal-content {
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalPop 0.3s ease-out;
  position: relative;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.modal-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.modal-message {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
  color: #1a1a1a;
}

.modal-submessage {
  font-size: 1rem;
  color: #666;
  margin-bottom: 2rem;
}

.close-btn {
  background: #1a1a1a;
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.close-btn:hover {
  transform: translateY(-2px);
  background: #2d2d2d;
}

.correct { 
  background: linear-gradient(135deg, #f8f9fa, #ffffff) !important;
  border: 2px solid #22c55e !important;
}
.incorrect { 
  background: linear-gradient(135deg, #f8f9fa, #ffffff) !important;
  border: 2px solid #ef4444 !important;
}
.funny { 
  background: linear-gradient(135deg, #f8f9fa, #ffffff) !important;
  border: 2px solid #f59e0b !important;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #4a4a4a;
  animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.streak-fire {
  display: inline-block;
  animation: fire 0.5s ease-in-out;
}

@keyframes fire {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    body {
      min-height: 100vh;
      background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1f1f1f 100%);
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 18px;
      position: relative;
      overflow: hidden;
      padding: 1rem;
    }

    /* Animated background particles */
    .particles {
      position: absolute;
      width: 100%;
      height: 100%;
      overflow: hidden;
      z-index: 0;
    }

    .particle {
      position: absolute;
      background: rgba(255, 255, 255, 0.02);
      border-radius: 50%;
      pointer-events: none;
      animation: float 6s ease-in-out infinite;
    }

    @keyframes float {
      0%, 100% { transform: translateY(0px) rotate(0deg); }
      50% { transform: translateY(-20px) rotate(180deg); }
    }

    .game-container {
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(20px);
      padding: 2rem 1.5rem;
      border-radius: 24px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
      width: 100%;
      max-width: 400px;
      min-height: 320px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: stretch;
      gap: 1.5rem;
      transition: all 0.3s ease;
      z-index: 10;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .game-container:hover {
      transform: translateY(-5px);
      box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    }

    .game-header {
      text-align: center;
      margin-bottom: 1rem;
    }

    .game-title {
      font-size: 1.8rem;
      font-weight: 700;
      color: #1a1a1a;
      margin-bottom: 0.5rem;
    }

    .score-streak {
      display: flex;
      justify-content: space-between;
      font-size: 0.9rem;
      color: #666;
      font-weight: 500;
    }

    .question-container {
      text-align: center;
      margin-bottom: 1rem;
    }

    .question {
      font-size: 2.5rem;
      font-weight: 600;
      letter-spacing: 2px;
      margin-bottom: 0.5rem;
      animation: slideIn 0.5s ease-out;
      color: #2d2d2d;
      word-break: break-all;
    }

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

    .number1 { color: #4a4a4a; }
    .operator { color: #1a1a1a; }
    .number2 { color: #4a4a4a; }
    .equals { color: #333; }

    .difficulty-selector {
      display: flex;
      gap: 0.5rem;
      margin-bottom: 1rem;
    }

    .difficulty-btn {
      flex: 1;
      padding: 0.5rem;
      border: none;
      border-radius: 12px;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      background: #f5f5f5;
      color: #666;
      min-height: 44px;
    }

    .difficulty-btn.active {
      background: #1a1a1a;
      color: white;
      transform: scale(1.05);
    }

    .input-section {
      display: flex;
      gap: 0.75rem;
      align-items: stretch;
    }

    input[type="number"] {
      flex: 1;
      border: 2px solid #e5e5e5;
      border-radius: 16px;
      padding: 1rem 1rem;
      font-size: 1.1rem;
      background: #fafafa;
      transition: all 0.3s;
      text-align: center;
      font-weight: 600;
      color: #2d2d2d;
      min-height: 54px;
    }

    input[type="number"]:focus {
      border: 2px solid #4a4a4a;
      outline: none;
      background: #fff;
      transform: scale(1.02);
      box-shadow: 0 0 20px rgba(74, 74, 74, 0.15);
    }

    .check-btn {
      border: none;
      background: #1a1a1a;
      color: white;
      border-radius: 16px;
      font-size: 1rem;
      font-weight: 600;
      padding: 1rem;
      transition: all 0.3s;
      cursor: pointer;
      box-shadow: 0 4px 20px rgba(26, 26, 26, 0.2);
      position: relative;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 60px;
      min-height: 54px;
    }

    .check-btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
      transition: left 0.5s;
    }

    .check-btn:hover::before {
      left: 100%;
    }

    .check-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 30px rgba(26, 26, 26, 0.3);
      background: #2d2d2d;
    }

    .check-btn:active {
      transform: translateY(0);
    }

    .send-icon {
      width: 20px;
      height: 20px;
      fill: currentColor;
    }

    /* Modal Styling */
    .modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.7);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1000;
      backdrop-filter: blur(5px);
      padding: 1rem;
    }

    .modal-content {
      background: white;
      padding: 2rem;
      border-radius: 24px;
      text-align: center;
      max-width: 400px;
      width: 100%;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      animation: modalPop 0.3s ease-out;
      position: relative;
    }

    @keyframes modalPop {
      from { opacity: 0; transform: scale(0.8); }
      to { opacity: 1; transform: scale(1); }
    }

    .modal-emoji {
      font-size: 3.5rem;
      margin-bottom: 1rem;
    }

    .modal-message {
      font-size: 1.3rem;
      font-weight: 600;
      margin-bottom: 1rem;
      line-height: 1.4;
      color: #1a1a1a;
    }

    .modal-submessage {
      font-size: 0.95rem;
      color: #666;
      margin-bottom: 2rem;
      line-height: 1.4;
    }

    .close-btn {
      background: #1a1a1a;
      color: white;
      border: none;
      padding: 0.8rem 2rem;
      border-radius: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      min-height: 44px;
    }

    .close-btn:hover {
      transform: translateY(-2px);
      background: #2d2d2d;
    }

    .correct { 
      background: linear-gradient(135deg, #f8f9fa, #ffffff) !important;
      border: 2px solid #22c55e !important;
    }
    .incorrect { 
      background: linear-gradient(135deg, #f8f9fa, #ffffff) !important;
      border: 2px solid #ef4444 !important;
    }
    .funny { 
      background: linear-gradient(135deg, #f8f9fa, #ffffff) !important;
      border: 2px solid #f59e0b !important;
    }

    /* Confetti animation */
    .confetti {
      position: absolute;
      width: 10px;
      height: 10px;
      background: #4a4a4a;
      animation: confetti-fall 3s linear forwards;
    }

    @keyframes confetti-fall {
      to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
      }
    }

    .streak-fire {
      display: inline-block;
      animation: fire 0.5s ease-in-out;
    }

    @keyframes fire {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.2); }
    }

    /* Media Queries for smaller devices */
    @media (max-width: 450px) {
      body {
        padding: 0.5rem;
      }

      .game-container {
        padding: 1.5rem 1rem;
        gap: 1.25rem;
        border-radius: 20px;
      }

      .game-title {
        font-size: 1.6rem;
      }

      .question {
        font-size: 2rem;
        letter-spacing: 1px;
      }

      .difficulty-btn {
        font-size: 0.75rem;
        padding: 0.4rem;
        min-height: 40px;
      }

      input[type="number"] {
        font-size: 1rem;
        padding: 0.8rem;
        min-height: 48px;
      }

      .check-btn {
        min-width: 54px;
        min-height: 48px;
        padding: 0.8rem;
      }

      .send-icon {
        width: 18px;
        height: 18px;
      }

      .modal-content {
        padding: 1.5rem;
        border-radius: 20px;
      }

      .modal-emoji {
        font-size: 3rem;
      }

      .modal-message {
        font-size: 1.2rem;
      }

      .modal-submessage {
        font-size: 0.9rem;
      }
    }

    @media (max-width: 380px) {
      .game-container {
        padding: 1.25rem 0.75rem;
      }

      .question {
        font-size: 1.8rem;
      }

      .difficulty-btn {
        font-size: 0.7rem;
        min-height: 36px;
      }

      input[type="number"] {
        font-size: 0.95rem;
        min-height: 44px;
      }

      .check-btn {
        min-width: 50px;
        min-height: 44px;
      }

      .send-icon {
        width: 16px;
        height: 16px;
      }
    }