/* ═══════════════════════════════════════════════════════════
   THE DAILY TRUTH — EDITORIAL THEME
   Classic Journalism, Ink, Paper, Stamps
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg-paper: #f4f1ea;
    --bg-card: #ffffff;
    --ink-black: #1a1a1a;
    --mid-grey: #666666;
    --border-color: #2c3e50;

    /* Stamp Colors */
    --stamp-red: #c0392b;
    /* Faded red ink */
    --stamp-green: #27ae60;
    /* Faded green ink */

    /* Fonts */
    --font-head: 'Playfair Display', serif;
    --font-body: 'Lora', serif;
    --font-stamp: 'Special Elite', cursive;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-paper);
    color: var(--ink-black);
    font-family: var(--font-body);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ─────────────────────────────────────────────────────────── 
   LAYOUT & TEXTURE
   ─────────────────────────────────────────────────────────── */
.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
}

.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
    z-index: 900;
}

/* ─────────────────────────────────────────────────────────── 
   MASTHEAD (Header)
   ─────────────────────────────────────────────────────────── */
.newspaper-header {
    background: var(--bg-paper);
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid var(--ink-black);
    z-index: 10;
}

.header-top {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: var(--mid-grey);
    letter-spacing: 1px;
}

.masthead-title {
    font-family: var(--font-head);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--ink-black);
    letter-spacing: -1px;
    line-height: 1;
    margin: 5px 0;
}

.header-border {
    height: 3px;
    background-color: var(--ink-black);
    margin: 10px auto;
    width: 100%;
    border-bottom: 1px solid var(--ink-black);
    margin-bottom: 10px;
}

.hud-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
}

.stat-label {
    font-style: italic;
    color: var(--mid-grey);
    margin-right: 5px;
}

/* ─────────────────────────────────────────────────────────── 
   GAME BOARD / CARDS
   ─────────────────────────────────────────────────────────── */
.game-board {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    perspective: 1000px;
}

.card-stack {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 500px;
    max-height: 65vh;
}

.tinder-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid #ccc;
    box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 30px;
    cursor: grab;
    will-change: transform;
    /* Paper look */
    background-image: linear-gradient(#eee .1rem, transparent .1rem);
    background-size: 100% 1.5rem;
    /* Ruling lines like notepad? Maybe purely white implies 'printed'. Let's keep it white. */
    background-image: none;
}

/* Make card look like a clipping */
.tinder-card::after {
    content: "";
    /* Jagged edge bottom maybe? Keep simple for now */
}

.card-content {
    text-align: left;
    /* Newspaper style */
    pointer-events: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-icon {
    font-size: 3rem;
    display: block;
    text-align: center;
    margin-bottom: 20px;
    opacity: 0.8;
}

.card-headline {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--ink-black);
}

.card-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

.card-hint {
    margin-top: auto;
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 2px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--mid-grey);
    font-family: var(--font-stamp);
}

.loader-ink {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--ink-black);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ─────────────────────────────────────────────────────────── 
   STAMPS (Swipe Overlays)
   ─────────────────────────────────────────────────────────── */
.swipe-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    z-index: 100;

    font-family: var(--font-stamp);
    font-size: 3.5rem;
    font-weight: 400;
    text-transform: uppercase;
    border: 5px solid;
    padding: 10px 20px;
    border-radius: 5px;
    mask-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAREACnI03JEAAAAAElFTkSuQmCC");
    /* Simple noise mask would be better but keeping simple */
    transform: translate(-50%, -50%) rotate(-15deg);
}

.stamp-true {
    color: var(--stamp-green);
    border-color: var(--stamp-green);
    transform: translate(-50%, -50%) rotate(-10deg);
}

.stamp-false {
    color: var(--stamp-red);
    border-color: var(--stamp-red);
    transform: translate(-50%, -50%) rotate(15deg);
}

/* ─────────────────────────────────────────────────────────── 
   CONTROLS
   ─────────────────────────────────────────────────────────── */
.controls-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px 40px;
    z-index: 10;
}

.control-btn {
    background: transparent;
    border: 2px solid var(--ink-black);
    color: var(--ink-black);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.control-btn:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.05);
}

.btn-icon {
    font-size: 1.5rem;
}

.btn-label {
    font-size: 0.6rem;
    font-weight: 700;
    margin-top: 2px;
}

.btn-reject:hover {
    border-color: var(--stamp-red);
    color: var(--stamp-red);
}

.btn-publish:hover {
    border-color: var(--stamp-green);
    color: var(--stamp-green);
}

.instructions {
    text-align: center;
    font-size: 0.8rem;
    color: var(--mid-grey);
}

.instructions p {
    font-weight: 700;
    margin-bottom: 5px;
}

/* ─────────────────────────────────────────────────────────── 
   MODALS (Paper Style)
   ─────────────────────────────────────────────────────────── */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.newspaper-paper {
    background: var(--bg-paper);
    width: 90%;
    max-width: 500px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    border: 1px solid #ccc;
    position: relative;
}

/* Welcome Screen Specifics */
.paper-header {
    border-bottom: 3px double var(--ink-black);
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.paper-header h2 {
    font-family: var(--font-head);
    font-weight: 900;
    text-transform: uppercase;
}

.headline {
    font-family: var(--font-head);
    font-size: 1.8rem;
    line-height: 1.1;
    margin-bottom: 15px;
}

.lead {
    font-family: var(--font-body);
    font-style: italic;
    color: #444;
    margin-bottom: 30px;
}

.tutorial-graphic {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.tut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
}

.tut-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.tut-action {
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.tut-desc {
    font-size: 0.8rem;
    color: #666;
}

.tut-item.left .tut-icon {
    color: var(--stamp-red);
}

.tut-item.right .tut-icon {
    color: var(--stamp-green);
}

.tut-divider {
    width: 1px;
    background: #ccc;
}

.ink-btn {
    background: var(--ink-black);
    color: var(--bg-paper);
    border: none;
    padding: 15px 30px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.ink-btn:hover {
    background: #444;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.ink-btn.secondary {
    background: transparent;
    border: 1px solid var(--ink-black);
    color: var(--ink-black);
    margin-top: 10px;
}

/* Feedback Correction Slip */
.correction-slip {
    background: #fff;
    border: 1px solid #ddd;
    text-align: left;
}

.correction-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.correction-header h2 {
    font-size: 1rem;
    color: var(--mid-grey);
    letter-spacing: 2px;
}

.stamp-mark {
    font-family: var(--font-stamp);
    font-size: 2.5rem;
    color: var(--stamp-red);
    border: 4px solid var(--stamp-red);
    display: inline-block;
    padding: 5px 15px;
    transform: rotate(-5deg);
    margin-bottom: 20px;
    opacity: 0.9;
}

.modal-content.correct .stamp-mark {
    color: var(--stamp-green);
    border-color: var(--stamp-green);
}

.source-wrapper {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
    font-size: 0.9rem;
}

.source-wrapper a {
    color: var(--ink-black);
    text-decoration: underline;
    font-weight: 700;
}

/* End Screen */
.headline-large {
    font-family: var(--font-head);
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.final-stats-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 20px 0;
}

.f-stat {
    display: flex;
    flex-direction: column;
}

.f-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.f-val {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 600px) {
    .masthead-title {
        font-size: 1.8rem;
    }

    .card-stack {
        max-width: 100%;
        height: 60vh;
    }

    .tinder-card {
        padding: 20px;
    }

    .card-headline {
        font-size: 1.3rem;
    }

    .controls-area {
        padding: 10px 20px 30px;
    }
}