/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* Custom PNG Cursors */
body {
  cursor: url('images/kursorstrela.png') 16 16, default;
}

/* Interactive elements - hand cursor */
button, 
.options > div, 
.exercise-card,
.share-btn,
.nav-btn,
.game-control-btn,
.back-btn,
.buy-btn,
.read-btn,
.number-btn,
.pattern-option,
.memory-btn,
.category-card,
.category-item,
.search-result,
.menu-item,
.article-card,
.product-card,
.store-card,
[onclick],
[style*="cursor: pointer"],
a {
  cursor: url('images/kursor ruka.png') 16 16, pointer !important;
}

/* Text input elements */
input, 
select, 
textarea {
  cursor: url('images/kursorstrela.png') 16 16, url('images/kursor.png') 16 16, text;
}

/* Fallback for unsupported elements */
* {
  cursor: inherit;
}

body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

@keyframes cityMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes roadMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(-20px); }
}

@keyframes cityGlow {
  0% { opacity: 0.3; }
  100% { opacity: 0.8; }
}

.header-banner {
  height: 12vh;
  width: 100%;
  background: url('images/pozadinasajta.png');
  background-size: cover;
  background-position: center;
  filter: brightness(1.3);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 20px rgba(255,215,0,0.3), 0 0 30px rgba(255,215,0,0.6), inset 0 0 20px rgba(255,215,0,0.2);
}

.banner-title {
  font-family: 'Orbitron', monospace;
  font-size: 3rem;
  font-weight: 900;
  margin: 0;
  text-shadow: 
    0 0 5px #ffd700,
    0 0 10px #ffd700,
    0 0 15px #ffd700,
    0 0 20px #ffd700,
    0 0 35px #ffd700,
    0 0 40px #ffd700,
    2px 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 1.5rem;
  width: 100%;
  text-align: center;
  animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
  from {
    text-shadow: 
      0 0 5px #ffd700,
      0 0 10px #ffd700,
      0 0 15px #ffd700,
      0 0 20px #ffd700,
      0 0 35px #ffd700,
      0 0 40px #ffd700,
      2px 2px 4px rgba(0,0,0,0.8);
  }
  to {
    text-shadow: 
      0 0 2px #ffd700,
      0 0 5px #ffd700,
      0 0 8px #ffd700,
      0 0 12px #ffd700,
      0 0 18px #ffd700,
      0 0 25px #ffd700,
      0 0 30px currentColor,
      0 0 35px currentColor,
      2px 2px 4px rgba(0,0,0,0.8);
  }
}

.header-left {
  position: absolute;
  left: 80px;
  top: 39%;
  transform: translateY(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.header-right {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-btn {
  background: rgba(26,26,46,0.8);
  color: #ffd700;
  border: 2px solid #ffd700;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  font-size: 16px;
}

.header-btn:hover {
  background: #ffd700;
  color: #1a1a2e;
}

.search-field {
  background: rgba(26,26,46,0.8);
  color: #ffd700;
  border: 2px solid #ffd700;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  width: 120px;
}

.search-field::placeholder {
  color: rgba(255,215,0,0.7);
}

.search-container {
  position: relative;
  margin-top: 15px;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(26,26,46,0.95);
  border: 2px solid #ffd700;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-item {
  padding: 8px 12px;
  color: #ffd700;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,215,0,0.2);
}

.search-item:hover {
  background: rgba(255,215,0,0.2);
}

.search-item:last-child {
  border-bottom: none;
}

.search-input {
  display: none !important;
}



.auth-btn {
  background: rgba(26,26,46,0.8);
  color: #ffd700;
  border: 2px solid #ffd700;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.auth-btn:hover {
  background: #ffd700;
  color: #1a1a2e;
  transform: scale(1.05);
}

.iq-red {
  color: #1a1a2e;
}

.test-blue {
  color: #16213e;
}

.footer-banner {
  height: 12vh;
  width: 100%;
  background: url('images/pozadinasajta.png');
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(255,215,0,0.3), 0 0 30px rgba(255,215,0,0.6), inset 0 0 20px rgba(255,215,0,0.2);
}

.main-content {
  display: flex;
  flex: 1;
}

.left-banner {
  width: 20vw;
  background: url('images/pozadinasajta.png');
  background-size: 400% auto;
  background-position: center;
  background-repeat: repeat;
  transform: rotate(180deg);
  box-shadow: 2px 0 15px rgba(255,215,0,0.4), 0 0 40px rgba(255,215,0,0.8), inset 0 0 25px rgba(255,215,0,0.3), -10px 0 30px rgba(255,215,0,0.6);
}

.right-banner {
  width: 20vw;
  background: url('images/pozadinasajta.png');
  background-size: 400% auto;
  background-position: center;
  background-repeat: repeat;
  transform: rotate(180deg);
  box-shadow: -2px 0 15px rgba(255,215,0,0.4), 0 0 40px rgba(255,215,0,0.8), inset 0 0 25px rgba(255,215,0,0.3), 10px 0 30px rgba(255,215,0,0.6);
}

.container {
  background: rgba(255,215,0,0.95);
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect width="100" height="100" fill="%23f0f0f0" opacity="0.1"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 20px;
  border: 3px solid #ffd700;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.8);
  flex: 1;
  margin: 15px;
  text-align: center;
  font-family: Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  backdrop-filter: blur(10px);
  overflow: hidden;
  position: relative;
}



.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 17px;
  z-index: 1;
  pointer-events: none;
}

.container > * {
  position: relative;
  z-index: 2;
}

h1 {
  margin-bottom: 20px;
  color: #333;
}

#start-screen {
  margin: 20px 0;
}

#start-btn {
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  font-weight: 900;
  padding: 20px 40px;
  border: 3px solid #ffd700;
  border-radius: 15px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ffd700;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,215,0,0.2);
  transition: 0.3s;
}

