@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@900&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --paper: #FFFFFF;
    --ink: #111111;
    --ink-light: #666666;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    background-color: #F0F0F0;
    color: var(--ink);
    overflow-x: hidden;
}

.page-border {
    background-color: var(--paper);
    border: 4px solid var(--ink);
    outline: 2px solid var(--ink);
    outline-offset: 4px;
    max-width: 900px;
    margin: 60px auto;
    padding: 40px;
    box-shadow: 16px 16px 0px var(--ink);
}

/* Typography */
h1 {
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 6.5rem; /* Slightly larger to compensate for condensed width */
    font-weight: 900;
    margin: 0;
    line-height: 1;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

body, input, textarea, button, .feed-item-text, .masthead-sub, .btn-outline, .shame-meta, .stat-label {
    font-family: 'Space Mono', monospace;
}

h2, h3, .btn-heavy, .shame-task, .stat-value {
    font-family: 'Big Shoulders Display', sans-serif;
    font-weight: 900;
}

.subtitle {
    font-family: 'Space Mono', monospace;
    text-align: center;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    padding: 5px 0;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Masthead */
.masthead {
    text-align: center;
    border-bottom: 4px double var(--ink);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.masthead-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    padding: 4px 0;
    margin-bottom: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}
.masthead-sub {
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 10px;
    letter-spacing: 1px;
}

/* Grid Layout */
.newspaper-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 30px;
}

.right-col {
    border-left: 2px solid var(--ink);
    padding-left: 30px;
}

.section-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 5px;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Left Column Elements */
.article-box {
    margin-bottom: 40px;
}

.user-details {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.user-details input, .user-details select {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 1px solid var(--ink);
    padding: 8px;
    font-size: 0.9rem;
    outline: none;
    text-overflow: ellipsis;
}

.user-details input:focus, .user-details select:focus {
    background: rgba(23, 23, 23, 0.05);
}

textarea {
    width: 100%;
    box-sizing: border-box;
    height: 80px;
    background: transparent;
    border: 1px solid var(--ink);
    padding: 10px;
    font-size: 1rem;
    resize: none;
    outline: none;
}

textarea:focus {
    background: rgba(23, 23, 23, 0.05);
}

/* Quick Chips (Preset Tasks) */
.quick-chips-wrapper {
    margin-top: 12px;
    margin-bottom: 5px;
}

.chips-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--ink-light);
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    margin-bottom: 8px;
}

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

.chip-btn {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
    font-family: 'Space Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.12s ease, color 0.12s ease, transform 0.05s ease;
    line-height: 1.2;
}

.chip-btn:hover {
    background: var(--ink);
    color: var(--paper);
}

.chip-btn:active {
    transform: scale(0.96);
}

.chip-btn.chip-random {
    border: 1px dashed var(--ink);
    background: rgba(17, 17, 17, 0.04);
}

.chip-btn.chip-random:hover {
    background: var(--ink);
    color: var(--paper);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

button {
    cursor: pointer;
    text-transform: uppercase;
    font-size: 1.2rem;
    padding: 12px;
    transition: all 0.15s ease;
    border: 2px solid var(--ink);
}

.btn-heavy {
    background: var(--ink);
    color: var(--paper);
    font-weight: bold;
    letter-spacing: 2px;
}

.btn-heavy:hover {
    background: var(--paper);
    color: var(--ink);
}

.btn-heavy:active {
    transform: translate(2px, 2px);
}

.btn-outline {
    background: var(--paper);
    color: var(--ink);
    font-weight: bold;
}

.btn-outline:hover {
    background: var(--ink);
    color: var(--paper);
}

.btn-outline:active {
    transform: translate(2px, 2px);
}

.status-msg {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: bold;
    min-height: 1.2em;
    text-align: center;
}

/* Post-Submission Share Card */
.share-card {
    margin-top: 15px;
    border: 2px dashed var(--ink);
    padding: 12px 14px;
    background-color: #FAFAFA;
    animation: slideIn 0.25s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.share-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.share-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
    padding: 0 4px;
    font-family: monospace;
}

.share-close-btn:hover {
    font-weight: 900;
}

.share-card-task {
    font-size: 0.95rem;
    font-weight: 700;
    font-style: italic;
    margin-bottom: 12px;
    word-break: break-word;
    color: var(--ink);
}

.share-btn-cert {
    width: 100%;
    background: var(--ink);
    color: var(--paper);
    border: 2px solid var(--ink);
    padding: 10px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    text-align: center;
    margin-bottom: 10px;
    transition: background 0.15s, color 0.15s, transform 0.05s;
    box-shadow: 2px 2px 0px rgba(17, 17, 17, 0.2);
}

.share-btn-cert:hover {
    background: var(--paper);
    color: var(--ink);
}

.share-btn-cert:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px rgba(17, 17, 17, 0.2);
}

