/* IQ Test Game CSS - PuzzleDepot.com */

/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Bulma-compatible base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.5;
  padding-top: 52px;
  min-height: 100vh;
  margin: 0;
}

body.has-navbar-fixed-top {
  padding-top: 52px;
}

/* Navbar Styles */
.navbar {
  background-color: #3273dc;
  min-height: 52px;
}

.navbar.is-link {
  background-color: #3273dc;
}

.navbar.is-fixed-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.navbar-brand {
  align-items: stretch;
  display: flex;
  min-height: 52px;
}

.navbar-item {
  color: #fff;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}

.navbar-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-item.is-active {
  background-color: rgba(255, 255, 255, 0.15);
  font-weight: 700;
}

.navbar-burger {
  display: none;
  cursor: pointer;
  width: 52px;
  height: 52px;
  position: relative;
  margin-left: auto;
}

.navbar-burger span {
  background-color: #fff;
  display: block;
  height: 2px;
  left: calc(50% - 10px);
  position: absolute;
  width: 20px;
  transition: all 0.3s;
}

.navbar-burger span:nth-child(1) { top: calc(50% - 8px); }
.navbar-burger span:nth-child(2) { top: calc(50% - 1px); }
.navbar-burger span:nth-child(3) { top: calc(50% + 6px); }

.navbar-burger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-burger.is-active span:nth-child(2) {
  opacity: 0;
}

.navbar-burger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media screen and (max-width: 1023px) {
  .navbar-menu {
    display: none;
    background-color: #3273dc;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 0.5rem 0;
  }

  .navbar-menu.is-active {
    display: block;
  }

  .navbar-burger {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media screen and (min-width: 1024px) {
  .navbar-menu {
    display: flex;
    align-items: stretch;
    flex-grow: 1;
  }

  .navbar-start {
    display: flex;
    align-items: stretch;
    margin-right: auto;
  }

  .navbar-end {
    display: flex;
    align-items: stretch;
    margin-left: auto;
  }
}

/* Container and Section */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 3rem 1.5rem;
}

/* Game Container */
.game-container {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 16px;
  padding: 2rem;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.game-container.dark-theme {
  color: #e0e6f0;
}

/* Hero Section */
.hero-intro {
  background-color: #1f1f2b;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Breadcrumbs */
.breadcrumb {
  font-size: 0.875rem;
}

.breadcrumb ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  padding: 0 0.5rem;
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb a {
  color: #ffd447;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb li.is-active a {
  color: #fff;
  cursor: default;
}

/* Typography */
.title {
  font-weight: 700;
  line-height: 1.2;
}

.title.is-1 { font-size: 2.5rem; }
.title.is-2 { font-size: 2rem; }
.title.is-3 { font-size: 1.5rem; }
.title.is-4 { font-size: 1.25rem; }
.title.is-5 { font-size: 1.125rem; }

.subtitle {
  font-weight: 400;
  line-height: 1.4;
}

.subtitle.is-4 { font-size: 1.25rem; }
.subtitle.is-5 { font-size: 1.125rem; }

.has-text-white { color: #fff !important; }
.has-text-warning { color: #ffd447 !important; }
.has-text-centered { text-align: center !important; }
.has-text-weight-bold { font-weight: 700 !important; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button.is-warning {
  background-color: #ffd447;
  border-color: transparent;
  color: #000;
}

.button.is-warning:hover {
  background-color: #ffdb4d;
}

.button.is-success {
  background-color: #48c774;
  border-color: transparent;
  color: #fff;
}

.button.is-success:hover {
  background-color: #3ec46d;
}

.button.is-link {
  background-color: #3273dc;
  border-color: transparent;
  color: #fff;
}

.button.is-link:hover {
  background-color: #276cda;
}

.button.is-primary {
  background-color: #00d1b2;
  border-color: transparent;
  color: #fff;
}

.button.is-primary:hover {
  background-color: #00c4a7;
}

.button.is-danger {
  background-color: #f14668;
  border-color: transparent;
  color: #fff;
}

.button.is-large {
  font-size: 1.25rem;
  padding: 0.75rem 1.5rem;
}

.button.is-medium {
  font-size: 1.125rem;
  padding: 0.625rem 1.25rem;
}

.button.is-small {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
}

.button.is-outlined {
  background-color: transparent;
  border-width: 2px;
}

.button.is-warning.is-outlined {
  border-color: #ffd447;
  color: #ffd447;
}

.button.is-warning.is-outlined:hover {
  background-color: #ffd447;
  color: #000;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.buttons.is-centered {
  justify-content: center;
}

/* Game Stats */
.game-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  min-width: 100px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffd447;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: #8b9cc4;
  margin-top: 0.25rem;
}

/* Question Card */
.question-card {
  background: #252836;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.question-number {
  display: inline-block;
  background: #3273dc;
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.question-text {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.question-image {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem 0;
  background: #1a1a2e;
  padding: 1rem;
}

/* Answer Options */
.answer-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.answer-option {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #2b2f3c;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #e0e6f0;
}

.answer-option:hover {
  background: #363b4d;
  border-color: #3273dc;
}

.answer-option.selected {
  background: rgba(50, 115, 220, 0.2);
  border-color: #3273dc;
}

.answer-option.correct {
  background: rgba(72, 199, 116, 0.2);
  border-color: #48c774;
}

.answer-option.incorrect {
  background: rgba(241, 70, 104, 0.2);
  border-color: #f14668;
}

.answer-option.disabled {
  pointer-events: none;
  opacity: 0.7;
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-weight: 700;
  margin-right: 1rem;
  flex-shrink: 0;
}

.option-text {
  flex: 1;
}

.option-image {
  max-width: 150px;
  max-height: 100px;
  border-radius: 4px;
}

/* Progress Bar */
.progress-container {
  margin-bottom: 1.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #8b9cc4;
}

.progress-bar {
  height: 8px;
  background: #2b2f3c;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3273dc, #48c774);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Timer */
.timer-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #252836;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffd447;
}

.timer-display.warning {
  color: #f39c12;
  animation: pulse 1s infinite;
}

.timer-display.danger {
  color: #f14668;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Results Section */
.results-container {
  background: #252836;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.results-score {
  font-size: 4rem;
  font-weight: 800;
  color: #ffd447;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.results-label {
  font-size: 1.25rem;
  color: #8b9cc4;
  margin-bottom: 2rem;
}

.results-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.breakdown-item {
  background: #2b2f3c;
  border-radius: 8px;
  padding: 1rem;
}

.breakdown-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.breakdown-label {
  font-size: 0.75rem;
  color: #8b9cc4;
  text-transform: uppercase;
}

/* Score Rating Badge */
.score-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.score-badge.excellent {
  background: linear-gradient(90deg, #ffd447, #f39c12);
  color: #000;
}

.score-badge.good {
  background: linear-gradient(90deg, #48c774, #20c997);
  color: #fff;
}

.score-badge.average {
  background: linear-gradient(90deg, #3273dc, #00d1b2);
  color: #fff;
}

.score-badge.needs-improvement {
  background: linear-gradient(90deg, #f39c12, #f14668);
  color: #fff;
}

/* Explanation Box */
.explanation-box {
  background: rgba(50, 115, 220, 0.1);
  border-left: 4px solid #3273dc;
  border-radius: 0 8px 8px 0;
  padding: 1rem;
  margin-top: 1rem;
  text-align: left;
}

.explanation-box.correct {
  background: rgba(72, 199, 116, 0.1);
  border-color: #48c774;
}

.explanation-box.incorrect {
  background: rgba(241, 70, 104, 0.1);
  border-color: #f14668;
}

.explanation-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.explanation-text {
  color: #b0b0c0;
  line-height: 1.6;
}

/* Grid Layouts */
.columns {
  display: flex;
  flex-wrap: wrap;
  margin: -0.75rem;
}

.column {
  padding: 0.75rem;
  flex: 1 1 0;
}

.column.is-one-quarter {
  flex: none;
  width: 25%;
}

@media screen and (max-width: 768px) {
  .column.is-one-quarter {
    width: 50%;
  }
}

@media screen and (max-width: 480px) {
  .column.is-one-quarter {
    width: 100%;
  }
}

/* Utilities */
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-5 { margin-top: 1.5rem !important; }
.p-5 { padding: 1.5rem !important; }
.m-1 { margin: 0.25rem !important; }

/* Footer */
.footer {
  background-color: #1a1a2e;
  padding: 3rem 1.5rem;
}

.footer.has-background-dark {
  background-color: #1a1a2e;
}

.footer a {
  color: #ffd447;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Box */
.box {
  background: rgba(30, 30, 50, 0.9);
  border-radius: 8px;
  padding: 1.5rem;
}

/* Notification */
.notification {
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
}

.notification.is-warning {
  background-color: rgba(255, 212, 71, 0.15);
  color: #ffd447;
}

.notification.is-warning.is-light {
  background-color: rgba(255, 212, 71, 0.1);
  color: #a08800;
}

.notification.is-info {
  background-color: rgba(50, 115, 220, 0.15);
  color: #3273dc;
}

.notification.is-info.is-light {
  background-color: rgba(50, 115, 220, 0.1);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  align-items: center;
  justify-content: center;
}

.modal.is-active {
  display: flex;
}

.modal-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 10, 10, 0.86);
}

.modal-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  max-width: 640px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 4rem);
  overflow: auto;
}

.modal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #f5f5f5;
  border-bottom: 1px solid #dbdbdb;
  border-radius: 8px 8px 0 0;
}

.modal-card-head.has-background-info {
  background: #3273dc;
}

.modal-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #363636;
}

.modal-card-head.has-background-info .modal-card-title {
  color: #fff;
}

.modal-card-body {
  padding: 1.5rem;
  background: #fff;
}

.delete {
  appearance: none;
  background-color: rgba(10, 10, 10, 0.2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  height: 20px;
  width: 20px;
  position: relative;
}

.delete::before,
.delete::after {
  background-color: #fff;
  content: "";
  display: block;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
  transform-origin: center center;
}

.delete::before {
  height: 2px;
  width: 50%;
}

.delete::after {
  height: 50%;
  width: 2px;
}

/* Input */
.input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  border: 1px solid #dbdbdb;
  border-radius: 4px;
  background: #fff;
  color: #363636;
}

.input:focus {
  border-color: #3273dc;
  outline: none;
  box-shadow: 0 0 0 2px rgba(50, 115, 220, 0.25);
}

.input.is-large {
  font-size: 1.25rem;
  padding: 0.75rem 1rem;
}

/* Field */
.field {
  margin-bottom: 0.75rem;
}

.field.is-grouped {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.field.is-grouped.is-grouped-centered {
  justify-content: center;
}

.control {
  flex: none;
}

.control.is-expanded {
  flex: 1;
}

/* Size utilities */
.is-size-7 { font-size: 0.875rem !important; }

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .section {
    padding: 2rem 1rem;
  }

  .game-container {
    padding: 1rem;
  }

  .title.is-1 {
    font-size: 2rem;
  }

  .question-card {
    padding: 1.25rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .results-score {
    font-size: 3rem;
  }
}

/* Content styling */
.content ol {
  counter-reset: list;
  list-style: none;
  padding-left: 0;
}

.content ol li {
  counter-increment: list;
  margin-bottom: 0.75rem;
  padding-left: 2rem;
  position: relative;
}

.content ol li::before {
  content: counter(list) ".";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: #ffd447;
}

/* Link styles */
a.has-text-warning {
  color: #ffd447 !important;
}

a.has-text-warning:hover {
  color: #fff !important;
}
