/**
 * SKATETOPIA QUEST - MAIN STYLESHEET
 * ===================================
 * A minimal, clean stylesheet designed for easy customization.
 */

/* =========================================
   CSS VARIABLES - Parchment Theme
   ========================================= */
:root {
    --color-bg: #e8dcc8;
    --color-surface: #f5efe3;
    --color-text: #3d3327;
    --color-text-muted: #6b5d4d;
    --color-primary: #8b5a2b;
    --color-primary-hover: #6d4620;
    --color-border: #c9b99a;
    --color-error: #a63d2f;
    --color-success: #4a6b3d;
    
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 16px;
    --font-size-small: 0.875rem;
    --font-size-large: 1.25rem;
    --font-size-heading: 1.75rem;
    
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    --max-width: 960px;
    --border-radius: 4px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
}

/* =========================================
   BASE STYLES
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

h1, h2, h3, h4 {
    margin: 0 0 var(--space-md) 0;
    line-height: 1.3;
    font-weight: 600;
}

h1 { font-size: var(--font-size-heading); }
h2 { font-size: var(--font-size-large); }
h3 { font-size: 1.1rem; }

p {
    margin: 0 0 var(--space-md) 0;
}

/* =========================================
   LAYOUT
   ========================================= */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.page {
    padding: var(--space-xl) 0;
    min-height: calc(100vh - 60px);
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 600px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.nav-brand {
    font-weight: 600;
    font-size: var(--font-size-large);
    color: var(--color-text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
}

.nav-links a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-base);
    font-family: inherit;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    color: white;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.btn-danger {
    background: var(--color-error);
    color: white;
}

.btn-danger:hover {
    background: #a83a2e;
    color: white;
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-small);
}

/* =========================================
   FORMS
   ========================================= */
.form-group {
    margin-bottom: var(--space-md);
}

label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    font-size: var(--font-size-small);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: var(--space-sm);
    font-size: var(--font-size-base);
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Options/Settings Form */
.options-form {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
}

.form-section {
    margin-bottom: var(--space-lg);
}

.form-section h2 {
    font-size: 1rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    transition: border-color 0.2s, background 0.2s;
}

.radio-label:hover {
    border-color: var(--color-primary);
    background: rgba(139, 69, 19, 0.05);
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

/* =========================================
   CARDS
   ========================================= */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.card-title {
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--font-size-large);
}

.card-meta {
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

/* =========================================
   ALERTS
   ========================================= */
.alert {
    padding: var(--space-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
}

.alert-error {
    background: #fef2f2;
    color: var(--color-error);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--color-success);
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #eff6ff;
    color: var(--color-primary);
    border: 1px solid #bfdbfe;
}

/* =========================================
   LANDING PAGE - Scrolling Background
   ========================================= */
.landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    position: relative;
    background-image: url('/images/bg.png');
    background-size: auto 100vh;
    background-repeat: repeat-x;
    animation: scroll-bg 120s linear infinite;
}

@keyframes scroll-bg {
    0% { background-position: 0 0; }
    100% { background-position: -3000px 0; }
}

