/* ========================================
   Reset & Global Styles
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    direction: ltr;
}

/* ========================================
   Container
======================================== */
.container {
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   Header Section
======================================== */
.header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

/* ========================================
   Score Counter
======================================== */
.score-counter {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
}

.score-text {
    margin-right: 10px;
}

.score-number {
    color: #667eea;
    font-weight: 600;
    font-size: 1.2rem;
}

/* ========================================
   Main Content
======================================== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ========================================
   Question Card
======================================== */
.question-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.question-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.question-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.question-text {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

/* ========================================
   Options / Multiple Choice
======================================== */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: inherit;
}

.option-btn:hover:not(.disabled) {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(5px);
}

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

/* Correct / Incorrect States */
.option-btn.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    animation: correctPulse 0.6s ease;
}

.option-btn.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
    animation: incorrectShake 0.6s ease;
}

/* ========================================
   Keyframes
======================================== */
@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

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

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

/* ========================================
   Free Response / Input
======================================== */
.free-response-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.free-response-input {
    flex: 1;
    min-width: 200px;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.free-response-input:focus {
    outline: none;
    border-color: #667eea;
}

/* ========================================
   Submit Button
======================================== */
.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

/* ========================================
   Feedback Messages
======================================== */
.feedback {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 500;
    display: none;
    animation: fadeIn 0.5s ease;
}

.feedback.show {
    display: block;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.success-message.show {
    display: flex;
    animation: fadeIn 0.5s ease;
}

.success-content {
    background: white;
    padding: 50px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease;
}

.success-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
}

.success-text {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* ========================================
   Footer Copyright
======================================== */
.copyright {
  font-size: 0.95em;
  color: #777;
  font-weight: 100;
  text-align: center;
  transform: translateY(15px);
  margin-bottom: 2rem;
}

footer .copyright {
  width: 100%;
  color: #c0c0c0;
}

footer .copyright .fe-box {
  width: 290px;
  padding: 9px 15px;
  border: 1px solid #c0c0c0;
  border-radius: 4px;
  margin: 30px auto 10px;
  text-align: center;
  display: block;
  position: relative;
  transition: 0.6s ease;
  animation: glow 2s infinite alternate ease-in-out;
}

.copyright .fe-box:hover {
  box-shadow: 10px 10px 54px rgba(240, 240, 240);
}

@keyframes glow {
  0%   { box-shadow: 0 0 5px #c0c0c0, 0 0 10px #ffffff; border-color: #c0c0c0; }
  50%  { box-shadow: 0 0 15px #ffffff, 0 0 30px #808080, 0 0 45px #fff; border-color: #fff; }
  100% { box-shadow: 0 0 5px #c0c0c0, 0 0 10px #ffffff; border-color: #c0c0c0; }
}

/* ========================================
   Animated Name
======================================== */
.animated-name {
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
  background: linear-gradient(135deg, #667eea, #f8d7da, #764ba2);
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: gradientMove 1.8s linear infinite;
  cursor: pointer;
}

.animated-name:hover {
  animation-play-state: paused;
}

.letter {
  display: inline-block;
  animation: none;
  transition: transform 0.3s ease;
}

.animated-name:hover .letter {
  animation: bounceUp 0.6s ease forwards;
  animation-delay: calc(var(--i) * 0.01s);
}

@keyframes gradientMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 150% 50%; }
}

::selection {
  background: none;
  color: #5b39888c;
}

::-moz-selection { 
  background: none;
  color: #5b39888c;
}