/* Sugaski.dev Game Selection - Retro Gaming Interface */
:root {
    /* Retro gaming colors - updated to gray tones */
    --primary-bg: #121212;
    --secondary-bg: #1a1a1a;
    --crt-text: #aaaaaa;
    --crt-highlight: #dddddd;
    --crt-glow: rgba(170, 170, 170, 0.5);
    --retro-border: #444444;
    --text-color: #dddddd;
    --highlight: #cccccc;
    
    /* Game card specific colors */
    --empire-color: #cccccc;
    --conquest-color: #e6cc7a; /* slightly toned down gold */
    
    /* Font families */
    --retro-font: 'VT323', 'Courier New', monospace;
    --game-empire-font: 'Courier New', Courier, monospace;
}

@font-face {
    font-family: 'PirataFont';
    src: url('sea_conquest/assets/fonts/Pirata_One/PirataOne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

@keyframes scanline {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100vh);
    }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
    98% { opacity: 0.9; }
    99% { opacity: 1; }
}

@keyframes textShadowPulse {
    0% {
        text-shadow: 0 0 5px var(--highlight), 0 0 10px var(--highlight);
    }
    50% {
        text-shadow: 0 0 10px var(--highlight), 0 0 20px var(--highlight);
    }
    100% {
        text-shadow: 0 0 5px var(--highlight), 0 0 10px var(--highlight);
    }
}

body {
    background-color: var(--primary-bg);
    color: var(--text-color);
    font-family: var(--retro-font);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* CRT Effects */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.5;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 90%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1000;
    pointer-events: none;
    opacity: 0.4;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1001;
    opacity: 0.3;
    pointer-events: none;
    animation: scanline 8s linear infinite;
}

#selection-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: flicker 10s infinite;
}

.title {
    font-size: 4.5rem;
    color: var(--crt-highlight);
    margin-bottom: 0.5rem;
    font-family: var(--retro-font);
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: textShadowPulse 2s ease-in-out infinite;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 4rem;
    font-family: var(--retro-font);
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    border: 1px solid var(--highlight);
    padding: 0.5rem 1.5rem;
    background-color: var(--secondary-bg);
    box-shadow: 0 0 10px var(--crt-glow);
}

.games-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    margin-bottom: 4rem;
}

.game-card {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    background-color: var(--secondary-bg);
    border: 2px solid var(--retro-border);
    padding-bottom: 1rem;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 10px rgba(170, 170, 170, 0.2);
    pointer-events: none;
    z-index: 1;
}

.game-card.selected, .game-card:hover {
    border-color: var(--highlight);
    box-shadow: 0 0 20px var(--crt-glow);
    transform: scale(1.02);
}

.game-banner {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#empire-card .game-banner {
    background-color: #000000;
}

#sea-conquest-card .game-banner {
    background-color: #301111;
}

.game-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0.2) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
}

.game-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    z-index: 5;
    border: 2px solid var(--retro-border);
    position: relative;
}

.game-card:hover .game-icon {
    box-shadow: 0 0 15px var(--crt-glow);
    border-color: var(--highlight);
}

#empire-card .game-icon {
    color: var(--empire-color);
    font-size: 5rem;
    font-weight: bold;
    text-shadow: 0 0 5px var(--empire-color);
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: lowercase;
    padding-bottom: 0.15em; /* Adjust to visually center the letter */
}

#empire-card .game-banner .game-icon::before {
    display: none;
}

#empire-card .game-banner .game-icon {
    color: var(--empire-color);
    text-shadow: 0 0 5px var(--empire-color);
}

#sea-conquest-card .game-icon img {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 0 5px rgba(230, 204, 122, 0.7));
}

.game-content {
    padding: 1.5rem 1rem 0.5rem;
    width: 100%;
    text-align: center;
    position: relative;
}

.game-title {
    margin-bottom: 1rem;
    font-size: 2rem;
    position: relative;
    display: inline-block;
}

#empire-card .game-title {
    color: var(--empire-color);
    font-family: var(--game-empire-font);
    text-shadow: 0 0 5px rgba(204, 204, 204, 0.5);
}

#sea-conquest-card .game-title {
    color: var(--conquest-color);
    font-family: 'PirataFont', cursive;
    text-shadow: 0 0 5px rgba(230, 204, 122, 0.5);
}

.game-description {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    min-height: 50px;
    padding: 0 15px;
    opacity: 0.8;
}

#empire-card .game-description {
    color: rgba(255, 255, 255, 0.7);
}

#sea-conquest-card .game-description {
    color: rgba(255, 255, 255, 0.7);
}

.play-button {
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    background-color: transparent;
    color: var(--highlight);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--highlight);
    position: relative;
    overflow: hidden;
    font-family: var(--retro-font);
}

.play-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(170, 170, 170, 0.2),
        transparent
    );
    transition: all 0.6s ease;
}

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

.play-button:hover {
    background-color: rgba(170, 170, 170, 0.1);
    box-shadow: 0 0 10px var(--crt-glow);
}

#empire-card .play-button {
    border-color: var(--empire-color);
    color: var(--empire-color);
}

#empire-card .play-button::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(204, 204, 204, 0.2),
        transparent
    );
}

#empire-card .play-button:hover {
    background-color: rgba(204, 204, 204, 0.1);
    box-shadow: 0 0 10px rgba(204, 204, 204, 0.5);
}

#sea-conquest-card .play-button {
    border-color: var(--conquest-color);
    color: var(--conquest-color);
    font-family: 'PirataFont', cursive;
}

#sea-conquest-card .play-button::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(230, 204, 122, 0.2),
        transparent
    );
}

#sea-conquest-card .play-button:hover {
    background-color: rgba(230, 204, 122, 0.1);
    box-shadow: 0 0 10px rgba(230, 204, 122, 0.5);
}

.footer {
    margin-top: auto;
    padding-top: 2rem;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--retro-font);
    position: relative;
}

.footer::before {
    content: "[ SUGASKI.DEV TERMINAL - SYSTEM READY ]";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--crt-text);
    background-color: var(--primary-bg);
    padding: 0 15px;
    letter-spacing: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .games-container {
        flex-direction: column;
        align-items: center;
        gap: 4rem;
    }
    
    .game-card {
        width: 100%;
        max-width: 350px;
    }
    
    .title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
        margin-bottom: 3rem;
    }
    
    #selection-container {
        padding: 1.5rem;
    }
    
    .play-button {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
}
