/**
 * Commodore 64 Standalone Portal Styles
 */

:root {
    --c64-bg-dark: #3b3185;
    --c64-border-blue: #7b71d4;
    --c64-screen-blue: #40318d;
    --c64-cyan: #a4e5ef;
    --c64-white: #ffffff;
    --c64-yellow: #f5f07a;
    --c64-green: #68c078;
    --c64-red: #9e4b44;
    --c64-orange: #a86236;
    --c64-purple: #864696;
    --c64-dark-grey: #4c4c4c;
    --c64-black: #0c0817;
    --c64-font-pixel: 'VT323', monospace;
    --c64-font-ui: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--c64-black);
    color: var(--c64-cyan);
    font-family: var(--c64-font-ui);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 38, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 999;
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    opacity: 0.85;
}

.portal-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.c64-monitor {
    background: var(--c64-border-blue);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(0, 0, 0, 0.3);
    border: 4px solid #5a4fb8;
}

.c64-screen {
    background: var(--c64-screen-blue);
    border: 3px solid #2a1f68;
    border-radius: 10px;
    padding: 28px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.65);
    color: var(--c64-cyan);
    font-family: var(--c64-font-pixel);
    font-size: 1.45rem;
    line-height: 1.4;
}

.c64-basic-banner {
    text-align: center;
    border-bottom: 2px dashed rgba(164, 229, 239, 0.35);
    padding-bottom: 20px;
    margin-bottom: 26px;
    color: var(--c64-cyan);
    text-shadow: 0 0 8px rgba(164, 229, 239, 0.6);
}

.c64-basic-banner h1 {
    font-family: var(--c64-font-pixel);
    font-size: 2.3rem;
    margin: 0 0 6px;
    color: var(--c64-white);
}

.c64-cursor {
    display: inline-block;
    width: 14px;
    height: 1.2em;
    background: var(--c64-cyan);
    vertical-align: middle;
    animation: c64-blink 0.9s infinite;
}

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

.c64-stats-bar {
    display: flex;
    justify-content: space-around;
    background: #251a5c;
    border: 1px solid var(--c64-cyan);
    border-radius: 6px;
    padding: 12px 20px;
    margin-bottom: 24px;
    font-size: 1.2rem;
}

.c64-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.c64-stat-val {
    color: var(--c64-yellow);
    font-weight: bold;
}

.c64-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.c64-search-box {
    flex: 1;
    min-width: 260px;
}

.c64-search-input {
    width: 100%;
    background: #251a5c;
    border: 2px solid var(--c64-cyan);
    border-radius: 6px;
    padding: 10px 16px;
    color: var(--c64-white);
    font-family: var(--c64-font-pixel);
    font-size: 1.35rem;
    box-sizing: border-box;
    outline: none;
}

.c64-search-input:focus {
    border-color: var(--c64-yellow);
    box-shadow: 0 0 12px rgba(245, 240, 122, 0.4);
}

.c64-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.c64-pill {
    background: #251a5c;
    color: var(--c64-cyan);
    border: 1px solid var(--c64-cyan);
    border-radius: 4px;
    padding: 6px 14px;
    font-family: var(--c64-font-pixel);
    font-size: 1.15rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.c64-pill:hover,
.c64-pill.active {
    background: var(--c64-cyan);
    color: var(--c64-screen-blue);
    font-weight: bold;
}

.c64-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.c64-card {
    background: #2c2269;
    border: 2px solid #5a4eb0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.c64-card:hover {
    transform: translateY(-4px);
    border-color: var(--c64-cyan);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(164, 229, 239, 0.35);
}

.c64-card-thumb {
    width: 100%;
    height: 175px;
    background: #171038;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.c64-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.c64-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.c64-card-title {
    font-family: var(--c64-font-pixel);
    font-size: 1.45rem;
    margin: 0 0 8px;
    color: var(--c64-white);
}

.c64-card-title a {
    color: inherit;
    text-decoration: none;
}

.c64-card-title a:hover {
    color: var(--c64-yellow);
}

.c64-meta-row {
    font-size: 1.05rem;
    color: #9eb6db;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.c64-btn {
    background: #1e1548;
    color: var(--c64-cyan);
    border: 2px solid var(--c64-cyan);
    padding: 6px 14px;
    border-radius: 4px;
    font-family: var(--c64-font-pixel);
    font-size: 1.15rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.c64-btn:hover {
    background: var(--c64-cyan);
    color: var(--c64-screen-blue);
}

.c64-btn-primary {
    background: #8b3a32;
    border-color: #f57469;
    color: var(--c64-white);
}

.c64-btn-primary:hover {
    background: #f57469;
    color: #171038;
}

/* Single Game Detail View */
.c64-single-detail {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 32px;
    margin-top: 20px;
}

@media (max-width: 860px) {
    .c64-single-detail {
        grid-template-columns: 1fr;
    }
}

.c64-single-screen {
    border: 4px solid #231854;
    border-radius: 8px;
    overflow: hidden;
    background: #110c28;
}

.c64-single-screen img {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: pixelated;
}

.c64-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--c64-font-pixel);
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.c64-spec-table th,
.c64-spec-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(164, 229, 239, 0.2);
    text-align: left;
}

.c64-spec-table th {
    color: var(--c64-yellow);
    width: 35%;
}

.c64-spec-table td {
    color: var(--c64-white);
}

.c64-drive-box {
    background: #251a5c;
    border: 2px solid var(--c64-green);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.c64-drive-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.c64-drive-led {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00ff44;
    box-shadow: 0 0 10px #00ff44;
}

.c64-nav-links {
    margin-bottom: 18px;
    display: flex;
    gap: 12px;
}
