/* Amiga 500 Retro Style - DEXSOLO.AT */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
    --amiga-blue: #0055aa;
    --amiga-orange: #ff8800;
    --amiga-white: #ffffff;
    --amiga-black: #000000;
    --amiga-gray: #888888;
    --amiga-dark-blue: #000033;
    --workbench-blue: #0055aa;
    --workbench-orange: #ff8800;
    --guru-red: #aa0000;
}

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

body {
    background: var(--amiga-dark-blue);
    min-height: 100vh;
    overflow: hidden;
    font-family: 'VT323', monospace;
}

/* CRT Monitor Effect */
.crt {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.crt::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.3) 90%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    z-index: 100;
}

.crt::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 51%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 101;
    animation: flicker 0.15s infinite;
}

/* Scanlines */
.scanlines {
    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;
}

/* Workbench Top Bar */
.workbench-bar {
    background: linear-gradient(180deg, var(--workbench-blue) 0%, #003377 100%);
    height: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    border-bottom: 2px solid var(--amiga-white);
    box-shadow: inset 0 -2px 0 var(--amiga-orange);
}

.wb-title {
    color: var(--amiga-white);
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    text-shadow: 2px 2px var(--amiga-black);
}

.wb-buttons {
    display: flex;
    gap: 5px;
}

.wb-btn {
    width: 16px;
    height: 16px;
    background: var(--amiga-orange);
    border: 2px outset var(--amiga-white);
    cursor: pointer;
}

.wb-btn:hover {
    background: #ffaa33;
}

/* Main Content */
.main-content {
    background: repeating-linear-gradient(
        45deg,
        var(--amiga-blue),
        var(--amiga-blue) 2px,
        var(--workbench-blue) 2px,
        var(--workbench-blue) 4px
    );
    min-height: calc(100vh - 24px);
    padding: 20px;
    position: relative;
}

/* Guru Meditation Error */
.guru-meditation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--amiga-black);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: pointer;
}

.guru-meditation.active {
    display: flex;
    animation: guruFlash 1s infinite;
}

.guru-inner {
    border: 4px solid var(--guru-red);
    padding: 20px 40px;
    animation: guruBorder 1s infinite;
}

.guru-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.guru-title {
    color: var(--guru-red);
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    text-align: center;
}

.guru-code {
    color: var(--guru-red);
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
}

@keyframes guruFlash {
    0%, 49% { background: var(--amiga-black); }
    50%, 100% { background: #110000; }
}

@keyframes guruBorder {
    0%, 49% { border-color: var(--guru-red); }
    50%, 100% { border-color: var(--amiga-black); }
}

/* Message Box */
.message-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--amiga-gray);
    border: 4px outset var(--amiga-white);
    min-width: 500px;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
    animation: windowAppear 0.5s ease-out;
}

