/* 
   Retro Gaming Theme CSS for Rand Harris Personal Website
   A dark-themed, responsive design with retro gaming aesthetics
*/

/* Base styles and reset */
:root {
    --primary-color: #00ff00;
    --secondary-color: #ff00ff;
    --tertiary-color: #00ffff;
    --bg-dark: #0a0a0a;
    --bg-medium: #141414;
    --text-color: #ffffff;
    --shadow-color: rgba(0, 255, 0, 0.7);
    --terminal-bg: rgba(0, 20, 0, 0.7);
    --pixel-size: 2px;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'VT323', monospace;
    background-color: black;
    color: var(--text-color);
    font-size: 18px;
    line-height: 1.4;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
    inset: 0;
  }

    /* About section styling */
  .about-section {
    margin: 2rem 0;
    animation: fadeIn 1.5s ease-in;
  }

  .about-text {
    margin-bottom: 1.2rem;
    line-height: 1.7;
    font-size: 1.2rem;
    animation: typing 3s steps(40, end);
  }

  .about-text:last-child {
    margin-bottom: 0;
  }

  /* Add a slight glow effect to important words */
  .about-text strong {
    color: var(--tertiary-color);
    text-shadow: 0 0 5px var(--tertiary-color);
    font-weight: normal;
  }

  /* Extend the terminal-body style for the about section */
  .about-section .terminal-body {
    padding: 1.8rem;
    min-height: 150px;
  }

  .btn-icon img {
    width: 45px; /* or whatever size matches your Font Awesome icons */
    height: auto;
    display: block;
    margin: 0 auto;
    color: var(--tertiary-color);
  }
  
  /* Game container - main wrapper */
  .game-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 100%);
  }
  
  /* CRT and scanline effects */
  .scanlines::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 1px,
      rgba(0, 0, 0, 0.3) 1px,
      rgba(0, 0, 0, 0.3) 2px
    );
    pointer-events: none;
    z-index: 999;
  }
  
  .crt-effect::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
      circle at center,
      transparent 30%,
      rgba(0, 0, 0, 0.5) 90%
    );
    pointer-events: none;
    z-index: 998;
  }
  
  /* Main content area */
  .game-screen {
    position: relative;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-dark);
  }
  
  .game-screen::-webkit-scrollbar {
    width: 8px;
  }
  
  .game-screen::-webkit-scrollbar-track {
    background: var(--bg-dark);
  }
  
  .game-screen::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
  }
  
  /* Header and player info */
  .player-info {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    animation: fadeIn 1s ease-in;
  }
  
  .player-avatar {
    margin-right: 1.5rem;
  }
  
  .pixel-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--secondary-color), var(--tertiary-color));
    position: relative;
    box-shadow: 0 0 10px var(--shadow-color);
    animation: pulse 4s infinite alternate;
  }
  
  .pixel-avatar::before, .pixel-avatar::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: var(--bg-dark);
  }
  
  .pixel-avatar::before {
    top: 25px;
    left: 20px;
    box-shadow: 25px 0 0 var(--bg-dark);
  }
  
  .pixel-avatar::after {
    bottom: 20px;
    left: 30px;
    width: 20px;
    height: 5px;
  }
  
  .player-stats {
    flex: 1;
  }
  
  .game-title {
    font-family: 'Press Start 2P', cursive;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px var(--shadow-color);
    letter-spacing: 2px;
  }
  
  .player-class p {
    margin: 0.3rem 0;
    font-size: 1.3rem;
  }
  
  .player-class span {
    color: var(--tertiary-color);
    text-shadow: 0 0 5px var(--tertiary-color);
  }
  
  .typing-effect {
    border-right: 2px solid var(--primary-color);
    animation: typing 3s steps(12) 1 normal both, blink-caret 0.75s step-end infinite;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    max-width: 12ch;
  }
  
  .status-online {
    color: var(--primary-color) !important;
    animation: blink 1.5s infinite;
  }
  
  /* Navigation controls */
  .game-controls {
    margin: 2rem 0;
    animation: slideUp 1s ease-out;
  }
  
  .game-controls ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-medium);
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .control-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(0, 255, 0, 0.2),
      transparent
    );
    transition: all 0.5s ease;
  }
  
  .control-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--shadow-color);
  }
  
  .control-btn:hover::before {
    left: 100%;
  }
  
  .control-btn:active {
    transform: translateY(2px);
  }
  
  .btn-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--tertiary-color);
  }
  
  .btn-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    letter-spacing: 1px;
  }
  
  /* Terminal message box */
  .game-message {
    margin: 2rem 0;
    animation: fadeIn 2s ease-in;
  }
  
  .terminal {
    background-color: var(--terminal-bg);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
  }
  
  .terminal-header {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    padding: 0.5rem 1rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
  }
  
  .terminal-body {
    padding: 1.5rem;
    min-height: 100px;
  }
  
  .typewriter-text {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 2px;
    animation: typing 5s steps(40, end) 1 normal both, blink-caret 0.75s step-end infinite;
  }
  
  /* Footer */
  .game-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 1rem;
    color: var(--tertiary-color);
    animation: fadeIn 3s ease-in;
  }
  
  .pixel-border-top {
    height: 4px;
    background: linear-gradient(
      to right,
      transparent 0%,
      var(--primary-color) 20%,
      var(--primary-color) 80%,
      transparent 100%
    );
    margin-bottom: 1rem;
  }
  
  /* Audio control */
  .audio-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
  }
  
  .audio-control button {
    background-color: var(--bg-medium);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--shadow-color);
  }
  
  .audio-control button:hover {
    transform: scale(1.1);
  }
  
  /* Animations */
  @keyframes pulse {
    0% {
      box-shadow: 0 0 5px var(--shadow-color);
    }
    100% {
      box-shadow: 0 0 20px var(--shadow-color), 0 0 30px var(--shadow-color);
    }
  }
  
  @keyframes blink {
    0%, 100% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
    }
  }
  
  @keyframes typing {
    from {
      width: 0;
    }
    to {
      width: 100%;
    }
  }
  
  @keyframes blink-caret {
    from, to {
      border-color: transparent;
    }
    50% {
      border-color: var(--primary-color);
    }
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  @keyframes slideUp {
    from {
      transform: translateY(50px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  /* Responsive adjustments */
  @media (max-width: 900px) {
    .game-title {
      font-size: 2rem;
    }
    
    .player-class p {
      font-size: 1.1rem;
    }
    
    .game-controls ul {
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
  }
  
  @media (max-width: 768px) {
    .player-info {
      flex-direction: column;
      text-align: center;
    }
    
    .player-avatar {
      margin-right: 0;
      margin-bottom: 1rem;
    }
    
    .game-title {
      font-size: 1.8rem;
    }
    
    .terminal-body {
      min-height: 80px;
    }
  }
  
  @media (max-width: 500px) {
    .game-screen {
      padding: 1rem;
    }
    
    .game-title {
      font-size: 1.5rem;
    }
    
    .player-class p {
      font-size: 1rem;
    }
    
    .game-controls ul {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .btn-icon {
      font-size: 1.5rem;
    }
    
    .btn-text {
      font-size: 0.6rem;
    }
    
    .terminal-header {
      font-size: 0.7rem;
    }
    
    .typewriter-text {
      font-size: 0.9rem;
      letter-spacing: 1px;
    }
  }

  /* Responsive adjustments for about page */
  @media (max-width: 768px) {
    .about-text {
      font-size: 1.1rem;
      line-height: 1.5;
    }
    
    .about-section .terminal-body {
      padding: 1.2rem;
    }
  }

  @media (max-width: 500px) {
    .about-text {
      font-size: 1rem;
    }
    
    .about-section .terminal-body {
      padding: 1rem;
    }
  }

  /* Retro link styling */
  a {
    color: var(--tertiary-color);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
  }

  a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
  }

  a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
  }

  a:hover::after {
    width: 100%;
  }

  /* Glitch effect for headers */
  @keyframes glitch {
    0%, 100% {
      text-shadow: 
        0 0 10px var(--shadow-color),
        0 0 20px var(--shadow-color);
    }
    20% {
      text-shadow: 
        2px 0 10px var(--secondary-color),
        -2px 0 10px var(--tertiary-color);
    }
    40% {
      text-shadow: 
        -2px 0 10px var(--secondary-color),
        2px 0 10px var(--tertiary-color);
    }
  }

  .game-title:hover {
    animation: glitch 0.5s infinite;
  }

  /* Improved mobile navigation */
  .home-link {
    grid-column: 1 / -1;
  }

  .home-link .control-btn {
    max-width: 200px;
    margin: 0 auto;
  }

  /* Better mobile button layout */
  @media (max-width: 500px) {
    .game-controls ul {
      grid-template-columns: 1fr;
      max-width: 280px;
      margin: 0 auto;
    }
    
    .control-btn {
      padding: 0.8rem;
    }
  }

  /* Mobile text improvements */
  @media (max-width: 768px) {
    body {
      font-size: 16px;
    }
    
    .typewriter-text {
      white-space: normal;
      line-height: 1.5;
      animation: fadeIn 2s ease-in;
    }
    
    .typing-effect {
      max-width: 100%;
    }
  }

  /* Audio control positioning fix */
  @media (max-width: 500px) {
    .audio-control {
      bottom: 10px;
      right: 10px;
    }
    
    .audio-control button {
      width: 40px;
      height: 40px;
      font-size: 1.2rem;
    }
  }

  /* Improved scrollbar for mobile */
  @media (max-width: 768px) {
    .game-screen {
      scrollbar-width: none;
    }
    
    .game-screen::-webkit-scrollbar {
      display: none;
    }
  }

  /* Avatar image styling */
  .player-avatar img {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px var(--shadow-color);
  }