#start-btn:hover {
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  color: #1a1a2e;
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(255,215,0,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  text-shadow: none;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #007bff;
  color: white;
  font-size: 16px;
  cursor: pointer;
  margin-top: 15px;
}

button:hover {
  background: #0056b3;
}

.question {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.question img {
  width: 90%;
  max-height: 350px;
  object-fit: contain;
}

.options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
  width: 52%;
  margin: 0 auto;
  justify-items: center;
  align-items: center;
}

.options > div {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  background: rgba(255,255,255,0.1);
  max-height: 88px;
}

.options img {
  width: 95%;
  height: 95%;
  object-fit: contain;
}

.options > div:hover {
  border: 2px solid #ffd700;
  background: rgba(255,215,0,0.2);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255,215,0,0.6);
  animation: optionGlow 1.5s ease-in-out infinite alternate;
}

@keyframes optionGlow {
  from { box-shadow: 0 0 15px rgba(255,215,0,0.4); }
  to { box-shadow: 0 0 25px rgba(255,215,0,0.8); }
}

/* Loading Spinner */
.spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner-ring {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,215,0,0.3);
  border-top: 4px solid #ffd700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner p {
  color: #ffd700;
  font-size: 14px;
  margin: 0;
}

/* Error Message */
.error-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.error-msg p {
  color: #ff6b6b;
  font-size: 16px;
  margin: 0 0 20px 0;
}

.retry-button {
  background: #ffd700;
  color: #1a1a2e;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.retry-button:hover {
  background: #ffb347;
  transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-banner, .footer-banner {
    height: 8vh;
  }
  
  .banner-title {
    font-size: 2rem;
    letter-spacing: 1rem;
  }
  
  .left-banner, .right-banner {
    width: 5vw;
  }
  
  .container {
    margin: 10px;
    padding: 15px;
  }
  
  #start-btn {
    font-size: 1.8rem;
    padding: 15px 30px;
  }
  
  .question img {
    width: 100%;
    max-height: 250px;
  }
  
  /* Mobile layout - 2 rows, 3 columns for options */
  .options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2px;
    width: 98%;
    margin: 0 auto;
  }
  
  .options > div {
    max-height: 102px;
    min-height: 102px;
  }
}

@media (max-width: 480px) {
  .banner-title {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
  }
  
  #start-btn {
    font-size: 1.5rem;
    padding: 12px 25px;
  }
  
  /* Keep 2 rows, 3 columns even on small screens */
  .options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1px;
    width: 99%;
    margin: 0 auto;
  }
  
  .options > div {
    max-height: 85px;
    min-height: 85px;
  }
}

/* Progress Bar */
.progress-container {
  margin-bottom: 20px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,215,0,0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700 0%, #ffb347 100%);
  width: 10%;
  border-radius: 10px;
  transition: width 0.5s ease;
  box-shadow: 0 2px 4px rgba(255,215,0,0.3);
}

.progress-text {
  font-size: 14px;
  color: #666;
  font-weight: bold;
  text-align: center;
  position: relative;
}

