:root {
    --steam-dark: #171a21;
    --steam-blue: #1b2838;
    --steam-cyan: #66c0f4;
    --steam-text: #c7d5e0;
    --steam-label: #8f98a0;
    --glass-bg: rgba(23, 26, 33, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-gradient: linear-gradient(135deg, #66c0f4 0%, #4e82c2 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--steam-dark);
    color: var(--steam-text);
    min-height: 100vh;
    overflow-x: hidden;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    transition: background-image 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}


#bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, rgba(27, 40, 56, 0.4) 0%, var(--steam-dark) 100%);
    z-index: -1;
    backdrop-filter: blur(20px);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: white;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(102, 192, 244, 0.4);
    margin-bottom: 1rem;
}

.search-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    background: var(--glass-bg);
    padding: 10px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.search-box:focus-within {
    transform: scale(1.02);
    border-color: var(--steam-cyan);
}

input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    padding: 10px 20px;
    font-size: 1.1rem;
    flex: 1;
}

button.fetch-btn {
    background: linear-gradient(90deg, #47bfff 0%, #1a44c2 100%);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}

button.fetch-btn:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 15px rgba(71, 191, 255, 0.6);
}

#game-info {
    display: none;
    animation: fadeIn 1s ease;
    margin-top: 2rem;
}

.hero-card {
    display: flex;
    gap: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    margin-bottom: 30px;
}

.hero-card img {
    width: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.hero-details h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: white;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.movie-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.movie-card.selected {
    border-color: var(--steam-cyan);
    box-shadow: 0 0 20px rgba(102, 192, 244, 0.4);
    background: rgba(102, 192, 244, 0.1);
}

.movie-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--steam-cyan);
    color: var(--steam-dark);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.movie-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.movie-content {
    padding: 20px;
}

.movie-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: white;
}

.dl-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--steam-text);
    border: 1px solid var(--glass-border);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    text-align: center;
    transition: 0.2s;
    cursor: pointer;
}

.dl-btn:hover {
    background: var(--steam-cyan);
    color: var(--steam-dark);
}

.dl-btn.primary {
    background: #5c7e10; /* Steam Green */
    color: white;
    border: none;
}

.dl-btn.primary:hover {
    background: #a4d007;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: var(--steam-cyan);
    border-radius: 50%;
    display: none;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin: 20px auto;
}

.section-header {
    border-left: 4px solid var(--steam-cyan);
    padding-left: 15px;
    margin-bottom: 20px;
}

.section-header h2 {
    color: white;
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.copy-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #5c7e10;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: none;
    animation: slideUp 0.3s ease-out;
    z-index: 1000;
}

@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Home View & Features */
#home-view {
    padding: 2rem 0;
    animation: fadeIn 1s ease-out;
}

.hero-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.hero-text h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--steam-label);
    line-height: 1.6;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(102, 192, 244, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.feature-card p {
    color: var(--steam-label);
    line-height: 1.5;
    font-size: 0.95rem;
}

.quick-start {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 16px;
    border: 1px dashed var(--glass-border);
}

.quick-start code {
    background: rgba(102, 192, 244, 0.1);
    color: var(--steam-cyan);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* Responsiveness */
@media (max-width: 768px) {
    .hero-text h2 { font-size: 2.2rem; }
    .hero-card { flex-direction: column; align-items: center; text-align: center; }
    .hero-card img { width: 100%; max-width: 300px; }
    .search-box { flex-direction: column; border-radius: 20px; }
    button.fetch-btn { width: 100%; }
}
