/* ARKE-AMIGA Intro - Retro Amiga A4 Style CSS */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: 'Courier New', monospace;
    color: #0f0;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-screen.hidden {
    display: none;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    max-width: 600px;
    width: 90%;
}

.loading-text {
    font-size: 4rem;
    font-weight: bold;
    color: #0f0;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.7);
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
    margin-bottom: 40px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(0, 255, 0, 0.7);
    }
    50% {
        opacity: 0.7;
        text-shadow: 0 0 30px rgba(0, 255, 0, 1);
    }
}

.loading-bar-container {
    width: 100%;
    height: 30px;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #0f0;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0f0, #0c0);
    transition: width 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
}

.loading-status {
    font-size: 1.2rem;
    color: #0f0;
    font-family: 'Courier New', monospace;
    margin-bottom: 30px;
    min-height: 30px;
}

.login-button {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #000;
    background: #0f0;
    border: 3px solid #0f0;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
    transition: all 0.3s ease;
}

.login-button:hover {
    background: #000;
    color: #0f0;
    box-shadow: 0 0 30px rgba(0, 255, 0, 1);
    transform: scale(1.05);
}

.login-button:active {
    transform: scale(0.98);
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

.login-overlay.hidden {
    display: none;
    pointer-events: none;
}

.login-text {
    font-size: 3.5rem;
    font-weight: bold;
    color: #0f0;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    text-transform: lowercase;
}

#loginAnimation {
    display: inline;
}

#loginCursor {
    display: inline-block;
    margin-left: 8px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Starfield Canvas */
.starfield-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
    z-index: 1;
}

/* Ball Canvas */
.ball-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
    z-index: 50;
    pointer-events: none;
}

/* Logo Container */
.logo-container {
    position: fixed;
    top: 35%;
    left: 50%;
    --logo-offset-x: 0px;
    --logo-offset-y: 0px;
    --logo-scale: 1;
    transform: translate3d(-50%, -50%, 0)
               translate3d(var(--logo-offset-x), var(--logo-offset-y), 0)
               scale(var(--logo-scale));
    z-index: 100;
    opacity: 0;
    max-width: 800px;
    max-height: 600px;
    transform-origin: center;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform, opacity;
    contain: layout paint style;
}

.logo-container.visible {
    opacity: 1;
    transition: none;
}

.logo-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: none;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Hamburger Menu (top-left) */
.hamburger-container {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hamburger-container.hamburger-hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hamburger-container.hamburger-visible {
    opacity: 1;
    visibility: visible;
}

.hamburger-button {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 36px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: opacity 0.3s ease;
}

.hamburger-button:hover {
    opacity: 0.7;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #00ff00;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-button.active .hamburger-line:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger-button.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-button.active .hamburger-line:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.hamburger-menu {
    position: absolute;
    top: 45px;
    left: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ff00;
    border-radius: 4px;
    padding: 10px 0;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

.hamburger-menu a {
    display: block;
    color: #00ff00;
    text-decoration: none;
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.hamburger-menu a:hover {
    background: rgba(0, 255, 0, 0.1);
    border-left-color: #00ff00;
    padding-left: 25px;
}

.hamburger-menu a.close-action {
    color: #ff0000;
    border-top: 1px solid #333;
    margin-top: 5px;
}

.hamburger-menu a.close-action:hover {
    background: rgba(255, 0, 0, 0.1);
    border-left-color: #ff0000;
}

/* Scroller Section */
.scroller-section {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 400px;    /* Increased from 150px to fit wave amplitude */
    background: transparent !important;
    z-index: 200;
    display: flex;
    align-items: flex-end;    /* Bottom-aligned instead of center */
    justify-content: flex-start;
    pointer-events: none;
}

.scroller-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: none !important;
    pointer-events: none;
}

.scroller-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent !important;
    z-index: 210;
    display: block;
    pointer-events: none;
}

/* Error Display */
.error-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.error-content {
    background: #0f0;
    color: #000;
    padding: 40px;
    border: 3px solid #0f0;
    text-align: center;
    font-family: 'Courier New', monospace;
    max-width: 600px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
}

.error-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.error-content p {
    font-size: 1.2rem;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Optional CRT Scanline Effect (disabled by default) */
/*
#app::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}
*/

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-text {
        font-size: 2.5rem;
    }

    .logo-container {
        max-width: 75vw;
        max-height: 50vh;
    }

    .scroller-section {
        height: 120px;    /* Optimized for mobile performance */
    }
}

@media (max-width: 480px) {
    .login-text {
        font-size: 1.8rem;
    }

    .logo-container {
        max-width: 85vw;
        max-height: 40vh;
    }

    .scroller-section {
        height: 120px;    /* Same for small phones */
    }
}

/* Debug Panel */
.debug-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 20, 40, 0.95);
    border: 2px solid #00ff00;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    z-index: 50001;
    display: none;
    max-width: 350px;
    max-height: 90vh;
    overflow-y: auto;
}

.debug-panel h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
    border-bottom: 1px solid #00ff00;
    padding-bottom: 5px;
}

.debug-section {
    margin-bottom: 15px;
}

.debug-section label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: bold;
}

.debug-section select {
    width: 100%;
    background: #001020;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border-radius: 4px;
}

.debug-section select option {
    background: #001020;
    color: #00ff00;
}

.debug-button {
    width: 100%;
    background: #00ff00;
    color: #000;
    border: none;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 10px;
}

.debug-button:hover {
    background: #00cc00;
}

.debug-button:active {
    background: #009900;
}

.debug-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #00ff00;
    font-size: 11px;
    opacity: 0.7;
}
