* {
    box-sizing: border-box;
}

:root {
    --hd-yellow: #FFE710;
    --hd-black: #0B0C0D;
    --hd-blue: #41639C;
    /* OG HD Gray: 2A2C2E */
    --hd-gray: #45494E; 
}

body, html {
    margin: 0;
    padding: 0;
    background-color: var(--hd-black);
    color: var(--hd-yellow);
    font-family: 'Roboto', sans-serif;
    text-transform: uppercase;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* CRT Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

.terminal-container {
    width: 95vw;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1vh;
    border: 2px solid var(--hd-yellow);
    box-shadow: 0 0 15px rgba(255, 231, 16, 0.2);
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

header {
    text-align: center;
    border-bottom: 2px solid var(--hd-blue);
    padding-bottom: 0.7rem;
    margin-bottom: 1.4rem;
}

.header-logo {
    max-width: 40%;
    height: auto;
    max-height: 30px;
    margin-bottom: 1rem;
}

.title-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.title-icon {
    height: 2.5rem;
    width: auto;
}

h1 {
    margin: 0;
    font-size: 1.75rem;
    letter-spacing: 2px;
}

.subtitle {
    color: var(--hd-blue);
    font-size: 0.85rem;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

button {
    font-family: 'Roboto', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.primary-btn {
    background-color: var(--hd-yellow);
    color: var(--hd-black);
    border: none;
}

.primary-btn:hover {
    background-color: #fff;
    box-shadow: 0 0 10px var(--hd-yellow);
}

.secondary-btn {
    background-color: transparent;
    color: var(--hd-yellow);
    border: 2px solid var(--hd-yellow);
}

.secondary-btn:hover {
    background-color: var(--hd-yellow);
    color: var(--hd-black);
}

#loadout-display {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-evenly;
}

.loadout-row {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1vw;
    flex-wrap: nowrap;
}

/* Jules will apply these classes to the JS output */
.gear-card {
    background-color: var(--hd-gray);
    border: 1px solid var(--hd-blue);
    padding: 1rem;
    text-align: center;
    position: relative;
    height: 28vh;
    font-size: clamp(0.6rem, 1.5vh, 1rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#top-row .gear-card {
    width: 28vw;
    max-width: 250px;
}

#bottom-row .gear-card {
    width: 20vw;
    max-width: 200px;
}

.gear-card img {
    max-height: 50%;
    object-fit: contain;
}

.gear-card h3 {
    margin: 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gear-image-placeholder {
    width: 100%;
    height: 120px;
    background-color: var(--hd-black);
    border: 1px dashed var(--hd-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--hd-yellow);
}

.exclude-btn {
    background-color: #ff3333;
    color: white;
    border: none;
    padding: 0.5rem;
    width: 100%;
    margin-top: auto;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    html, body {
        overflow-y: auto;
        height: auto;
    }

    .terminal-container {
        height: auto;
        margin-bottom: 2rem;
    }

    .loadout-row {
        flex-wrap: wrap;
    }

    .gear-card, #top-row .gear-card, #bottom-row .gear-card {
        width: 90%;
        height: 250px;
        margin: 10px auto;
        max-width: none;
    }
}

@media (max-height: 850px) {
    html, body {
        overflow-y: auto;
        height: auto;
    }

    .terminal-container {
        height: auto;
        min-height: 95vh;
        margin-bottom: 2rem;
    }
}
