:root {
    --stone-050: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --stone-950: #0c0a09;

    --blue: #3b82f6;
    --red: #ef4444;
    --green: #22c55e;
    --amber: #f59e0b;

    --bg: var(--stone-950);
    --bg-raised: var(--stone-900);
    --bg-surface: var(--stone-800);
    --border: var(--stone-800);
    --border-strong: var(--stone-500);
    --text: var(--stone-200);
    --text-muted: var(--stone-400);
    --text-faint: var(--stone-500);
    --text-bright: var(--stone-100);
    --accent: var(--blue);
    --accent-hover: #5193f8;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", "Roboto Mono", "Cascadia Code", monospace;
    --line-height: 1.6;
    --line-height-tight: 1.2;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: var(--line-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 30px 25px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
    line-height: var(--line-height-tight);
    color: var(--text-bright);
}

h1, h3 {
    text-align: center;
    margin-bottom: 15px;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    background-color: var(--accent);
    color: var(--bg);
    outline: 2px solid var(--accent);
}

.search-container {
    position: relative;
    width: 80%;
    max-width: 500px;
    margin-bottom: 20px;
}

#movieSearch {
    width: 100%;
    padding: 10px 15px;
    font-size: 1rem;
    box-sizing: border-box;
    border: 1px solid var(--border-strong);
    background-color: var(--bg);
    color: var(--text-bright);
    font-family: inherit;
}

#movieSearch:focus {
    outline: none;
    border-color: var(--accent);
}

#movieSearch::placeholder {
    color: var(--text-faint);
    opacity: 0.6;
}

.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-raised);
    border: 1px solid var(--border);
    border-top: none;
    z-index: 1000;
    max-height: 420px;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
    display: grid;
    gap: 10px;
}

.suggestion-item {
    padding: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: background-color 0.2s ease;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.suggestion-item:hover {
    background-color: var(--bg-surface);
}

.suggestion-poster {
    width: 55px;
    height: 82px;
    object-fit: cover;
}

.suggestion-poster-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--bg-surface);
}

.suggestion-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.suggestion-title {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text-bright);
}

.suggestion-year {
    font-size: 0.85rem;
    color: var(--text-muted);
}

#recently-watched {
    width: 80%;
    max-width: 1000px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.history-card {
    border: 1px solid var(--border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--bg-raised);
}

.history-card:hover {
    background-color: var(--bg-surface);
    outline: none;
}

.history-card-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

.history-card-poster-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.history-card-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-bright);
}

.history-card-year {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.suggestions-container:empty {
    display: none;
}
