
:root {
  /* Color palette */
  --bg-color: #000;
  --text-color: #f8f8ff;
  --accent-color: rgba(0, 255, 255, 0.3);
  --accent-bright: rgba(0, 255, 255, 0.6);
  
  /* Typography */
  --font-family: "Bytesized", monospace, sans-serif;
  --font-weight-normal: 400;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 20px;
  --spacing-lg: 30px;
  
  /* Animation timings */
  --animation-duration: 1.2s;
  --animation-easing: ease-in-out;
  
  /* Responsive font sizes */
  --font-size-base: 2.5rem;
  --font-size-terminal: 1rem;
}

.bytesized-regular {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  font-style: normal;
}

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

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
    background: var(--bg-color);
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.centered-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
}

.text {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    color: var(--text-color);
    animation: 
        heartbeat var(--animation-duration) var(--animation-easing) infinite,
        breathing-glow var(--animation-duration) var(--animation-easing) infinite;
    letter-spacing: 3px;
    text-align: center;
    max-width: 90vw;
    word-wrap: break-word;
    hyphens: auto;
    /* Improve text rendering */
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga", "kern";
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    15% {
        transform: scale(1.02);
        opacity: 1;
    }
    30% {
        transform: scale(1);
        opacity: 0.9;
    }
    45% {
        transform: scale(1.01);
        opacity: 0.95;
    }
    60% {
        transform: scale(1);
        opacity: 0.9;
    }
    75% {
        transform: scale(1.005);
        opacity: 0.92;
    }
    90% {
        transform: scale(1);
        opacity: 0.9;
    }
}

@keyframes breathing-glow {
    0%, 100% {
        text-shadow: 
            0 0 10px var(--accent-color),
            0 0 20px rgba(0, 255, 255, 0.2),
            0 0 30px rgba(0, 255, 255, 0.1);
        filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.4));
    }
    15% {
        text-shadow: 
            0 0 15px rgba(0, 255, 255, 0.5),
            0 0 25px rgba(0, 255, 255, 0.4),
            0 0 35px var(--accent-color);
        filter: drop-shadow(0 0 12px var(--accent-bright));
    }
    30% {
        text-shadow: 
            0 0 10px var(--accent-color),
            0 0 20px rgba(0, 255, 255, 0.2),
            0 0 30px rgba(0, 255, 255, 0.1);
        filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.4));
    }
    45% {
        text-shadow: 
            0 0 12px rgba(0, 255, 255, 0.4),
            0 0 22px var(--accent-color),
            0 0 32px rgba(0, 255, 255, 0.2);
        filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
    }
    60% {
        text-shadow: 
            0 0 10px var(--accent-color),
            0 0 20px rgba(0, 255, 255, 0.2),
            0 0 30px rgba(0, 255, 255, 0.1);
        filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.4));
    }
    75% {
        text-shadow: 
            0 0 11px rgba(0, 255, 255, 0.35),
            0 0 21px rgba(0, 255, 255, 0.25),
            0 0 31px rgba(0, 255, 255, 0.15);
        filter: drop-shadow(0 0 9px rgba(0, 255, 255, 0.45));
    }
    90% {
        text-shadow: 
            0 0 10px var(--accent-color),
            0 0 20px rgba(0, 255, 255, 0.2),
            0 0 30px rgba(0, 255, 255, 0.1);
        filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.4));
    }
}

/* Terminal prompt styling */
.terminal-prompt {
    position: fixed;
    top: var(--spacing-md);
    left: var(--spacing-md);
    z-index: 5;
    font-family: var(--font-family);
    font-size: var(--font-size-terminal);
    color: var(--text-color);
    user-select: none;
    pointer-events: none;
}

.prompt-text {
    color: var(--text-color);
}

/* Terminal cursor blinking effect */
.cursor-blink {
    animation: cursor-blink 1s infinite;
    color: #f8f8ff;
    font-weight: bold;
    margin-left: 2px;
}

@keyframes cursor-blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}



/* Responsive design */

/* Large screens and TVs (1920px to 2560px) */
@media (min-width: 1920px) and (max-width: 2560px) {
    .text {
        font-size: 3.2rem;
        letter-spacing: 4px;
    }
    
    .terminal-prompt {
        font-size: 1.2rem;
        top: 30px;
        left: 30px;
    }
}

/* Very large displays (2561px and up) */
@media (min-width: 2561px) {
    .text {
        font-size: 2.8rem;
        letter-spacing: 3px;
    }
    
    .terminal-prompt {
        font-size: 1.1rem;
        top: 25px;
        left: 25px;
    }
}

/* Desktop and large tablets (1200px - 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .text {
        font-size: 3.5rem;
        letter-spacing: 3.5px;
    }
    
    .terminal-prompt {
        font-size: 1.1rem;
        top: 25px;
        left: 25px;
    }
}

/* Tablets and small desktops (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .text {
        font-size: 2.8rem;
        letter-spacing: 2.5px;
    }
    
    .terminal-prompt {
        font-size: 1rem;
        top: 20px;
        left: 20px;
    }
}

/* Mobile landscape and small tablets (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .text {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    .terminal-prompt {
        font-size: 0.9rem;
        top: 15px;
        left: 15px;
    }
}

/* Mobile portrait (320px - 480px) */
@media (max-width: 480px) {
    .text {
        font-size: 1.6rem;
        letter-spacing: 1.5px;
    }
    
    .terminal-prompt {
        font-size: 0.8rem;
        top: 12px;
        left: 12px;
    }
}

/* Very small screens (320px and below) */
@media (max-width: 320px) {
    .text {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    
    .terminal-prompt {
        font-size: 0.7rem;
        top: 10px;
        left: 10px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .text {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Extra large displays (4K and beyond) - prevent text from being too large */
@media (min-width: 3840px) {
    .text {
        font-size: 2.2rem !important;
        letter-spacing: 2px !important;
    }
    
    .terminal-prompt {
        font-size: 1rem !important;
    }
}

/* Very high DPI mobile devices */
@media (max-width: 480px) and (-webkit-min-device-pixel-ratio: 3) {
    .text {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .text {
        font-size: 1.8rem;
        letter-spacing: 1.5px;
    }
    
    .terminal-prompt {
        font-size: 0.8rem;
        top: 8px;
        left: 15px;
    }
}
