/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #000000;
    color: #ffffff;
    /* min-height: 100vh; */
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

/* Header */
header {
    text-align: center;
    /* padding: 1rem 0; tighter */
    background: #000000; /* match body */
}

header .brand {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

header .logo {
    width: clamp(36px, 6.5vw, 56px);
    height: clamp(36px, 6.5vw, 56px);
    object-fit: contain;
    margin-top: -0.5rem;
}

header h1 {
    font-size: clamp(1.6rem, 5.2vw, 3rem);
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

/* socials bar */
.socials {
    /* margin-top: 0.25rem; */
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.socials a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,255,255,0.4);
    padding-bottom: 2px;
    font-size: 0.9rem;
    text-transform: lowercase;
}
.socials a:hover {
    border-bottom-color: #ffffff;
}

header p {
    font-size: 1.2rem;
    color: #cccccc;
    font-style: italic;
}

/* Main content */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0; /* remove extra space */
}

.animation-container {
    text-align: center;
    max-width: none;
    width: 100%;
}

/* remove title/description */

/* ASCII Animation */
.ascii-animation {
    background: #000000;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    font-family: 'Courier New', monospace;
    /* responsive ascii size with vmin so it scales in portrait & landscape */
    font-size: clamp(0.05rem, 1.9vmin, 0.6rem);
    line-height: 1;
    color: #ffffff;
    min-height: 84svh; /* take most of the page, tighter on mobile */
    display: flex;
    align-items: flex-start; /* push content toward header */
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: none;
    padding-top: 2vh; /* small top breathing room */
}

.ascii-viewport {
    display: inline-block;
    will-change: transform;
}

.ascii-animation pre {
    position: relative;
    z-index: 1;
    margin: 0;
    white-space: pre;
    font-weight: normal;
}

/* Controls */
/* removed controls */

/* Footer */
footer {
    text-align: center;
    background: #000000; /* match body */
    color: #888888;
    /* make this always visible at bottom */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: clamp(1.5rem, 6.2vw, 2rem);
    }
    
    header p {
        font-size: 1rem;
    }
    
    .animation-title h2 {
        font-size: 1.5rem;
    }
    
    .ascii-animation {
        font-size: clamp(0.05rem, 2.3vmin, 0.54rem);
        padding: 0;
        min-height: 82vh;
        align-items: flex-start;
        padding-top: 1.5vh;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .controls button {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .ascii-animation {
        font-size: clamp(0.05rem, 2.8vmin, 0.5rem);
        padding: 0;
        min-height: 80vh;
        align-items: flex-start;
        padding-top: 1.5vh;
    }
}

/* Portrait phone: rotate animation for better fill */
@media (max-width: 600px) and (orientation: portrait) {
    .ascii-animation.portrait-rotate {
        align-items: center;
        padding-top: 0;
        min-height: 86svh;
    }
}