.progress-text span {
  color: #ffd700;
}

/* Smooth Animations */
.question {
  animation: fadeIn 0.5s ease-in;
}

.options > div {
  animation: slideUp 0.3s ease-out;
  animation-fill-mode: both;
}

.options > div:nth-child(1) { animation-delay: 0.1s; }
.options > div:nth-child(2) { animation-delay: 0.2s; }
.options > div:nth-child(3) { animation-delay: 0.3s; }
.options > div:nth-child(4) { animation-delay: 0.4s; }
.options > div:nth-child(5) { animation-delay: 0.5s; }
.options > div:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.container {
  transition: all 0.3s ease;
}

#start-btn {
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 5px 15px rgba(255,215,0,0.4); }
  to { box-shadow: 0 8px 25px rgba(255,215,0,0.6); }
}

.timer-display {
  color: #666;
  position: absolute;
  right: 0;
  top: 0;
}

.fullscreen-btn {
  position: absolute;
  left: 0;
  top: 0;
  background: none;
  border: 2px solid #ffd700;
  color: #ffd700;
  font-size: 16px;
  width: 30px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.fullscreen-btn:hover {
  background: #ffd700;
  color: #1a1a2e;
  transform: scale(1.1);
}

.fullscreen-app-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,215,0,0.2);
  border: 2px solid #ffd700;
  color: #1a1a2e;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.fullscreen-app-btn:hover {
  background: #ffd700;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 15px rgba(255,215,0,0.5);
}



/* Social Share */
.social-share {
  margin: 20px 0;
  padding: 20px;
  background: rgba(255,215,0,0.05);
  border-radius: 12px;
  border: 2px solid #ffd700;
}

.social-share h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
}

.share-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.share-buttons:has(.copy-link) {
  grid-template-columns: repeat(3, 1fr);
}

.copy-link {
  grid-column: span 1;
}

.share-btn {
  padding: 8px 1px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  font-size: 12px;
}

.facebook { background: rgba(24, 119, 242, 0.5); color: white; }
.twitter { background: rgba(29, 161, 242, 0.15); color: #1da1f2; }
.snapchat { background: rgba(255, 252, 0, 0.5); color: black; }
.whatsapp { background: rgba(37, 211, 102, 0.5); color: white; }
.viber { background: rgba(102, 51, 153, 0.15); color: #663399; }
.copy-link { background: rgba(102, 102, 102, 0.5); color: white; }

.share-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Brain Training */
.brain-training {
  margin-top: 40px;
  padding: 25px;
  background: rgba(255,215,0,0.1);
  border-radius: 15px;
  border: 2px solid #ffd700;
}

.brain-training h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 24px;
}

.brain-training p {
  color: #666;
  margin-bottom: 20px;
  font-size: 16px;
}

.exercises-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  justify-items: center;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.exercise-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.3s;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.exercise-card:hover {
  border-color: #ffd700;
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(255,215,0,0.3);
}

.exercise-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.exercise-card h4 {
  color: #333;
  margin-bottom: 8px;
  font-size: 16px;
}

.exercise-card p {
  color: #666;
  font-size: 12px;
  margin: 0;
}

/* Memory Game */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255,215,0,0.1);
  border-radius: 10px;
  border: 2px solid #ffd700;
}

.game-header {
  text-align: center;
  position: relative;
}