.landing-box {
    background: rgba(245, 239, 227, 0.95);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.landing-title {
    text-align: center;
    margin-bottom: var(--space-xs);
}

.landing-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.auth-tabs {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.auth-tab {
    padding: var(--space-sm) 0;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-family: inherit;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.auth-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* =========================================
   HOME PAGE
   ========================================= */
/* =========================================
   HOME PAGE - Scrolling Background
   ========================================= */
.page-home {
    background-image: url('/images/homebg.png');
    background-size: auto 100%;
    background-repeat: repeat-x;
    background-attachment: fixed;
    animation: scroll-bg-home 180s linear infinite;
}

@keyframes scroll-bg-home {
    0% { background-position: 0 0; }
    100% { background-position: -5000px 0; }
}

.hero {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.hero-title {
    margin-bottom: var(--space-sm);
}

.hero-text {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.news-item {
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-title {
    margin-bottom: var(--space-xs);
}

.news-date {
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

.news-excerpt {
    margin: var(--space-sm) 0;
    color: var(--color-text-muted);
}

/* =========================================
   BLOG
   ========================================= */
.post {
    margin-bottom: var(--space-xl);
}

.post-header {
    margin-bottom: var(--space-lg);
}

.post-title {
    margin-bottom: var(--space-xs);
}

.post-meta {
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

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

.comments {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.comment {
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
}

.comment-meta {
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.comment-form {
    margin-top: var(--space-lg);
}

/* =========================================
   FORUM
   ========================================= */
.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.category {
    margin-bottom: var(--space-xl);
}

.category-title {
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--space-md);
}

.topic-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

.topic-title {
    font-weight: 500;
}

.topic-meta {
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

.topic-stats {
    text-align: right;
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

.topic-post {
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
}

.topic-post-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

.reply-form {
    margin-top: var(--space-lg);
}

/* =========================================
   ADMIN
   ========================================= */
.admin-header {
    margin-bottom: var(--space-xl);
}

.admin-section {
    margin-bottom: var(--space-xl);
}

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

.admin-table th,
.admin-table td {
    padding: var(--space-sm);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.admin-table th {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
}

.admin-actions {
    display: flex;
    gap: var(--space-xs);
}

/* Game Admin Styles */
.game-state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.state-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    text-align: center;
}

.state-card h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.state-value {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0;
}

.state-detail {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0;
}

.admin-form {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

.characters-table-wrapper {
    overflow-x: auto;
}

.char-cell {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.char-mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.btn-small {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
}

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

.modal-content {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: var(--space-lg);
}

.modal-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
    text-align: center;
}

.footer-links {
    margin-top: var(--space-sm);
}

.footer-links a {
    color: var(--color-text-muted);
    margin: 0 var(--space-sm);
}

/* =========================================
   UTILITIES
   ========================================= */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.hidden { display: none; }

/* =========================================
   GAME STYLES - CHARACTER CREATION & GAME
   ========================================= */
.page-create,
.page-game {
    padding: 0;
}

.game-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 60px);
}

.page-create .game-layout {
    grid-template-columns: 1fr 260px;
}

@media (max-width: 768px) {
    .game-layout {
        grid-template-columns: 1fr;
    }
    
    .page-create .game-layout {
        grid-template-columns: 1fr;
    }
}

/* Game Sidebar */
.game-sidebar {
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: var(--space-md);
    overflow-y: auto;
    max-height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
}

.page-create .game-sidebar {
    border-right: none;
    border-left: 1px solid var(--color-border);
}

@media (max-width: 768px) {
    .game-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
    
    .page-create .game-sidebar {
        border-left: none;
        border-bottom: 1px solid var(--color-border);
        order: -1;
    }
}

/* Character Card */
.char-card {
    text-align: center;
}

.char-portrait {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-sm);
}

.char-portrait-empty {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-sm);
    font-size: 2.5rem;
    color: var(--color-text-muted);
}

.char-name {
    font-size: 1.1rem;
    margin-bottom: 2px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-xs);
}

.char-class {
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
    margin-bottom: var(--space-md);
}

/* Resources Row */
.char-resources {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-md);
}

.resource {
    background: var(--color-bg);
    padding: var(--space-sm);
    text-align: center;
}

.resource-label {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
}

.resource-value {
    font-weight: bold;
    font-size: 1rem;
}

/* Health/Mood Bars */
.char-bars {
    margin-bottom: var(--space-md);
    padding: var(--space-sm);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.bar-group {
    margin-bottom: var(--space-sm);
}

.bar-group:last-child {
    margin-bottom: 0;
}

.bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 3px;
}

.bar-label {
    font-weight: 600;
}

.bar-value {
    color: var(--color-text-muted);
}

.bar-track {
    height: 10px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.bar-health .bar-fill {
    background: #4a7c59;
}

.bar-mood .bar-fill {
    background: #c4a35a;
}

.bar-hunger .bar-fill {
    background: #e67e22;
}

.bar-energy .bar-fill {
    background: #3498db;
}

/* Character Stats - Wikipedia table style */
.char-stats {
    text-align: left;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
}

.stat-section {
    border-bottom: 1px solid var(--color-border);
}

.stat-section:last-child {
    border-bottom: none;
}

.stat-section h3 {
    font-size: 0.8rem;
    background: var(--color-surface);
    margin: 0;
    padding: var(--space-xs) var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: var(--space-xs) var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item span:first-child {
    color: var(--color-text-muted);
}

.stat-item small {
    color: var(--color-text-muted);
    font-weight: normal;
    font-size: 0.75rem;
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
    padding: 0 var(--space-sm) var(--space-xs);
    border-bottom: 1px solid var(--color-border);
}

/* Game Main Area */
.game-main {
    padding: var(--space-lg);
    background: var(--color-bg);
    flex: 1;
    min-width: 0;
}

.game-main-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: var(--space-lg);
    align-items: start;
}

@media (max-width: 900px) {
    .game-main-layout {
        grid-template-columns: 1fr;
    }
    
    .weather-widget-container {
        order: -1;
    }
}

.game-content {
    max-width: 700px;
}

.game-content h1 {
    margin-bottom: var(--space-lg);
}

/* Weather Widget - Sleek External Style */
.widgets-container {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.weather-widget {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 16px;
    overflow: hidden;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1) inset;
}

.weather-widget-header {
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weather-brand {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64b5f6;
}

.weather-location {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
}

.weather-widget-body {
    padding: 20px 16px;
    text-align: center;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}

.weather-widget .weather-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.weather-widget .weather-temp {
    font-size: 3rem;
    font-weight: 200;
    line-height: 1;
}

.weather-widget .weather-pattern {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2px;
}

.weather-widget .weather-feels {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

.weather-widget-details {
    display: flex;
    justify-content: space-around;
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.weather-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.detail-icon {
    font-size: 0.9rem;
    opacity: 0.7;
}

.detail-value {
    font-size: 0.75rem;
    font-weight: 500;
}

.weather-widget-skate {
    padding: 12px 16px;
}

.skate-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid;
}

.skate-status .skate-icon {
    font-size: 1.5rem;
}

.skate-text {
    display: flex;
    flex-direction: column;
}

.skate-status .skate-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.6);
}

.skate-status .skate-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.weather-widget-footer {
    padding: 10px 16px;
    background: rgba(0,0,0,0.3);
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}

/* News Widget - Red/White Theme */
.news-widget {
    background: linear-gradient(135deg, #8b0000 0%, #a52a2a 50%, #cd5c5c 100%);
    border-radius: 16px;
    overflow: hidden;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1) inset;
}

.news-widget-header {
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-brand {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.news-tagline {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
}

.news-widget-body {
    padding: 12px 16px;
}

.news-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.news-item:last-child {
    border-bottom: none;
}

.news-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
}

.news-headline {
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0;
    color: rgba(255,255,255,0.95);
}

.news-widget-footer {
    padding: 10px 16px;
    background: rgba(0,0,0,0.3);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
}

/* Daily Action Bars */
.action-bars {
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

.action-bars-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.action-bars-grid {
    display: flex;
    gap: 20px;
}

.action-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.action-bar-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.action-icon {
    font-size: 1rem;
}

.action-bar-track {
    display: flex;
    gap: 4px;
}

.action-pip {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.action-pip.filled {
    background: var(--color-primary);
}

.action-pip.empty {
    background: var(--color-border);
}

/* Different colors for each action type */
.action-bar:nth-child(1) .action-pip.filled {
    background: #9b59b6; /* Social - purple */
}

.action-bar:nth-child(2) .action-pip.filled {
    background: #e67e22; /* Work - orange */
}

.action-bar:nth-child(3) .action-pip.filled {
    background: #27ae60; /* Free - green */
}

/* Energy Drink */
.energy-drink-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.energy-drink-form {
    display: inline-block;
}

.energy-drink-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.energy-drink-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f6dad);
    transform: translateY(-1px);
}

.energy-drink-btn:disabled {
    background: var(--color-border);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

.energy-drink-btn .drink-count {
    font-size: 0.8rem;
    opacity: 0.8;
}

.energy-drink-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 6px;
    margin-bottom: 0;
}

.energy-drink-result {
    padding: 10px 14px;
    background: var(--color-surface);
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 12px;
    border-left: 3px solid #3498db;
}

@media (max-width: 600px) {
    .action-bars-grid {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .action-bar-track {
        flex: 1;
        max-width: 120px;
    }
}

/* Game Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.menu-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-item:hover:not(.menu-disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.menu-item-featured {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-color: transparent;
    color: white;
    grid-column: span 2;
}

.menu-item-featured .menu-status {
    color: rgba(255,255,255,0.8);
}

.menu-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.menu-label {
    display: block;
    font-weight: bold;
    margin-bottom: var(--space-xs);
}

.menu-status {
    display: block;
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

/* Creation Stage */
.create-stage {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-xl);
    text-align: center;
}

.create-stage h1 {
    margin-bottom: var(--space-sm);
}

.create-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.inline-form {
    display: inline;
}

/* Button Variants */
.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-large);
}

/* =========================================
   SOCIAL PAGE - NPC GRID
   ========================================= */
.page-social {
    padding: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.page-social h1 {
    margin-bottom: var(--space-lg);
}

.npc-section {
    margin-bottom: var(--space-xl);
}

.npc-section-title {
    font-size: 1rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--space-md);
}

.npc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-md);
}

.npc-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.2s, box-shadow 0.2s;
}

.npc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.npc-card-portrait {
    aspect-ratio: 1;
    overflow: hidden;
}

.npc-card-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.npc-card-info {
    padding: var(--space-sm);
    text-align: center;
}

.npc-card-name {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.npc-card-bar {
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
}

.npc-card-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6b8e4e 0%, #4a7c59 50%, #2d5a3d 100%);
    border-radius: inherit;
}

/* Old styles - keeping for backward compatibility */
.npc-portrait {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-sm);
}

.npc-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.npc-name {
    font-weight: bold;
    font-size: 0.95rem;
}

.npc-disposition {
    font-size: 0.8rem;
}

.npc-disposition.positive {
    color: var(--color-success);
}

.npc-disposition.negative {
    color: var(--color-error);
}

.npc-friendship {
    font-size: 0.8rem;
    color: var(--color-primary);
}

.friendship-bar {
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.friendship-bar.large {
    height: 10px;
    border-radius: 5px;
}

.friendship-fill {
    height: 100%;
    background: linear-gradient(90deg, #6b8e4e 0%, #4a7c59 50%, #2d5a3d 100%);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.disposition-bar {
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.disposition-bar.large {
    height: 10px;
    border-radius: 5px;
}

.disposition-fill {
    height: 100%;
    background: linear-gradient(90deg, #c44536 0%, #c4a536 50%, #4a7c59 100%);
    background-size: 200% 100%;
    background-position: calc((100 - var(--disposition, 50)) * 1%) 0;
    border-radius: inherit;
}

/* =========================================
   NPC PROFILE PAGE
   ========================================= */
.page-npc {
    padding: var(--space-lg);
}

.back-link {
    margin-bottom: var(--space-md);
}

.back-link a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.back-link a:hover {
    color: var(--color-primary);
}

.npc-profile {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
}

@media (max-width: 800px) {
    .npc-profile {
        flex-direction: column;
    }
    
    .npc-sidebar {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
}

/* NPC Infobox Sidebar */
.npc-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.npc-infobox {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.npc-profile-portrait {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--color-border);
}

.npc-profile-name {
    font-size: 1.2rem;
    text-align: center;
    padding: var(--space-sm);
    margin: 0;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.npc-friendship-status,
.npc-disposition-status,
.npc-relationship,
.npc-romance {
    padding: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.friendship-header,
.disposition-header,
.relationship-header,
.romance-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: var(--space-xs);
}

.friendship-level-label {
    color: var(--color-primary);
    font-weight: 600;
}

.friendship-progress-text {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 4px;
}

.disposition-header .positive,
.relationship-header .positive {
    color: var(--color-success);
}

.disposition-header .negative,
.relationship-header .negative {
    color: var(--color-error);
}

.romance-bar {
    height: 10px;
    background: var(--color-border);
    border-radius: 5px;
    overflow: hidden;
}

.romance-fill {
    height: 100%;
    background: linear-gradient(90deg, #6b5d4d 0%, #d4637a 50%, #e84a7f 100%);
    background-size: 200% 100%;
    border-radius: inherit;
}

.npc-stats {
    text-align: left;
}

.npc-stats .stat-section {
    border-bottom: 1px solid var(--color-border);
}

.npc-stats .stat-section:last-child {
    border-bottom: none;
}

.npc-stats .stat-section h3 {
    font-size: 0.75rem;
    background: var(--color-bg);
    margin: 0;
    padding: var(--space-xs) var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
}

.npc-stats .stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: var(--space-xs) var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.npc-stats .stat-item:last-of-type {
    border-bottom: none;
}

.npc-stats .stat-item span:first-child {
    color: var(--color-text-muted);
}

.npc-stats .stat-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-style: italic;
    padding: 0 var(--space-sm) var(--space-xs);
    border-bottom: 1px solid var(--color-border);
}

/* NPC Biography */
.npc-bio {
    flex: 1;
    min-width: 0;
}

.npc-bio h2 {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border);
}

.bio-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.bio-content p {
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.bio-content p:last-child {
    margin-bottom: 0;
}

.bio-content h3 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    font-size: 1rem;
    color: var(--color-primary);
}

.npc-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.npc-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================
   SOCIAL FEEDS - Twitter & News
   ========================================= */
.feeds-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

@media (max-width: 900px) {
    .feeds-container {
        grid-template-columns: 1fr;
    }
}

.feed-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 400px;
    min-width: 0;
}

.feed-header {
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.feed-header-icon {
    width: 20px;
    height: 20px;
}

.feed-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Twitter-style Social Feed */
.social-post {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: var(--space-sm);
}

.social-post:last-child {
    border-bottom: none;
}

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.post-body {
    flex: 1;
    min-width: 0;
}

.post-header {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.post-name {
    font-weight: bold;
    font-size: 0.9rem;
}

.post-handle {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.post-time {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.post-time::before {
    content: "·";
    margin-right: var(--space-xs);
}

.post-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.post-actions {
    display: flex;
    gap: var(--space-lg);
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.post-action:hover {
    color: var(--color-primary);
}

/* News Feed */
.news-item {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.news-headline {
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

.news-excerpt {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.news-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.news-breaking {
    background: var(--color-error);
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-right: var(--space-xs);
}

/* Empty feed state */
.feed-empty {
    padding: var(--space-xl);
    text-align: center;
    color: var(--color-text-muted);
}

/* =========================================
   FAKE WEBSITE STYLING (Jobs/Housing)
   ========================================= */
.fake-website {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: var(--space-lg);
}

.fake-browser-bar {
    background: linear-gradient(to bottom, #e8e8e8, #d0d0d0);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #bbb;
}

.fake-url {
    background: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #555;
    flex: 1;
    font-family: monospace;
}

.fake-website-content {
    padding: var(--space-lg);
}

.fake-site-header {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid #eee;
}

.fake-logo {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.fake-logo span {
    color: var(--color-primary);
}

.fake-tagline {
    color: #777;
    margin: var(--space-xs) 0 0 0;
}

/* Job Listings */
.current-job-banner, .current-housing-banner {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border: 1px solid #81c784;
    border-radius: 8px;
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.current-job-info, .current-housing-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.current-job-label, .current-housing-label {
    background: #4caf50;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.current-job-pay, .current-housing-rent {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.current-housing-rent.free {
    background: #4caf50;
    color: white;
}

.current-cash {
    font-size: 0.9rem;
}

.job-listings, .housing-listings {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.job-listings h2, .housing-listings h2 {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid #eee;
}

.job-card, .housing-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: var(--space-md);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.job-card:hover, .housing-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
}

.job-card.job-current, .housing-card.housing-current {
    border-color: #4caf50;
    background: #f1f8e9;
}

.job-header, .housing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
}

.job-header h3, .housing-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.job-company {
    color: var(--color-primary);
    font-size: 0.85rem;
}

.housing-quality {
    color: #ffc107;
    letter-spacing: 2px;
}

.job-description, .housing-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    line-height: 1.4;
}

.job-footer, .housing-footer {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    padding-top: var(--space-sm);
    border-top: 1px solid #eee;
}

.job-pay, .housing-rent {
    font-weight: 600;
    color: #2e7d32;
}

.housing-rent.free {
    color: #4caf50;
}

.job-level, .housing-type, .housing-deposit {
    background: #e0e0e0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.job-status, .housing-status {
    margin-left: auto;
    font-size: 0.8rem;
}

.job-status.current, .housing-status.current {
    color: #4caf50;
    font-weight: 600;
}

.job-status.locked, .housing-status.locked {
    color: #999;
}

/* =========================================
   SOCIAL PAGE SECTIONS
   ========================================= */
.social-section {
    margin-bottom: var(--space-xl);
}

.social-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border);
    font-size: 1.1rem;
}

.section-icon {
    font-size: 1.2rem;
}

.section-count {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: normal;
}

/* NPC Badges */
.npc-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.badge-boss {
    background: #8b0000;
}

.badge-coworker {
    background: #2196f3;
}

.badge-landlord {
    background: #ff9800;
}

.badge-rival {
    background: #9c27b0;
}

.npc-card-portrait {
    position: relative;
}

.npc-card-level {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

/* =========================================
   WEATHER FORECAST
   ========================================= */
.weather-forecast {
    background: rgba(0,0,0,0.2);
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.forecast-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}

.forecast-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.forecast-temps {
    display: flex;
    gap: 6px;
}

.temp-high {
    font-weight: 600;
    color: #fff;
}

.temp-low {
    color: rgba(255,255,255,0.6);
}

.forecast-pattern {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin-left: auto;
}

/* =========================================
   PAGE NAVIGATION
   ========================================= */
.page-nav {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

/* =========================================
   BUTTON VARIATIONS
   ========================================= */
.btn-small {
    padding: 4px 12px;
    font-size: 0.8rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* =========================================
   NOTIFICATION BELL
   ========================================= */
.notification-bell {
    position: absolute;
    top: 12px;
    right: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: background 0.2s;
}

.notification-bell:hover {
    background: var(--color-border);
}

.notification-bell .bell-icon {
    font-size: 1.1rem;
}

.notification-bell .notification-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.notification-bell.no-notifs {
    opacity: 0.5;
}

.notification-bell.no-notifs:hover {
    opacity: 1;
}

.char-card {
    position: relative;
}

/* =========================================
   SKATR WIDGET (Fake Twitter)
   ========================================= */
.skatr-widget {
    background: #15202b;
    border-radius: 16px;
    overflow: hidden;
    color: white;
}

.skatr-header {
    padding: 12px 16px;
    border-bottom: 1px solid #38444d;
}

.skatr-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1da1f2;
}

.skatr-feed {
    max-height: 200px;
    overflow: hidden;
}

.skatr-post {
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #38444d;
}

.skatr-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1da1f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.skatr-content {
    flex: 1;
    min-width: 0;
}

.skatr-user {
    font-size: 0.8rem;
    color: #8899a6;
    display: block;
    margin-bottom: 2px;
}

.skatr-content p {
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 0;
}

.skatr-footer {
    padding: 10px 16px;
    text-align: center;
    font-size: 0.75rem;
    color: #8899a6;
    border-top: 1px solid #38444d;
}

/* =========================================
   ATM WIDGET
   ========================================= */
.atm-widget {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    border-radius: 12px;
    overflow: hidden;
}

.atm-screen {
    background: #0a1f0a;
    margin: 12px;
    padding: 16px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.atm-header {
    color: #00ff00;
    font-size: 0.7rem;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.atm-balance {
    display: flex;
    justify-content: space-between;
    color: #00ff00;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.atm-credit {
    display: flex;
    justify-content: space-between;
    color: #00ff00;
    font-size: 0.85rem;
    padding-top: 8px;
    border-top: 1px solid #00ff0033;
}

.atm-btn {
    display: block;
    background: #2d5a3d;
    color: white;
    text-align: center;
    padding: 10px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.atm-btn:hover {
    background: #3d7a4d;
}

/* =========================================
   STOCK TICKER
   ========================================= */
.stock-ticker {
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
    height: 36px;
}

.ticker-tape {
    display: flex;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.ticker-symbol {
    color: #64b5f6;
    font-weight: 600;
}

.ticker-price {
    color: #ffffff;
}

.ticker-change {
    font-weight: 700;
}

.ticker-change.up {
    color: #4caf50;
}

.ticker-change.down {
    color: #f44336;
}

/* =========================================
   WEATHER DATE DISPLAY
   ========================================= */
.weather-widget-date {
    background: rgba(0,0,0,0.3);
    padding: 12px 16px;
    text-align: center;
}

.date-day {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.date-full {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    margin-top: 2px;
}

.date-time {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
}

/* =========================================
   SOCIAL PAGE SPACING
   ========================================= */
.social-section {
    margin-bottom: 40px;
}

.social-section-title {
    margin-bottom: 20px;
}

.npc-grid {
    gap: 16px;
}

.npc-card-info {
    padding: 12px;
}

/* =========================================
   EVENTS FEED
   ========================================= */
.events-feed {
    margin-top: var(--space-lg);
}

.events-feed h3 {
    margin-bottom: var(--space-md);
}

.event-card {
    display: flex;
    gap: var(--space-md);
    background: var(--color-card);
    border-radius: 8px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border: 1px solid var(--color-border);
}

.event-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.event-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.event-content h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
}

.event-content p {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.event-responded {
    opacity: 0.6;
}

/* =========================================
   FINANCE PAGE
   ========================================= */
.finance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.finance-card {
    background: var(--color-card);
    border-radius: 8px;
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
}

.finance-card h3 {
    margin-bottom: var(--space-md);
    font-size: 1rem;
    color: var(--color-text-muted);
}

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

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

.finance-row.total {
    font-weight: 600;
    font-size: 1.1rem;
}

.positive { color: #2d5a3d; }
.negative { color: #cd5c5c; }

.credit-score-display {
    text-align: center;
    padding: var(--space-md);
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
}

.score-rating {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.finance-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* =========================================
   INVENTORY PAGE
   ========================================= */
.inventory-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    border-bottom: 2px solid var(--color-border);
}

.tab-btn {
    background: none;
    border: none;
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.item-card {
    background: var(--color-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.item-card.empty {
    opacity: 0.6;
}

.item-image {
    height: 150px;
    background: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-placeholder {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.item-info {
    padding: var(--space-md);
}

.item-info h3 {
    margin: 0 0 4px 0;
}

.item-type {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.asset-section {
    margin-bottom: var(--space-xl);
}

.asset-section h3 {
    margin-bottom: var(--space-md);
}

/* =========================================
   SKILLS PAGE
   ========================================= */
.skill-category {
    margin-bottom: var(--space-xl);
}

.skill-category h2 {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border);
}

.skills-list {
    display: grid;
    gap: var(--space-md);
}

.skill-card {
    background: var(--color-card);
    border-radius: 8px;
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.skill-header h3 {
    margin: 0;
}

.skill-level {
    background: var(--color-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.skill-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.skill-xp {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.xp-bar {
    flex: 1;
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 4px;
}

.xp-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* =========================================
   WELLNESS PAGE
   ========================================= */
.wellness-summary {
    background: var(--color-card);
    border-radius: 8px;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--color-border);
}

.effects-row {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.wellness-sections {
    display: grid;
    gap: var(--space-lg);
}

.wellness-card {
    background: var(--color-card);
    border-radius: 8px;
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
}

.wellness-card h2 {
    margin-bottom: var(--space-md);
}

.substance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.form-select-small {
    padding: 4px 8px;
    font-size: 0.85rem;
}

.traits-list {
    display: grid;
    gap: var(--space-md);
}

.trait-item {
    padding: var(--space-md);
    background: rgba(139, 69, 19, 0.05);
    border-radius: 6px;
}

.trait-name {
    font-weight: 600;
    display: block;
}

.trait-type {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* =========================================
   CENTERED CREATE ACTIONS
   ========================================= */
.create-actions.centered {
    display: flex;
    justify-content: center;
}

.credit-display {
    text-align: center;
    padding: 30px 0;
}

.credit-score-big {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
}

.credit-rating {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-top: 8px;
}

.credit-bar-container {
    max-width: 300px;
    margin: 20px auto 0;
}

.credit-bar-track {
    height: 10px;
    background: var(--color-border);
    border-radius: 5px;
    overflow: hidden;
}

.credit-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s;
}

.credit-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* ==================== ICON SYSTEM ==================== */
.icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    display: inline-block;
    object-fit: contain;
}

.icon-sm { width: 0.875em; height: 0.875em; }
.icon-md { width: 1.25em; height: 1.25em; }
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-xl { width: 2em; height: 2em; }
.icon-2xl { width: 2.5em; height: 2.5em; }
.icon-3xl { width: 3em; height: 3em; }
.icon-4xl { width: 4em; height: 4em; }

/* Icon in text - slight offset for alignment */
p .icon, span .icon, a .icon, li .icon, td .icon, th .icon, label .icon, button .icon {
    margin-right: 0.25em;
}