.share-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-btn {
    flex: 1 1 80px;
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--ink);
    padding: 8px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.15s, color 0.15s, transform 0.05s;
    font-family: 'Space Mono', monospace;
    text-align: center;
}

.share-btn:hover {
    background: var(--ink);
    color: var(--paper);
}

.share-btn:active {
    transform: translate(1px, 1px);
}

.stats-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-group {
    text-align: center;
    border: 1px solid var(--ink);
    padding: 15px;
}

.stat-value {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Global Procrastination Index */
.leaderboard-meta {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-row {
    display: flex;
    align-items: baseline;
    font-size: 0.8rem;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
}

.leaderboard-rank {
    width: 26px;
    opacity: 0.6;
    font-size: 0.75rem;
}

.leaderboard-country {
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.leaderboard-dots {
    flex-grow: 1;
    border-bottom: 1px dotted var(--ink);
    margin: 0 6px;
    height: 1px;
    opacity: 0.5;
}

.leaderboard-count {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
}

.leaderboard-empty {
    font-size: 0.8rem;
    font-style: italic;
    opacity: 0.7;
    text-align: center;
    padding: 10px 0;
}

/* Hall of Shame */
.hall-of-shame {
    border: 4px double var(--ink);
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
}

.shame-badge {
    background: var(--ink);
    color: var(--paper);
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.shame-task {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 10px;
}

.shame-meta {
    font-size: 0.85rem;
    font-style: italic;
}

/* Feed */
.feed-container {
    max-height: 600px;
    overflow-y: auto;
    padding: 15px;
    border: 2px solid var(--ink);
    scrollbar-width: thin;
    scrollbar-color: var(--ink) var(--paper);
}

.feed-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ink);
}

.feed-item-meta {
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.feed-item-text {
    font-size: 1.2rem;
    line-height: 1.4;
}

.feed-item-time {
    font-size: 0.75rem;
    color: var(--ink-light);
    margin-top: 5px;
    display: block;
}

/* Special Broadcast Video Box */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border: 2px solid var(--ink);
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-caption {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 8px;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink);
}

/* Footer / Visitor Counter */
.site-footer {
    border-top: 4px double var(--ink);
    margin-top: 40px;
    padding-top: 25px;
    text-align: center;
}

.visitor-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    border: 2px solid var(--ink);
    padding: 10px 15px;
    font-family: 'Space Mono', monospace;
    font-weight: bold;
    font-size: 0.9rem;
}

.counter-value {
    background: var(--ink);
    color: var(--paper);
    padding: 4px 10px;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

/* Animations */
@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-15px) scale(0.98);
    }
    70% {
        transform: translateY(2px) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.slide-in {
    animation: slideIn 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes statPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: #555; }
    100% { transform: scale(1); }
}

.stat-pop {
    animation: statPop 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes flyOff {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
    100% { transform: translate(150px, -50px) rotate(10deg); opacity: 0; }
}

.fly-off {
    animation: flyOff 0.4s ease-in forwards;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.4s;
}

@keyframes flash-bg {
    0%, 100% { background-color: transparent; }
    10% { background-color: rgba(17, 17, 17, 0.05); }
}

/* Responsive Alignment Fixes */
@media (max-width: 768px) {
    .page-border {
        margin: 20px 10px;
        padding: 20px;
        box-shadow: 8px 8px 0px var(--ink);
        outline-offset: 2px;
    }

    .newspaper-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .right-col {
        border-left: none;
        border-top: 2px solid var(--ink);
        padding-left: 0;
        padding-top: 30px;
    }
    
    .user-details {
        flex-direction: column;
    }
    
    h1 {
        font-size: 3rem;
    }
}

.site-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-top: 2px solid var(--ink);
    margin-top: 40px;
    padding: 25px 0 20px 0;
    text-transform: uppercase;
    gap: 15px;
}

.footer-share-btn {
    background: var(--ink);
    color: var(--paper);
    border: 2px solid var(--ink);
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    transition: background 0.15s, color 0.15s, transform 0.05s;
    text-align: center;
    box-shadow: 4px 4px 0px rgba(17, 17, 17, 0.15);
}

.footer-share-btn:hover {
    background: var(--paper);
    color: var(--ink);
}

.footer-share-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(17, 17, 17, 0.15);
}

.footer-quote {
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    max-width: 80%;
}

.footer-credit {
    font-size: 0.65rem;
    font-weight: 400;
    opacity: 0.6;
    letter-spacing: 1px;
    text-align: center;
}

@media (max-width: 768px) {
    .site-footer {
        flex-direction: column;
        gap: 15px;
    }
    .footer-quote {
        max-width: 100%;
    }
    .footer-credit {
        position: static;
        text-align: center;
        max-width: 100%;
    }
}
