:root {
  --bp-black: #000000;
  --bp-dark: #1a1a1a;
  --bp-pink: #FF1493;
  --bp-hot-pink: #FF69B4;
  --bp-light-pink: #FFC0CB;
  --bp-white: #FFFFFF;
  --bp-gray: #333333;
  --bp-light-gray: #666666;
  --gradient-pink: linear-gradient(135deg, #FF1493 0%, #FF69B4 100%);
  --gradient-black-pink: linear-gradient(135deg, #000000 0%, #FF1493 100%);
  --shadow-pink: 0 0 20px rgba(255, 20, 147, 0.5);
  --shadow-black: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bp-black);
  color: var(--bp-white);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 20, 147, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 105, 180, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 192, 203, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.quiz-container {
  position: relative;
  z-index: 2;
  padding: 80px 20px 40px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen {
  display: none;
  width: 100%;
  animation: fadeIn 0.5s ease;
}

.screen.active {
  display: block;
}

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

/* Welcome Screen */
.welcome-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.welcome-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.black-text {
  color: var(--bp-white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.1em;
}

.pink-text {
  color: var(--bp-pink);
  text-shadow: 
    0 0 10px rgba(255, 20, 147, 0.8),
    0 0 20px rgba(255, 20, 147, 0.6),
    0 0 30px rgba(255, 20, 147, 0.4);
  letter-spacing: 0.1em;
  animation: pinkGlow 2s ease-in-out infinite alternate;
}

@keyframes pinkGlow {
  from {
    text-shadow: 
      0 0 10px rgba(255, 20, 147, 0.8),
      0 0 20px rgba(255, 20, 147, 0.6),
      0 0 30px rgba(255, 20, 147, 0.4);
  }
  to {
    text-shadow: 
      0 0 15px rgba(255, 20, 147, 1),
      0 0 25px rgba(255, 20, 147, 0.8),
      0 0 35px rgba(255, 20, 147, 0.6);
  }
}

.subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--bp-light-pink);
  letter-spacing: 0.3em;
}

.welcome-description {
  font-size: 1.2rem;
  color: var(--bp-light-gray);
  margin-bottom: 3rem;
}

.difficulty-selection h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--bp-white);
}

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

.difficulty-card {
  background: var(--bp-dark);
  border: 2px solid var(--bp-gray);
  border-radius: 15px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.difficulty-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-pink);
  border-radius: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.difficulty-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-pink);
}

.difficulty-card.selected {
  border-color: var(--bp-pink);
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.1) 0%, rgba(255, 105, 180, 0.1) 100%);
}

.difficulty-card.selected::before {
  opacity: 1;
}

.difficulty-card h3 {
  font-size: 1.5rem;
  color: var(--bp-white);
  margin-bottom: 0.5rem;
}

.difficulty-card p {
  color: var(--bp-light-gray);
  margin-bottom: 1rem;
}

.points-info {
  font-size: 0.9rem;
  color: var(--bp-hot-pink);
  font-weight: 600;
}

.start-button {
  background: var(--gradient-pink);
  color: var(--bp-white);
  border: none;
  padding: 1rem 3rem;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.1em;
  box-shadow: var(--shadow-black);
}

.start-button:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-pink);
}

.start-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Quiz Screen */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bp-dark);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--bp-gray);
}

.quiz-progress,
.quiz-score,
.quiz-timer {
  font-size: 1.2rem;
  font-weight: 600;
}

.quiz-progress {
  color: var(--bp-hot-pink);
}

.quiz-score {
  color: var(--bp-white);
}

