:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #ecf0f1;
    --text-color: #333;
    --correct-color: #2ecc71;
    --wrong-color: #e74c3c;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    background-color: white;
    width: 100%;
    max-width: 600px; 
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

#score-display {
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.btn-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
    margin: 20px 0;
}

@media (min-width: 480px) {
    .btn-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

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

.btn:hover {
    background-color: #2980b9;
}

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

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

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

#next-btn, #restart-btn {
    background-color: var(--primary-color);
    width: 100%;
    margin-top: 10px;
}

.hide {
    display: none !important;
}

.offline-toast {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: white;
  text-align: center;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
  z-index: 9999;
  box-sizing: border-box;
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.fade-in-animation {
  animation: quizCardAppear 0.4s ease-out forwards;
}

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