/* SEDLACZEK-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;
}

.ball-canvas.behind-logo {
    z-index: 80;
}

.ball-canvas.in-front-logo {
    z-index: 150;
}

/* 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;
    overflow: visible;
    contain: layout style;
    pointer-events: auto;
}

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

.logo-container.spotlight-hidden {
    display: none;
    opacity: 0 !important;
    transition: opacity 900ms ease;
}

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

.logo-contact-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    cursor: pointer;
}

/* Project Spotlight */
.project-spotlight {
    position: fixed;
    top: 35%;
    left: 50%;
    z-index: 12000;
    --spotlight-offset-x: 0px;
    --spotlight-offset-y: 0px;
    --spotlight-scale: 1;
    width: min(760px, 76vw);
    max-height: 58vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(-50%, -50%, 0)
               translate3d(var(--spotlight-offset-x), var(--spotlight-offset-y), 0)
               scale(var(--spotlight-scale));
    transition: opacity 1200ms ease, transform 1200ms ease, visibility 1200ms ease;
}

.project-spotlight.active {
    opacity: 1;
    visibility: visible;
    display: flex;
    --spotlight-scale: 1;
}

.project-spotlight-image {
    display: block;
    width: 100%;
    max-height: 42vh;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 0 18px rgba(0, 255, 0, 0.28));
}

.project-spotlight-image-link {
    display: block;
    width: 100%;
    pointer-events: auto;
    cursor: pointer;
}

.project-spotlight-text {
    display: block;
    width: 100vw;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: clamp(12px, 1.25vw, 20px);
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 0 14px rgba(0, 255, 0, 0.8);
    pointer-events: auto;
    animation: projectTextFloat 4s ease-in-out infinite,
               projectTextFade 7s ease-in-out infinite;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Crect x='3' y='7' width='26' height='18' rx='2' fill='%23000000' stroke='%2300ff00' stroke-width='2'/%3E%3Cpath d='M5 9l11 9L27 9M5 23l8-7M27 23l-8-7' fill='none' stroke='%2300ff00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 4 4, pointer;
}

@keyframes projectTextFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes projectTextFade {
    0%, 100% {
        opacity: 0.28;
    }
    45%, 60% {
        opacity: 1;
    }
}

/* Reset wipe transition */
.reset-curtain {
    position: fixed;
    inset: 0;
    z-index: 22000;
    pointer-events: none;
    overflow: hidden;
    visibility: hidden;
}

.reset-curtain.active {
    visibility: visible;
}

.reset-curtain-panel {
    position: absolute;
    top: 0;
    width: 0;
    height: 100%;
    background: #000;
    transition: width 1400ms ease-in-out;
}

.reset-curtain-left {
    left: 0;
}

.reset-curtain-right {
    right: 0;
}

.reset-curtain.active .reset-curtain-panel {
    width: 50vw;
}

/* 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;
}

.hamburger-menu a.reset-action {
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2px;
    border-top: 1px solid #00ff00;
    margin-top: 7px;
    text-shadow: 0 0 12px rgba(0, 255, 0, 0.9);
}

.hamburger-menu a.reset-action:hover {
    background: rgba(0, 255, 0, 0.2);
    border-left-color: #ffffff;
}

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

.setup-container.setup-hidden {
    opacity: 0;
    visibility: hidden;
}

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

.setup-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    color: #00ff00;
    cursor: pointer;
    padding: 0;
    text-shadow: 0 0 12px rgba(0, 255, 0, 0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.setup-button:hover {
    opacity: 0.75;
}

.setup-button.active {
    transform: rotate(90deg);
}

.setup-gear {
    font-size: 34px;
    line-height: 1;
    font-family: 'Courier New', monospace;
}

.setup-menu {
    position: absolute;
    top: 47px;
    right: 0;
    min-width: 260px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ff00;
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

.setup-menu label {
    display: block;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    margin: 0 0 6px;
}

.setup-menu select {
    width: 100%;
    min-height: 34px;
    margin: 0 0 12px;
    background: #001400;
    color: #00ff00;
    border: 1px solid #00ff00;
    border-radius: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 6px;
}

.setup-menu select:last-child {
    margin-bottom: 0;
}

/* 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;
    }

    .project-spotlight {
        width: 84vw;
        gap: 20px;
    }

    .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;
    }

    .project-spotlight {
        width: 88vw;
        gap: 16px;
    }

    .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;
}