@keyframes windowAppear {
    from {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.message-title-bar {
    background: linear-gradient(180deg, var(--workbench-blue) 0%, #003377 100%);
    color: var(--amiga-white);
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    border-bottom: 2px solid var(--amiga-orange);
    cursor: move;
}

.close-btn {
    width: 20px;
    height: 20px;
    background: var(--amiga-orange);
    color: var(--amiga-black);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    border: 2px outset var(--amiga-white);
}

.close-btn:hover {
    background: #ff6600;
}

.close-btn:active {
    border-style: inset;
}

.message-content {
    padding: 30px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: linear-gradient(135deg, #999 0%, #777 100%);
}

.amiga-icon {
    font-size: 64px;
    animation: diskSpin 2s infinite linear;
}

@keyframes diskSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.message-text h1 {
    color: var(--amiga-black);
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    margin-bottom: 15px;
    text-shadow: 2px 2px var(--amiga-orange);
    animation: textGlow 2s infinite;
}

@keyframes textGlow {
    0%, 100% { text-shadow: 2px 2px var(--amiga-orange); }
    50% { text-shadow: 2px 2px var(--amiga-orange), 0 0 20px var(--amiga-orange); }
}

.message-text p {
    color: var(--amiga-black);
    font-size: 18px;
    line-height: 1.6;
    display: inline;
}

.blink-cursor {
    display: inline;
    color: var(--amiga-black);
    animation: blink 0.7s infinite;
}

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

.message-buttons {
    padding: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    background: var(--amiga-gray);
    border-top: 2px inset var(--amiga-white);
}

.amiga-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #aaa 0%, #888 100%);
    border: 3px outset var(--amiga-white);
    color: var(--amiga-black);
    cursor: pointer;
    transition: all 0.1s;
}

.amiga-btn:hover {
    background: linear-gradient(180deg, #bbb 0%, #999 100%);
}

.amiga-btn:active {
    border-style: inset;
    transform: translate(2px, 2px);
}

/* Desktop Icons */
.desktop-icons {
    position: fixed;
    right: 20px;
    top: 50px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 5px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.icon:hover {
    border-color: var(--amiga-orange);
    background: rgba(255, 136, 0, 0.2);
}

.icon-img {
    font-size: 48px;
    animation: iconBounce 0.5s ease-in-out;
}

.icon:hover .icon-img {
    animation: iconBounce 0.3s ease-in-out infinite;
}

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

.icon span {
    color: var(--amiga-white);
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    margin-top: 5px;
    text-shadow: 1px 1px var(--amiga-black);
}

/* Game Container */
.game-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--amiga-gray);
    border: 4px outset var(--amiga-white);
    display: none;
    z-index: 500;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
}

.game-container.active {
    display: block;
    animation: windowAppear 0.3s ease-out;
}

.game-title-bar {
    background: linear-gradient(180deg, var(--workbench-blue) 0%, #003377 100%);
    color: var(--amiga-white);
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    border-bottom: 2px solid var(--amiga-orange);
}

#gameCanvas {
    background: var(--amiga-dark-blue);
    display: block;
    border: 4px inset var(--amiga-black);
    image-rendering: pixelated;
}

.game-instructions {
    padding: 10px;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    color: var(--amiga-black);
    background: var(--amiga-gray);
}

/* About Window */
.about-window {
    position: fixed;
    top: 100px;
    left: 100px;
    background: var(--amiga-gray);
    border: 4px outset var(--amiga-white);
    display: none;
    z-index: 400;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
    min-width: 400px;
}

.about-window.active {
    display: block;
    animation: windowAppear 0.3s ease-out;
}

.about-content {
    padding: 20px;
    background: linear-gradient(135deg, #999 0%, #777 100%);
    text-align: center;
}

.ascii-art {
    font-family: 'VT323', monospace;
    font-size: 12px;
    color: var(--amiga-orange);
    text-shadow: 1px 1px var(--amiga-black);
    margin-bottom: 20px;
    animation: asciiGlow 2s infinite;
}

@keyframes asciiGlow {
    0%, 100% { color: var(--amiga-orange); }
    50% { color: #ffcc00; }
}

.about-content p {
    color: var(--amiga-black);
    font-family: 'VT323', monospace;
    font-size: 18px;
    margin: 10px 0;
}

.about-content .small {
    font-size: 12px;
    color: #555;
    margin-top: 20px;
}

/* Boot Screen */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--amiga-black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.boot-screen.hidden {
    display: none;
}

.boot-content {
    text-align: center;
}

.boot-ascii {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: var(--amiga-orange);
    text-shadow: 0 0 10px var(--amiga-orange);
    animation: bootGlow 1s infinite;
}

@keyframes bootGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.boot-text {
    margin-top: 30px;
    text-align: left;
}

.boot-line {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #00ff00;
    opacity: 0;
    animation: bootLine 0.5s forwards;
}

.boot-line:nth-child(1) { animation-delay: 0.5s; }
.boot-line:nth-child(2) { animation-delay: 1s; }
.boot-line:nth-child(3) { animation-delay: 1.5s; }
.boot-line:nth-child(4) { animation-delay: 2s; }
.boot-line:nth-child(5) { animation-delay: 2.5s; }
.boot-line:nth-child(6) { animation-delay: 3s; }

@keyframes bootLine {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.loading-bar {
    width: 300px;
    height: 20px;
    border: 2px solid var(--amiga-orange);
    margin: 30px auto;
    background: var(--amiga-black);
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--amiga-orange), #ffcc00, var(--amiga-orange));
    animation: loading 3.5s forwards;
    background-size: 200% 100%;
    animation: loading 3.5s forwards, shimmer 1s infinite linear;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Flicker Animation */
@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.95; }
    10% { opacity: 0.97; }
    15% { opacity: 0.94; }
    20% { opacity: 0.98; }
    50% { opacity: 0.96; }
    80% { opacity: 0.98; }
    90% { opacity: 0.94; }
    100% { opacity: 0.97; }
}

/* Pixel Perfect Rendering */
* {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Kotakis Game Specific Styles */
.katakis-container {
    z-index: 550;
}

.katakis-title {
    background: linear-gradient(180deg, #660066 0%, #330033 100%);
    border-bottom: 2px solid #ff00ff;
}

#kotakisCanvas {
    background: linear-gradient(180deg, #000022 0%, #000011 50%, #000033 100%);
    display: block;
    border: 4px inset var(--amiga-black);
    image-rendering: pixelated;
}

.katakis-instructions {
    background: linear-gradient(180deg, #440044 0%, #220022 100%);
    color: #ff88ff;
    border-top: 2px solid #ff00ff;
}

/* Highscore Window */
.highscore-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--amiga-gray);
    border: 4px outset var(--amiga-white);
    display: none;
    z-index: 600;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
    min-width: 400px;
}

.highscore-window.active {
    display: block;
    animation: windowAppear 0.3s ease-out;
}

.highscore-content {
    padding: 20px;
    background: linear-gradient(135deg, #222 0%, #111 100%);
    max-height: 400px;
    overflow-y: auto;
}

.highscore-list {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
}

.highscore-entry {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid #333;
    color: #00ff00;
}

.highscore-entry:nth-child(1) { color: #ffd700; }
.highscore-entry:nth-child(2) { color: #c0c0c0; }
.highscore-entry:nth-child(3) { color: #cd7f32; }

.highscore-entry .rank {
    color: #ff8800;
    min-width: 30px;
}

.highscore-entry .name {
    flex: 1;
    text-align: left;
    margin-left: 10px;
}

.highscore-entry .score {
    text-align: right;
    min-width: 80px;
}

.highscore-entry .level {
    text-align: right;
    min-width: 40px;
    color: #888;
    margin-left: 10px;
}

.no-scores {
    color: #666;
    text-align: center;
    padding: 20px;
}

/* Responsive */
@media (max-width: 600px) {
    .message-box {
        min-width: 90%;
        max-width: 95%;
    }

    .message-text h1 {
        font-size: 12px;
    }

    .desktop-icons {
        right: 5px;
    }

    .icon-img {
        font-size: 32px;
    }

    .game-container {
        width: 95%;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
    }
}