.game-header h2 {
  margin: 0;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

.back-btn {
  position: relative;
  z-index: 1;
}

.game-stats {
  position: relative;
  z-index: 1;
}

.back-btn {
  background: #ffd700;
  color: #1a1a2e;
  border: none;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.back-btn:hover {
  background: #ffb347;
  transform: scale(1.05);
}

.game-stats {
  display: flex;
  gap: 20px;
  font-weight: bold;
  color: #333;
  justify-content: center;
}

.game-info {
  text-align: center;
  margin-bottom: 30px;
}

.game-info p {
  font-size: 18px;
  color: #666;
  margin: 0;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 300px;
  margin: 0 auto 30px;
  justify-items: center;
  align-items: center;
  place-items: center;
}

.memory-btn {
  width: 120px;
  height: 120px;
  border-radius: 15px;
  cursor: pointer;
  transition: 0.3s;
  border: 3px solid #333;
  position: relative;
}

.memory-btn[data-color="0"] { background: #ff4757; }
.memory-btn[data-color="1"] { background: #2ed573; }
.memory-btn[data-color="2"] { background: #3742fa; }
.memory-btn[data-color="3"] { background: #ffa502; }

.memory-btn.active {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(255,215,0,0.8);
  border-color: #ffd700;
}

.memory-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.game-controls {
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.game-control-btn {
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  color: #1a1a2e;
  border: 2px solid #ffd700;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  font-size: 16px;
  margin: 0;
}

.game-control-btn:hover {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ffd700;
  transform: scale(1.05);
}

/* Result Screen with Background */
#result-screen {
  background-image: url('images/iqscore.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
  min-height: 600px;
}

#result-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  z-index: 1;
}

#result-screen > * {
  position: relative;
  z-index: 2;
}

/* IQ Score Number on Background */
#result-screen::after {
  content: attr(data-iq-score);
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) scaleY(1.6);
  font-size: 8rem;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  font-family: 'Orbitron', monospace;
  letter-spacing: 0.4rem;
  z-index: 1.5;
  pointer-events: none;
}

.timer-display.warning {
  color: #ff6b6b;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Pattern Game Styles */
.pattern-item {
  font-size: 60px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: white;
}

.pattern-option {
  font-size: 50px;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffd700;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: 0.3s;
}

.pattern-option:hover {
  background: #ffd700;
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(255,215,0,0.4);
}

/* Navigation Buttons */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  width: 65%;
  margin-left: auto;
  margin-right: auto;
}

.nav-btn {
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  color: #1a1a2e;
  border: 2px solid #ffd700;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  font-size: 14px;
  min-width: 100px;
}

.nav-btn:hover {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ffd700;
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(255,215,0,0.3);
}

.nav-btn:disabled {
  background: #ccc;
  color: #666;
  border-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Magazine Styles */
.magazine-header {
  text-align: center;
  margin-bottom: 40px;
}

.magazine-header h2 {
  color: #ffd700;
  font-size: 2.5em;
  margin-bottom: 10px;
  text-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 15px currentColor,
    0 0 20px currentColor,
    0 0 35px currentColor,
    0 0 40px currentColor;
  animation: neonFlicker 3s ease-in-out infinite alternate;
}

@keyframes neonFlicker {
  0%, 100% {
    text-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor,
      0 0 15px currentColor,
      0 0 20px currentColor,
      0 0 35px currentColor,
      0 0 40px currentColor;
  }
  50% {
    text-shadow: 
      0 0 2px currentColor,
      0 0 5px currentColor,
      0 0 8px currentColor,
      0 0 12px currentColor,
      0 0 18px currentColor,
      0 0 25px currentColor;
  }
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.article-card {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #ffd700;
  border-radius: 15px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.article-image {
  font-size: 3em;
  text-align: center;
  margin-bottom: 15px;
}

.article-card h3 {
  color: #ffd700;
  margin-bottom: 10px;
}

.article-card p {
  color: #fff;
  line-height: 1.6;
  margin-bottom: 15px;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  color: #ccc;
}

.back-to-home {
  text-align: center;
}

/* IQ Magazine Section */
.iq-magazine {
  margin-top: 40px;
  padding: 25px;
  background: rgba(255,215,0,0.1);
  border-radius: 15px;
  border: 2px solid #ffd700;
}

.iq-magazine h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 24px;
}

.iq-magazine p {
  color: #666;
  margin-bottom: 20px;
  font-size: 16px;
}

.magazine-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

/* IQ Store Section */
.iq-store {
  margin-top: 40px;
  padding: 25px;
  background: rgba(255,215,0,0.15);
  border-radius: 15px;
  border: 2px solid #ffd700;
}

.iq-store h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 24px;
}

.iq-store p {
  color: #666;
  margin-bottom: 20px;
  font-size: 16px;
}

.store-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.store-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.3s;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: relative;
}

.store-card:hover {
  border-color: #ffd700;
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(255,215,0,0.3);
}

.store-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.store-card h4 {
  color: #333;
  margin-bottom: 8px;
  font-size: 16px;
}

.store-card p {
  color: #666;
  font-size: 12px;
  margin-bottom: 15px;
}

.price {
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  color: #1a1a2e;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
  display: inline-block;
}

/* Store Page Styles */
.store-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.store-header h2 {
  color: #ffd700;
  font-size: 2.5em;
  margin: 20px 0 10px;
  text-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 15px currentColor,
    0 0 20px currentColor,
    0 0 35px currentColor,
    0 0 40px currentColor;
  animation: neonBuzz 2.5s ease-in-out infinite alternate;
}

@keyframes neonBuzz {
  0% {
    text-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor,
      0 0 15px currentColor,
      0 0 20px currentColor,
      0 0 35px currentColor,
      0 0 40px currentColor;
  }
  25% {
    text-shadow: 
      0 0 2px currentColor,
      0 0 5px currentColor,
      0 0 8px currentColor,
      0 0 12px currentColor;
  }
  50% {
    text-shadow: 
      0 0 8px currentColor,
      0 0 15px currentColor,
      0 0 25px currentColor,
      0 0 35px currentColor,
      0 0 45px currentColor;
  }
  100% {
    text-shadow: 
      0 0 5px currentColor,
      0 0 10px currentColor,
      0 0 15px currentColor,
      0 0 20px currentColor,
      0 0 35px currentColor,
      0 0 40px currentColor;
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.product-card {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #ffd700;
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(255, 215, 0, 0.3);
  border-color: #ffb347;
}

.product-icon {
  font-size: 4em;
  margin-bottom: 15px;
  display: block;
}

.product-card h3 {
  color: #1a1a2e;
  margin-bottom: 15px;
  font-size: 1.4em;
}

.product-card p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 14px;
}

.product-card .price {
  font-size: 1.5em;
  margin-bottom: 20px;
  padding: 10px 20px;
}

.buy-btn {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ffd700;
  border: 2px solid #ffd700;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  font-size: 16px;
  width: 100%;
}

.buy-btn:hover {
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  color: #1a1a2e;
  transform: scale(1.05);
}

/* Sudoku Styles */
.number-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.number-btn:hover {
  background: #0056b3;
  transform: scale(1.05);
}

/* Registration Form Styles */
.register-form {
  max-width: 400px;
  margin: 0 auto;
  padding: 30px;
  background: url('images/reister.png'), rgba(255,255,255,0.9);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-blend-mode: overlay;
  border-radius: 15px;
  border: 2px solid #ffd700;
  position: relative;
}



.register-form h2 {
  text-align: center;
  color: #ffd700;
  margin-bottom: 10px;
}

.register-form p {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: 0.3s;
  cursor: text;
}

.form-group input:focus {
  border-color: #ffd700;
  outline: none;
  box-shadow: 0 0 10px rgba(255,215,0,0.3);
}

.error-msg {
  display: block;
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 5px;
}

.register-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  color: #1a1a2e;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.register-btn:hover {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ffd700;
  transform: scale(1.02);
}

.login-link {
  text-align: center;
  margin-top: 20px;
}

.login-link a {
  color: #ffd700;
  text-decoration: none;
  font-weight: bold;
}

.login-link a:hover {
  text-decoration: underline;
}

/* Game Leaderboard Styles */
.leaderboard-header {
  text-align: center;
  margin-bottom: 30px;
}

.leaderboard-header h2 {
  color: #ffd700;
  font-size: 2em;
  margin-bottom: 10px;
}

.leaderboard-table {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 30px;
}

.table-header {
  display: grid;
  grid-template-columns: 60px 1fr 100px 120px 100px;
  background: #ffd700;
  color: #1a1a2e;
  font-weight: bold;
  padding: 15px 10px;
}

.table-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px 120px 100px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,215,0,0.2);
  color: #fff;
}

.table-row:hover {
  background: rgba(255,215,0,0.1);
}

.table-row.top-1 {
  background: linear-gradient(90deg, rgba(255,215,0,0.3), rgba(255,215,0,0.1));
  border-left: 4px solid #ffd700;
}

.table-row.top-2 {
  background: linear-gradient(90deg, rgba(192,192,192,0.3), rgba(192,192,192,0.1));
  border-left: 4px solid #c0c0c0;
}

.table-row.top-3 {
  background: linear-gradient(90deg, rgba(205,127,50,0.3), rgba(205,127,50,0.1));
  border-left: 4px solid #cd7f32;
}

.rank {
  font-weight: bold;
  text-align: center;
}

.name {
  font-weight: bold;
}

.score {
  text-align: center;
  font-weight: bold;
  color: #ffd700;
}

.country {
  text-align: center;
}

.date {
  text-align: center;
  font-size: 0.9em;
  color: #ccc;
}

.no-scores {
  text-align: center;
  padding: 40px;
  color: #ccc;
  font-style: italic;
}

/* Racing Game Background */
#racing-game-screen {
  position: relative;
}

