:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --primary-color: #e50914; /* Netflix Red vibe */
    --like-color: #2ecc71;
    --skip-color: #e74c3c;
    --text-color: #ffffff;
    --text-muted: #aaaaaa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px;
}

.app-container {
    width: 100%;
    max-width: 450px;
    height: 850px;
    background-color: #000;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid #222;
}

header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #111;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.counter {
    background: #222;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Screen visibility toggles */
.screen {
    display: none;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.screen.active {
    display: flex;
}

/* Screen 1: Card UI */
.card-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.swipe-card {
    width: 100%;
    height: 100%;
    max-height: 520px;
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.card-img {
    width: 100%;
    height: 65%;
    object-fit: cover;
}

.card-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(to bottom, var(--card-bg) 0%, #151515 100%);
}

.card-info h2 {
    font-size: 1.4rem;
}

.genres {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.genre-tag {
    background: #333;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--text-muted);
}

.summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
}

.btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
    transition: transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn:active { transform: scale(0.9); }
.btn-skip { background-color: var(--skip-color); box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3); }
.btn-like { background-color: var(--like-color); box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3); }

/* Swipe Animations via JS classes */
.swipe-left { transform: translateX(-150%) rotate(-15deg); opacity: 0; }
.swipe-right { transform: translateX(150%) rotate(15deg); opacity: 0; }

/* Screen 2: Picks */
.reason-text {
    font-size: 0.9rem;
    color: #f1c40f;
    margin-bottom: 15px;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.pick-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #222;
}

.pick-img {
    height: 150px;
    width: 100%;
    object-fit: cover;
}

.pick-meta {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.pick-meta h4 {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating {
    font-size: 0.8rem;
    color: #f1c40f;
}

.btn-view-details {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: auto;
    font-weight: bold;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #444;
    color: white;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* Screen 3: Details */
.btn-back {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 15px;
    align-self: flex-start;
}

.details-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.details-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    background: #111;
    padding: 10px;
    border-radius: 6px;
}

.btn-save {
    background: #27ae60;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.btn-save.saved {
    background: #7f8c8d;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-muted);
}