/* RSS Tinder — Styles */

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

:root {
    --bg: #0f0f0f;
    --surface: #1a1a1a;
    --surface2: #252525;
    --text: #e8e8e8;
    --text-dim: #888;
    --accent: #5c7cfa;
    --success: #51cf66;
    --danger: #ff6b6b;
    --warning: #ffd43b;
    --radius: 16px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

#app {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
header {
    padding: 16px 0 12px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
    border-bottom: 1px solid var(--surface2);
}

header h1 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

nav {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.nav-btn {
    background: var(--surface);
    border: 1px solid var(--surface2);
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Views */
.view {
    display: none;
    padding: 16px 0;
}

.view.active {
    display: block;
}

.placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
    font-size: 18px;
}

/* Card */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    transition: transform 0.3s ease, opacity 0.3s ease;
    touch-action: pan-y;
}

.card.swiping-left {
    transform: translateX(-120%) rotate(-15deg);
    opacity: 0;
}

.card.swiping-right {
    transform: translateX(120%) rotate(15deg);
    opacity: 0;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.card-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--surface2);
    color: var(--text-dim);
}

.card-category.a15 {
    background: rgba(92, 124, 250, 0.2);
    color: var(--accent);
}

.card-feed {
    font-size: 12px;
    color: var(--text-dim);
}

.card-link-count {
    font-size: 11px;
    color: var(--warning);
}

.card-score {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: auto;
}

.card-score.good {
    background: rgba(81, 207, 102, 0.18);
    color: var(--success);
}

.card-score.mid {
    background: rgba(255, 212, 59, 0.15);
    color: var(--warning);
}

.card-score.low {
    background: rgba(255, 107, 107, 0.15);
    color: var(--danger);
}

/* Als er zowel een score als een link-count is, staat de link-count na de score */
.card-score + .card-link-count {
    margin-left: 8px;
    flex-basis: 100%;
    margin-top: 4px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.card-title a {
    color: var(--text);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--accent);
}

.card-summary {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-dim);
    margin-bottom: 20px;
}

/* Action Buttons */
.card-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn-meh, .btn-ok {
    flex: 1;
    padding: 18px;
    border-radius: var(--radius);
    font-size: 22px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-meh {
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
    border-color: rgba(255, 107, 107, 0.3);
}

.btn-meh:active {
    background: rgba(255, 107, 107, 0.3);
    transform: scale(0.95);
}

.btn-ok {
    background: rgba(81, 207, 102, 0.1);
    color: var(--success);
    border-color: rgba(81, 207, 102, 0.3);
}

.btn-ok:active {
    background: rgba(81, 207, 102, 0.3);
    transform: scale(0.95);
}

/* Swipe indicators */
.swipe-indicator {
    position: absolute;
    top: 20px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}

.swipe-left-indicator {
    left: 20px;
    background: rgba(255, 107, 107, 0.2);
    color: var(--danger);
    border: 2px solid var(--danger);
    transform: rotate(-15deg);
}

.swipe-right-indicator {
    right: 20px;
    background: rgba(81, 207, 102, 0.2);
    color: var(--success);
    border: 2px solid var(--success);
    transform: rotate(15deg);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 16px;
    font-size: 20px;
}

.reason-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.reason-btn {
    background: var(--surface2);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    text-align: center;
}

.reason-btn:active {
    background: var(--accent);
    color: white;
}

.reason-btn .emoji {
    font-size: 24px;
}

.reason-grid .reason-btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
}

/* Deep Dive */
.deep-dive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--surface2);
    margin-bottom: 16px;
}

.deep-dive-header button {
    background: var(--surface);
    border: 1px solid var(--surface2);
    color: var(--text);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

#dd-progress {
    font-size: 14px;
    color: var(--text-dim);
}

.dd-link {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.dd-link-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.dd-link-title a {
    color: var(--accent);
    text-decoration: none;
}

.dd-link-summary {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 12px;
    line-height: 1.4;
}

.dd-link-actions {
    display: flex;
    gap: 8px;
}

.dd-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.dd-btn:active {
    transform: scale(0.95);
}

.dd-btn.dive {
    background: rgba(81, 207, 102, 0.15);
    color: var(--success);
}

.dd-btn.later {
    background: rgba(255, 212, 59, 0.15);
    color: var(--warning);
}

.dd-btn.skip {
    background: var(--surface2);
    color: var(--text-dim);
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: opacity 0.2s;
}

.btn-primary:active {
    opacity: 0.8;
}

.btn-secondary {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--surface2);
    color: var(--text);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 10px;
}

.btn-tertiary {
    display: block;
    width: 100%;
    padding: 14px;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--surface2);
    border-radius: var(--radius-sm);
    font-size: 16px;
    cursor: pointer;
}

/* Later-bak */
.later-item {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.later-item-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.later-item-title a {
    color: var(--accent);
    text-decoration: none;
}

.later-item-summary {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.later-item-actions {
    display: flex;
    gap: 8px;
}

.later-item-actions button {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: none;
    cursor: pointer;
}

.later-done {
    background: rgba(81, 207, 102, 0.15);
    color: var(--success);
}

.later-remove {
    background: var(--surface2);
    color: var(--text-dim);
}

/* Stats */
.stats-section {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 16px;
}

.stats-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-dim);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--surface2);
}

.stats-row:last-child {
    border-bottom: none;
}

.stats-value {
    font-weight: 700;
    font-size: 18px;
}

.stats-label {
    color: var(--text-dim);
}

/* Reason card */
.reason-card-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.reason-verdict {
    font-size: 22px;
    font-weight: 800;
}

.reason-question {
    font-size: 16px;
    color: var(--text-dim);
}

.reason-post-title {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.4;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reason-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: var(--danger);
    font-size: 13px;
    text-align: center;
}

/* Stats charts */
.split-bar {
    display: flex;
    height: 36px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 8px;
    gap: 2px;
}

.split-ok, .split-meh {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    min-width: 0;
    white-space: nowrap;
}

.split-ok {
    background: rgba(81, 207, 102, 0.3);
    color: var(--success);
}

.split-meh {
    background: rgba(255, 107, 107, 0.3);
    color: var(--danger);
}

.split-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.bar-label {
    flex: 0 0 45%;
    font-size: 13px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    flex: 1;
    height: 12px;
    background: var(--surface2);
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 6px;
    transition: width 0.4s ease;
}

.bar-count {
    flex: 0 0 30px;
    text-align: right;
    font-weight: 700;
    font-size: 13px;
}

/* Animations */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: slideIn 0.3s ease;
}