/* Mobile Controls - Always visible */
#tetris-mobile-controls,
#numbers-mobile-controls {
  display: block !important;
}

/* Hide 2048 controls on desktop */
#numbers-left-btn, #numbers-right-btn, #numbers-up-btn, #numbers-down-btn {
  display: none !important;
}

/* Mobile controls - no overlap system */
@media (max-width: 480px) {
  
  /* Show 2048 controls on mobile */
  #numbers-left-btn, #numbers-right-btn, #numbers-up-btn, #numbers-down-btn {
    display: flex !important;
  }
  #tetris-mobile-controls div,
  #numbers-mobile-controls div,
  #racing-mobile-controls div {
    min-width: 45px !important;
    min-height: 45px !important;
    margin: 5px !important;
    font-size: 12px !important;
  }
  
  /* Right side controls */
  #tetris-mobile-controls div:nth-child(1),
  #numbers-mobile-controls div:nth-child(1) {
    top: 50% !important;
    right: 60px !important;
  }
  
  #tetris-mobile-controls div:nth-child(2),
  #numbers-mobile-controls div:nth-child(2) {
    top: 65% !important;
    right: 60px !important;
  }
  
  #tetris-mobile-controls div:nth-child(3),
  #numbers-mobile-controls div:nth-child(3) {
    top: 57.5% !important;
    right: 115px !important;
  }
  
  #tetris-mobile-controls div:nth-child(4),
  #numbers-mobile-controls div:nth-child(4) {
    top: 57.5% !important;
    right: 5px !important;
  }
  
  /* Space button */
  #tetris-mobile-controls div:nth-child(5),
  #numbers-mobile-controls div:nth-child(5) {
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 70px !important;
    height: 35px !important;
  }
  
  /* Memory game header - prevent text overlap */
  .game-header {
    flex-direction: column !important;
    gap: 10px !important;
    text-align: center !important;
  }
  
  .game-header h2 {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    width: auto !important;
    margin: 0 !important;
  }
  
  .game-stats {
    flex-direction: column !important;
    gap: 5px !important;
    align-items: center !important;
  }
  

  
  /* Game screens - fit to mobile screen */
  #racing-track {
    width: 95vw !important;
    height: 60vh !important;
    margin: 5px auto !important;
  }
  
  #tetris-board {
    width: 200px !important;
    height: 400px !important;
  }
  
  #numbers-grid {
    width: 280px !important;
    height: 280px !important;
  }
  
  .memory-grid {
    max-width: 250px !important;
  }
  
  .memory-btn {
    width: 100px !important;
    height: 100px !important;
  }
  
  /* Container adjustments */
  .container {
    padding: 10px !important;
    margin: 5px !important;
  }
  
  /* Question images */
  .question img {
    max-width: 95% !important;
    max-height: 200px !important;
  }
  
  /* Reaction Time game - fit to mobile */
  #reaction-area {
    width: 90vw !important;
    max-width: 300px !important;
    height: 200px !important;
    margin: 10px auto !important;
    font-size: 18px !important;
  }
  
  #reaction-result {
    font-size: 20px !important;
    margin-top: 10px !important;
    color: #ffd700 !important;
    font-weight: bold !important;
    display: block !important;
    visibility: visible !important;
  }
  
  /* Reaction Time stats - mobile layout */
  #reaction-game-screen .game-stats {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 15px !important;
    font-size: 14px !important;
  }
  
  #reaction-best,
  #reaction-avg {
    display: inline !important;
    visibility: visible !important;
    color: #ffd700 !important;
  }
  
  /* Pattern Recognition - fit to mobile */
  .pattern-item {
    font-size: 40px !important;
    width: 60px !important;
    height: 60px !important;
    margin: 0 5px !important;
  }
  
  .pattern-option {
    font-size: 35px !important;
    width: 55px !important;
    height: 55px !important;
    margin: 0 5px !important;
  }
  
  #pattern-sequence {
    gap: 10px !important;
    margin-bottom: 20px !important;
  }
  
  #pattern-options {
    gap: 10px !important;
  }
  
  /* Tetris board - mobile center */
  #tetris-board {
    width: 250px !important;
    height: 500px !important;
    margin: 0 auto !important;
  }
}

/* Mobile responsive for exercises grid */
@media (max-width: 480px) {
  .exercises-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .exercise-card {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  
  /* Center magazine and store grids on mobile */
  .magazine-grid,
  .store-grid {
    justify-items: center;
    margin: 0 auto;
    max-width: 300px;
  }
}


