/* Retro Game Loading Screen Styles */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

.game-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #121212 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.game-loader.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.game-screen {
    width: 90%;
    max-width: 700px;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 20px;
    box-shadow: 
        0 0 60px rgba(255, 0, 0, 0.4),
        inset 0 0 100px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    border: 4px solid #333;
}

.screen-border {
    width: calc(100% - 30px);
    height: calc(100% - 30px);
    margin: 15px;
    border: 4px solid #ff0000;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    box-shadow: 
        inset 0 0 50px rgba(255, 0, 0, 0.1),
        inset 0 0 100px rgba(0, 0, 0, 0.8);
}

.screen-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(255, 0, 0, 0.05) 1px,
            rgba(255, 0, 0, 0.05) 2px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(255, 0, 0, 0.05) 1px,
            rgba(255, 0, 0, 0.05) 2px
        );
    pointer-events: none;
}

.screen-content {
    width: 100%;
    height: 100%;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    color: #ffffff;
    position: relative;
    gap: 30px;
}

/* Game-style UI Frame */
.screen-content::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid #ff0000;
    border-radius: 8px;
    background: 
        linear-gradient(45deg, transparent 49%, #ff0000 49%, #ff0000 51%, transparent 51%),
        linear-gradient(-45deg, transparent 49%, #ff0000 49%, #ff0000 51%, transparent 51%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px;
    opacity: 0.1;
    pointer-events: none;
}

.game-logo {
    text-align: center;
    z-index: 2;
    position: relative;
}

.game-logo h1 {
    font-size: clamp(18px, 5vw, 32px);
    text-align: center;
    margin: 0;
    color: #ff0000;
    text-shadow: 
        2px 2px 0px #cc0000,
        4px 4px 0px #990000,
        0 0 30px rgba(255, 0, 0, 0.6);
    animation: titleGlow 2s ease-in-out infinite alternate;
    letter-spacing: 2px;
}

.game-logo h2 {
    font-size: clamp(14px, 3.5vw, 24px);
    text-align: center;
    margin: 15px 0 5px 0;
    color: #ffffff;
    text-shadow: 
        1px 1px 0px #ff0000,
        2px 2px 0px #cc0000,
        0 0 20px rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

.subtitle {
    font-size: clamp(10px, 2.5vw, 14px);
    color: #cccccc;
    text-align: center;
    margin-top: 8px;
    text-shadow: 0 0 10px rgba(204, 204, 204, 0.5);
}

.game-stats {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ffff;
    padding: 15px;
    margin: 20px 0;
    width: 80%;
    max-width: 300px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: clamp(8px, 2vw, 12px);
}

.stat-row span:first-child {
    color: #ffffff;
}

.level-value {
    color: #ffff00 !important;
}

.exp-value {
    color: #ff6600 !important;
    animation: counterPulse 1.5s ease-in-out infinite;
}

.websites-value {
    color: #00ff88 !important;
}

.start-button-container {
    text-align: center;
    z-index: 2;
    position: relative;
}

.start-button {
    background: linear-gradient(45deg, #ff0000, #ff3333);
    border: 4px solid #ffffff;
    color: #ffffff;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(12px, 3vw, 18px);
    padding: 20px 40px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 
        0 6px 0 #cc0000,
        0 12px 25px rgba(255, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.start-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 9px 0 #cc0000,
        0 15px 30px rgba(255, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    background: linear-gradient(45deg, #ff3333, #ff6666);
}

.start-button:hover::before {
    left: 100%;
}

.start-button:active {
    transform: translateY(3px);
    box-shadow: 
        0 3px 0 #cc0000,
        0 6px 15px rgba(255, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.press-start {
    font-size: clamp(8px, 2vw, 12px);
    color: #888;
    margin-top: 15px;
    animation: blink 1.5s ease-in-out infinite;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loading-section {
    width: 100%;
    text-align: center;
    transition: opacity 0.5s ease;
    z-index: 2;
    position: relative;
}

.loading-section.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    font-size: clamp(14px, 3.5vw, 22px);
    color: #ff0000;
    margin-bottom: 25px;
    animation: loadingPulse 1s ease-in-out infinite;
    text-shadow: 
        1px 1px 0px #cc0000,
        0 0 20px rgba(255, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.loading-bar {
    width: 85%;
    height: 25px;
    background: #000;
    border: 3px solid #ff0000;
    margin: 0 auto 25px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(255, 0, 0, 0.3);
}

.loading-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 0, 0, 0.1) 2px,
            rgba(255, 0, 0, 0.1) 4px
        );
    pointer-events: none;
}

.loading-fill {
    height: 100%;
    background: linear-gradient(45deg, #ff0000, #ff3333, #ff0000);
    background-size: 20px 20px;
    animation: fillMove 0.8s linear infinite;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
}

.loading-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8));
    animation: shine 1s ease-in-out infinite;
}

.loading-messages {
    height: 50px;
    position: relative;
}

.loading-message {
    font-size: clamp(10px, 2.5vw, 14px);
    color: #cccccc;
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    text-shadow: 0 0 10px rgba(204, 204, 204, 0.3);
}

.loading-message.active {
    opacity: 1;
    transform: translateY(0);
    color: #ffffff;
}

/* Retro visual effects */
.scan-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 0, 0, 0.02) 2px,
        rgba(255, 0, 0, 0.02) 4px
    );
    pointer-events: none;
    animation: scanMove 0.1s linear infinite;
    z-index: 3;
}

.pixel-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Game-style corner decorations */
.screen-content::after {
    content: '◤ ◥\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A\A◣ ◢';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: #ff0000;
    font-size: 20px;
    white-space: pre;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
    font-family: monospace;
    line-height: 1;
}

/* Animations */
@keyframes titleGlow {
    0% { 
        text-shadow: 
            2px 2px 0px #cc0000,
            4px 4px 0px #990000,
            0 0 30px rgba(255, 0, 0, 0.6);
    }
    100% { 
        text-shadow: 
            2px 2px 0px #cc0000,
            4px 4px 0px #990000,
            0 0 50px rgba(255, 0, 0, 0.9);
    }
}

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

@keyframes loadingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes scanMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

@keyframes shine {
    0% { transform: translateX(-15px); }
    100% { transform: translateX(15px); }
}

@keyframes fillMove {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

/* Screen flicker effect when active */
.game-screen.screen-active {
    animation: screenFlicker 0.1s ease-in-out 3;
}

@keyframes screenFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-screen {
        width: 95%;
        aspect-ratio: 3/4;
    }
    
    .screen-content {
        padding: 30px 20px;
        gap: 25px;
    }
    
    .start-button {
        padding: 15px 30px;
    }
}

@media (max-width: 480px) {
    .game-screen {
        aspect-ratio: 2/3;
    }
    
    .screen-content {
        padding: 20px 15px;
        gap: 20px;
    }
    
    .start-button {
        padding: 12px 25px;
    }
    
    .screen-border {
        margin: 10px;
        width: calc(100% - 20px);
        height: calc(100% - 20px);
    }
} 