.quiz-timer {
  color: var(--bp-pink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.question-container {
  background: var(--bp-dark);
  border-radius: 20px;
  padding: 3rem;
  margin-bottom: 2rem;
  border: 2px solid var(--bp-gray);
  box-shadow: var(--shadow-black);
}

.question {
  font-size: 1.5rem;
  color: var(--bp-white);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.answers {
  display: grid;
  gap: 1rem;
}

.answer-button {
  background: var(--bp-black);
  color: var(--bp-white);
  border: 2px solid var(--bp-gray);
  padding: 1.2rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.answer-button:hover:not(:disabled) {
  border-color: var(--bp-pink);
  background: rgba(255, 20, 147, 0.1);
  transform: translateX(5px);
}

.answer-button.selected {
  background: var(--gradient-pink);
  border-color: var(--bp-pink);
  color: var(--bp-white);
}

.answer-button.correct {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  border-color: #4CAF50;
  animation: correctPulse 0.5s ease;
}

.answer-button.incorrect {
  background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
  border-color: #f44336;
  animation: incorrectShake 0.5s ease;
}

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

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

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

.next-button {
  background: var(--gradient-pink);
  color: var(--bp-white);
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  float: right;
}

.next-button:not(:disabled):hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-pink);
}

.next-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Result Screen */
.result-card {
  background: var(--bp-dark);
  border-radius: 30px;
  padding: 3rem;
  max-width: 700px;
  margin: 0 auto;
  border: 3px solid var(--bp-pink);
  box-shadow: 
    0 0 30px rgba(255, 20, 147, 0.3),
    var(--shadow-black);
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 20, 147, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.result-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.result-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.result-content {
  position: relative;
  z-index: 1;
}

.score-display {
  text-align: center;
  margin-bottom: 2rem;
}

.final-score {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#final-score-number {
  font-size: 5rem;
  font-weight: 900;
  background: var(--gradient-pink);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
}

.score-label {
  font-size: 1.2rem;
  color: var(--bp-light-gray);
  letter-spacing: 0.2em;
}

.rank-display {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: rgba(255, 20, 147, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(255, 20, 147, 0.3);
}

.rank-badge {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.rank-title {
  font-size: 2rem;
  color: var(--bp-pink);
  margin-bottom: 0.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.rank-description {
  color: var(--bp-light-gray);
  font-size: 1.1rem;
}

.score-breakdown {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bp-black);
  border-radius: 10px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bp-gray);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-label {
  color: var(--bp-light-gray);
}

.breakdown-item span:last-child {
  color: var(--bp-pink);
  font-weight: 600;
}

.share-section {
  text-align: center;
  margin-bottom: 2rem;
}

.share-section h3 {
  margin-bottom: 1rem;
  color: var(--bp-white);
}

.share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.share-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--bp-gray);
  background: var(--bp-black);
  color: var(--bp-white);
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.share-button.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.share-button.twitter:hover {
  background: #1DA1F2;
  border-color: #1DA1F2;
}

.share-button.instagram:hover {
  background: var(--gradient-pink);
  border-color: var(--bp-pink);
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.action-button {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.action-button.retry {
  background: var(--gradient-pink);
  color: var(--bp-white);
}

.action-button.home {
  background: var(--bp-black);
  color: var(--bp-white);
  border: 2px solid var(--bp-pink);
}

.action-button:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-pink);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .welcome-title {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .difficulty-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .question-container {
    padding: 2rem 1.5rem;
  }
  
  .question {
    font-size: 1.2rem;
  }
  
  .result-card {
    padding: 2rem 1.5rem;
  }
  
  #final-score-number {
    font-size: 3.5rem;
  }
  
  .rank-title {
    font-size: 1.5rem;
  }
  
  .share-buttons {
    flex-direction: column;
  }
  
  .share-button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .quiz-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .welcome-title {
    font-size: 2rem;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-button {
    width: 100%;
  }
}

/* Grade System Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bp-dark);
  border: 2px solid var(--bp-pink);
  border-radius: 20px;
  padding: 2.5rem;
  position: relative;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 
    0 0 30px rgba(255, 20, 147, 0.3),
    var(--shadow-black);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: var(--bp-pink);
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.close-modal:hover {
  transform: scale(1.2);
  color: var(--bp-hot-pink);
}

.modal-content h3 {
  font-size: 1.8rem;
  color: var(--bp-white);
  text-align: center;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.grade-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.grade-item {
  background: var(--bp-black);
  border: 1px solid var(--bp-gray);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.grade-item:hover {
  border-color: var(--bp-pink);
  background: rgba(255, 20, 147, 0.05);
  transform: translateX(5px);
}

.grade-item.legendary {
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.1) 0%, rgba(255, 105, 180, 0.1) 100%);
  border-color: var(--bp-pink);
  box-shadow: 0 0 20px rgba(255, 20, 147, 0.2);
}

.grade-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--bp-pink);
  margin-bottom: 0.3rem;
}

.grade-range {
  font-size: 1rem;
  color: var(--bp-hot-pink);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.grade-desc {
  font-size: 0.95rem;
  color: var(--bp-light-gray);
  line-height: 1.4;
}

.action-button.secondary {
  background: var(--bp-black);
  color: var(--bp-pink);
  border: 2px solid var(--bp-pink);
}

.action-button.secondary:hover {
  background: rgba(255, 20, 147, 0.1);
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
  .modal-content {
    padding: 2rem 1.5rem;
    width: 95%;
  }
  
  .modal-content h3 {
    font-size: 1.5rem;
  }
  
  .grade-name {
    font-size: 1.1rem;
  }
  
  .grade-item {
    padding: 1rem;
  }
}