/*
 * Turing Twist - Newspaper/Retro Nintendo Theme
 * Black and white newspaper style with old school Nintendo graphics
 */

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Courier New', 'Courier', monospace;
  background: #ffffff;
  color: #000000;
  line-height: 1.6;
  font-size: 16px;
}

/* Newspaper-style headings */
h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 4px solid #000000;
  padding-bottom: 0.25rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  border-bottom-width: 6px;
}

h2 {
  font-size: 2rem;
  border-bottom-width: 5px;
}

h3 {
  font-size: 1.5rem;
}

/* Pixel-style buttons */
.btn,
button,
input[type="submit"] {
  font-family: 'Courier New', 'Courier', monospace;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  color: #000000;
  border: 4px solid #000000;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.1s ease;
  text-decoration: none;
  display: inline-block;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
  background: #000000;
  color: #ffffff;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px #000000;
}

.btn:active,
button:active,
input[type="submit"]:active {
  transform: translate(0, 0);
  box-shadow: none;
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 1rem;
  padding: 0.75rem;
  background: #ffffff;
  color: #000000;
  border: 3px solid #000000;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border: 3px solid #000000;
  box-shadow: inset 4px 4px 0px rgba(0, 0, 0, 0.1);
}

label {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.5rem;
}

/* Newspaper-style boxes */
.box,
.card,
.panel {
  border: 4px solid #000000;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: #ffffff;
}

.box-header {
  background: #000000;
  color: #ffffff;
  padding: 0.75rem 1rem;
  margin: -1.5rem -1.5rem 1rem -1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Dotted separator lines */
.separator {
  border: none;
  border-top: 3px dashed #000000;
  margin: 1.5rem 0;
}

/* Links */
a {
  color: #000000;
  text-decoration: underline;
  font-weight: bold;
}

a:hover {
  background: #000000;
  color: #ffffff;
  text-decoration: none;
}

/* Alert/Notice boxes */
.notice,
.alert {
  border: 4px solid #000000;
  padding: 1rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.notice {
  background: #ffffff;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0, 0, 0, 0.03) 10px,
    rgba(0, 0, 0, 0.03) 20px
  );
}

.alert {
  background: #000000;
  color: #ffffff;
}

/* Pixel-art style table */
table {
  width: 100%;
  border-collapse: collapse;
  border: 4px solid #000000;
  font-family: 'Courier New', 'Courier', monospace;
}

th, td {
  border: 2px solid #000000;
  padding: 0.75rem;
  text-align: left;
}

th {
  background: #000000;
  color: #ffffff;
  font-weight: bold;
  text-transform: uppercase;
}

tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.05);
}

/* Retro loading/spinner */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.loading {
  font-family: 'Courier New', 'Courier', monospace;
  font-weight: bold;
  font-size: 1.5rem;
}

.loading:after {
  content: '█';
  animation: blink 1s infinite;
}

/* Grid system - newspaper columns */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* Tab navigation - Pixel/Nintendo style */
.game-tabs {
  margin-top: 2rem;
}

.tab-buttons {
  display: flex;
  gap: 0;
  border-bottom: 4px solid #000000;
  margin-bottom: 2rem;
}

.tab-btn {
  font-family: 'Courier New', 'Courier', monospace;
  font-weight: bold;
  font-size: 1rem;
  padding: 1rem 2rem;
  background: #ffffff;
  color: #000000;
  border: 4px solid #000000;
  border-bottom: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.1s ease;
  margin-right: -4px;
  position: relative;
}

.tab-btn:last-child {
  margin-right: 0;
}

.tab-btn:hover:not(.active) {
  background: #cccccc;
  transform: translateY(-2px);
}

.tab-btn.active {
  background: #000000;
  color: #ffffff;
  border-bottom: 4px solid #000000;
  margin-bottom: -4px;
  z-index: 1;
}

.tab-content {
  animation: fadeIn 0.2s ease-in;
}

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

/* Completed game styling */
.game-completed {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0,0,0,0.03) 10px,
    rgba(0,0,0,0.03) 20px
  ) !important;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}
