/*
 * Fame Index — Teletext/Ceefax Aesthetic
 *
 * Inspired by 1980s British teletext services. Bold block colours,
 * monospace type, high contrast. Pinks and colours that pop.
 *
 * Key characteristics:
 * - Black background with bright text
 * - Monospace font throughout
 * - Block colour accents (pink, cyan, yellow, green)
 * - No gradients, no shadows, no rounded corners
 * - Chunky borders and separators
 * - All-caps headings
 */

:root {
    --bg: #000000;
    --text: #ffffff;
    --pink: #ff47ab;
    --cyan: #00ffff;
    --yellow: #ffff00;
    --green: #00ff00;
    --red: #ff3333;
    --blue: #3333ff;
    --magenta: #ff00ff;
    --dim: #888888;
    --font-mono: "Courier New", "Lucida Console", monospace;
}

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

body.teletext {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.4;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
.teletext-header {
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--cyan);
    margin-bottom: 1rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-number {
    color: var(--yellow);
    font-weight: bold;
    font-size: 1.125rem;
}

.site-title {
    font-size: 3rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    margin: 0.25rem 0;
    text-transform: uppercase;
}

.title-fame {
    color: var(--pink);
}

.title-index {
    color: #20b2aa;
    margin-left: 0.3em;
}

.timestamp {
    color: var(--cyan);
}

/* Navigation */
.teletext-nav {
    background: var(--blue);
    padding: 0.25rem 0.5rem;
    margin-bottom: 1rem;
}

.teletext-nav a {
    color: var(--yellow);
    text-decoration: none;
    margin-right: 2rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: bold;
}

.teletext-nav a:hover {
    color: var(--pink);
}

/* Ranking table */
.ranking-table h2 {
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.ranking-table table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th {
    color: var(--yellow);
    text-align: left;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid var(--dim);
}

.ranking-table td {
    padding: 0.25rem 0.5rem;
}

.ranking-table .rank {
    color: var(--dim);
    width: 3rem;
}

.ranking-table .name a {
    color: var(--text);
    text-decoration: none;
}

.ranking-table .name a:hover {
    color: var(--pink);
}

.ranking-table .score {
    color: var(--green);
    text-align: right;
    width: 4rem;
}

.ranking-table .momentum {
    text-align: right;
    width: 4rem;
}

.ranking-table .change {
    width: 4rem;
    text-align: right;
}

.rank-row.rising .momentum,
.rank-row.rising .change {
    color: var(--green);
}

.rank-row.falling .momentum,
.rank-row.falling .change {
    color: var(--red);
}

/* Person profile */
.person-profile h2 {
    color: var(--pink);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.person-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stat {
    border: 1px solid var(--dim);
    padding: 0.5rem;
}

.stat-label {
    display: block;
    color: var(--cyan);
    font-size: 0.75rem;
}

.stat-value {
    display: block;
    color: var(--yellow);
    font-size: 1.25rem;
    font-weight: bold;
}

.stat-value.rising {
    color: var(--green);
}

.stat-value.falling {
    color: var(--red);
}

/* Blog posts */
.blog-post h2 {
    color: var(--pink);
    margin-bottom: 0.5rem;
}

.post-meta {
    color: var(--dim);
    margin-bottom: 1rem;
}

.post-content {
    line-height: 1.6;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-nav {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
}

.post-nav a {
    color: var(--cyan);
    text-decoration: none;
}

/* Week snapshot */
.week-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.highlight {
    background: var(--blue);
    padding: 0.5rem;
    text-align: center;
}

.highlight-label {
    display: block;
    color: var(--cyan);
    font-size: 0.625rem;
    text-transform: uppercase;
}

.highlight-value {
    display: block;
    color: var(--yellow);
    font-weight: bold;
}

/* Blog index */
.blog-index h2 {
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.blog-intro {
    color: var(--dim);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.post-list {
    list-style: none;
}

.post-item {
    border-bottom: 1px solid var(--dim);
    padding: 0.5rem 0;
}

.post-item a {
    color: var(--text);
    text-decoration: none;
    display: flex;
    gap: 1.5rem;
}

.post-item a:hover {
    color: var(--pink);
}

.post-week {
    color: var(--cyan);
    white-space: nowrap;
}

.post-title {
    color: var(--yellow);
}

.post-item a:hover .post-title {
    color: var(--pink);
}

/* Person history table */
.history table {
    width: 100%;
    border-collapse: collapse;
}

.history th {
    color: var(--yellow);
    text-align: left;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid var(--dim);
}

.history td {
    padding: 0.25rem 0.5rem;
    color: var(--text);
}

body.teletext .person-profile .history td a,
body.teletext .person-profile .history td a:link,
body.teletext .person-profile .history td a:visited {
    color: var(--pink);
    text-decoration: none;
}

body.teletext .person-profile .history td a:hover {
    color: var(--text);
}

/* Footer */
.teletext-footer {
    margin-top: 2rem;
    padding-top: 0.5rem;
    border-top: 2px solid var(--cyan);
    color: var(--dim);
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 600px) {
    .person-stats {
        grid-template-columns: 1fr;
    }

    .week-highlights {
        grid-template-columns: 1fr;
    }

    .teletext-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
