:root {
    --bg-color: #0a0a0a;
    --acc-color: #00ff41;
    --panel-bg: rgba(255, 255, 255, 0.05);
    --text-color: #e0e0e0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

h1 {
    color: var(--acc-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 40px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

#emulator-container {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#no-rom-msg {
    color: #444;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

canvas {
    image-rendering: pixelated;
    border: 2px solid #333;
    border-radius: 4px;
    background-color: #000;
    box-shadow: inset 0 0 50px rgba(0, 255, 65, 0.1), 0 0 15px rgba(0, 0, 0, 0.5);
}

#rom-gallery-header {
    width: 90%;
    max-width: 1000px;
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

#rom-gallery-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: var(--text-color);
}

.upload-btn {
    background: var(--acc-color);
    color: #000;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.upload-btn:hover {
    background: #00cc33;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

#rom-gallery {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 90%;
    max-width: 1000px;
}

.rom-card {
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.rom-card:hover {
    border-color: var(--acc-color);
    transform: translateY(-5px);
    background: rgba(0, 255, 65, 0.05);
}

.rom-card.active {
    border-color: var(--acc-color);
    background: rgba(0, 255, 65, 0.08);
}

.rom-card h3 {
    margin: 0 0 10px 0;
    color: #fff;
}

.rom-card p {
    font-size: 0.9em;
    color: #888;
    margin: 0;
}

.controls-help {
    margin-top: 20px;
    font-size: 0.8em;
    color: #666;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
}

.layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 48px;
    background: rgba(0, 255, 65, 0.04);
    border-right: 1px solid rgba(0, 255, 65, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    gap: 8px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.emu-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: var(--acc-color);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.emu-year {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: #444;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 2px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 16px;
}

.landing-desc {
    color: #555;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin: 0;
}

.emulator-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 320px;
}

.emulator-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px 24px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.emulator-card:hover {
    border-color: var(--acc-color);
    background: rgba(0, 255, 65, 0.05);
    transform: translateY(-2px);
}

.emulator-name {
    color: #fff;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.emulator-year {
    color: #444;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
}

.emulator-enter {
    color: var(--acc-color);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
}