/* rianIR Global Styles */

:root {
    /* Spacing & Sizes */
    --space-4: 4px;
    --space-5: 5px;
    --space-6: 6px;
    --space-8: 8px;
    --space-10: 10px;
    --space-12: 12px;
    --space-15: 15px;
    --space-20: 20px;
    --space-25: 25px;
    --space-30: 30px;
    --space-40: 40px;

    /* Text Sizes */
    --text-14: 14px;
    --text-16: 16px;
    --text-07em: 0.7em;
    --text-08em: 0.8em;
    --text-085em: 0.85em;
    --text-09em: 0.9em;
    --text-11em: 1.1em;
    --text-15em: 1.5em;

    /* Colors */
    --color-gold: #fbbf24;
    --color-blue: #60a5fa;
    --color-dark-gray: #4b5563;

    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --bg-table-header: #334155;
    --bg-table-row-even: #1e293b;
    --bg-table-row-hover: #334155;
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Clear Lamp Colors */
    --lamp-grey: #94a3b8;
    --lamp-purple: #c084fc;
    --lamp-green: #22c55e;
    --lamp-cyan: #06b6d4;
    --lamp-blue: #3b82f6;
    --lamp-red: #ef4444;
    --lamp-yellow: #facc15;

    /* Lamp Styles (for Daily Report etc.) */
    --lamp-bg-fc: linear-gradient(90deg, rgba(255,0,0,0.15), rgba(255,255,0,0.15), rgba(0,255,0,0.15), rgba(0,255,255,0.15), rgba(0,0,255,0.15), rgba(255,0,255,0.15));
    --lamp-bg-exh: rgba(251, 191, 36, 0.2);
    --lamp-bg-hard: rgba(239, 68, 68, 0.2);
    --lamp-bg-clear: rgba(59, 130, 246, 0.2);
    --lamp-bg-easy: rgba(34, 197, 94, 0.2);
    --lamp-bg-assist: rgba(192, 132, 252, 0.2);
    --lamp-bg-failed: rgba(107, 114, 128, 0.2);
    --lamp-bg-default: rgba(255, 255, 255, 0.1);

    /* Theme Colors (Purple) */
    --accent-purple: #a855f7;
    --accent-purple-hover: #9333ea;

    /* Theme Colors (Orange) */
    --accent-orange: #f59e0b;
    --accent-orange-hover: #d97706;

    /* Theme Colors (Green) */
    --accent-green: #10b981;
    --accent-green-hover: #059669;

    /* Theme Colors (Blue) */
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    /* Theme Colors (Gray) */
    --accent-gray: #64748b;
    --accent-gray-hover: #475569;
    --accent-gray-border: rgba(148, 163, 184, 0.2);

    /* Heatmap Default (Theme-aware) */
    --heatmap-base: rgba(255, 255, 255, 0.05);
    --heatmap-lv1: rgba(168, 85, 247, 0.2);
    --heatmap-lv2: rgba(168, 85, 247, 0.4);
    --heatmap-lv3: rgba(168, 85, 247, 0.7);
    --heatmap-lv4: rgba(168, 85, 247, 1.0);

    /* Theme Colors (Red) */
    --accent-red: #ef4444;
    --accent-red-hover: #dc2626;

    /* Theme Colors (Cyan) */
    --accent-cyan: #06b6d4;
    --accent-cyan-hover: #0891b2;

    /* Theme Colors (Pink) */
    --accent-pink: #ec4899;
    --accent-pink-hover: #db2777;

    /* Theme Colors (Yellow) */
    --accent-yellow: #eab308;
    --accent-yellow-hover: #ca8a04;

    /* Theme Colors (Indigo) */
    --accent-indigo: #6366f1;
    --accent-indigo-hover: #4f46e5;
}

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background: var(--bg-body); 
    color: var(--text-main); 
    padding: 20px; 
    margin: 0;
    line-height: 1.5;
}

a { 
    color: var(--accent); 
    text-decoration: none; 
    transition: all 0.2s; 
}

a:hover { 
    color: var(--accent-hover); 
}
.text-link {
    color: var(--accent);
    text-decoration: none;
}
.text-link:hover {
    text-decoration: underline;
}

h1 { 
    margin: 0; 
    font-size: 32px; 
    font-weight: 800; 
    letter-spacing: -0.025em; 
}

h2 { 
    font-size: 20px; 
    font-weight: 700; 
    margin-bottom: 15px; 
    border-left: 4px solid var(--accent); 
    padding-left: 12px; 
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Common Layout Components */

.header-card { 
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); /* Default blue gradient */
    color: white; 
    padding: 30px; 
    border-radius: 12px; 
    margin-bottom: 30px; 
    text-align: center; 
    position: relative; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}
.header-text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 1px rgba(0, 0, 0, 0.8);
}

.card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.user-stats-summary {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 10px 0 15px 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column; /* 縦並びに変更 */
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.stat-label {
    opacity: 0.8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
}

.stat-value-today {
    font-size: 11px;
    color: var(--lamp-green);
    font-weight: 600;
    margin-top: 2px;
    height: 1.2em; /* 確保しておく */
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent);
    color: white !important;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.warning-box {
    margin-top: 20px;
    padding: 15px;
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.nav-buttons { 
    margin-top: 20px; 
    display: flex; 
    justify-content: center; 
    gap: 10px; 
}

.nav-link { 
    background-color: rgba(255,255,255,0.1); 
    color: white; 
    padding: 10px 20px; 
    text-decoration: none; 
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 14px;
    transition: all 0.2s; 
    border: 1px solid rgba(255,255,255,0.1);
}

.nav-link:hover { 
    background-color: rgba(255,255,255,0.2); 
    transform: translateY(-1px); 
}

.top-nav-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-20);
}

.nav-logo {
    height: 32px;
    width: auto;
    display: block;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.8;
}

/* Table Design */

.table-container { 
    background-color: var(--bg-card); 
    border-radius: 12px; 
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
}

.centered-table {
    width: 100%;
}

@media (min-width: 1024px) {
    .centered-table {
        max-width: 80%;
    }
    
    /* セクション見出しも合わせるための汎用クラス */
    .centered-table-header {
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
}

table { 
    width: 100%; 
    border-collapse: collapse; 
}

th, td { 
    padding: 10px 1px; 
    text-align: center; 
    border-bottom: 1px solid var(--border-color); 
}

th { 
    background-color: var(--bg-table-header); 
    color: var(--text-dim); 
    font-size: 11px; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    font-weight: 700; 
}

tr:nth-child(even) { 
    background-color: var(--bg-table-row-even); 
}

tr:hover { 
    background-color: var(--bg-table-row-hover); 
}

/* Login Status */

.login-status { 
    font-size: 13px; 
    color: rgba(255, 255, 255, 0.7); 
}

.login-status a { 
    color: white; 
    text-decoration: underline; 
    font-weight: 600; 
    margin-left: 5px;
}

.login-status a:hover { 
    opacity: 0.8; 
}

/* Clear Lamp Classes */

.lamp { 
    font-weight: bold; 
    display: inline-block; 
}

.lamp-grey { color: var(--lamp-grey); }
.lamp-purple { color: var(--lamp-purple); }
.lamp-green { color: var(--lamp-green); }
.lamp-cyan { color: var(--lamp-cyan); }
.lamp-blue { color: var(--lamp-blue); }
.lamp-red { color: var(--lamp-red); }
.lamp-yellow { 
    color: var(--lamp-yellow); 
    text-shadow: 0 0 1px rgba(0,0,0,0.5); 
}

.lamp-rainbow { 
    background: linear-gradient(to right, #ff9999, #ffcc99, #ffff99, #ccff99, #99ffff, #99ccff, #cc99ff); 
    -webkit-background-clip: text; 
    background-clip: text;
    -webkit-text-fill-color: transparent; 
}

/* Utility / Misc */

.error { 
    color: #ef4444; 
    font-weight: bold; 
    text-align: center; 
    margin: 20px; 
    padding: 20px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--text-dim);
    font-size: 14px;
}

.back-link:hover {
    color: var(--accent);
}

.text-small-dim {
    font-size: 0.75em;
    font-weight: normal !important;
    opacity: 0.65;
}

/* Activity Feed Styles */
.activity-feed-container {
    margin-top: 20px;
    width: 100%;
    max-width: 800px;
}
.activity-feed {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}
.activity-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.85em;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 1.2em; width: 24px; text-align: center; }
.activity-content { flex: 1; line-height: 1.4; }
.activity-time { font-size: 0.8em; opacity: 0.5; margin-top: 2px; }
.activity-player { font-weight: bold; color: var(--accent-blue); }
.activity-song { font-weight: bold; color: #eee; }
.badge {
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.7em;
    text-transform: uppercase;
    font-weight: bold;
    margin-right: 5px;
    display: inline-block;
}
.badge-score { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-course { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.badge-trophy { background: rgba(234, 179, 8, 0.2); color: #facc15; }

/* Stats & Charts */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    margin-top: 30px;
}
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.chart-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    flex: 1;
    min-width: 300px;
}
.chart-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #eee;
}

/* Heatmap (Contributions-style) */
.heatmap-wrapper {
    overflow-x: auto;
    width: 100%;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.heatmap-layout {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.heatmap-days {
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    gap: 3px;
    padding-top: 25px; /* 月ラベルの高さ分 */
}
.heatmap-day-label {
    font-size: 9px;
    color: var(--text-dim);
    height: 11px;
    line-height: 11px;
}
.heatmap-main {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.heatmap-months {
    display: grid;
    grid-template-columns: repeat(53, 11px);
    gap: 3px;
    height: 20px;
    width: max-content;
}
.heatmap-month-label {
    font-size: 10px;
    color: var(--text-dim);
    white-space: nowrap;
}
.heatmap-container {
    display: grid;
    grid-template-columns: repeat(53, 11px);
    grid-template-rows: repeat(7, 11px);
    grid-auto-flow: column;
    gap: 3px;
    width: max-content;
}
.heatmap-cell {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    background: var(--heatmap-base);
    position: relative;
    transition: transform 0.1s;
}
.heatmap-cell:hover {
    transform: scale(1.3);
    z-index: 10;
    box-shadow: 0 0 8px rgba(255,255,255,0.2);
}
.heatmap-cell:hover::after {
    content: attr(data-info);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.5);
    margin-bottom: 5px;
}
.heatmap-lv0 { background: var(--heatmap-base); }
.heatmap-lv1 { background: var(--heatmap-lv1); }
.heatmap-lv2 { background: var(--heatmap-lv2); }
.heatmap-lv3 { background: var(--heatmap-lv3); }
.heatmap-lv4 { background: var(--heatmap-lv4); }

.heatmap-legend {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-size: 10px;
    color: var(--text-dim);
    width: 100%;
}
.legend-cell {
    width: 11px;
    height: 11px;
    border-radius: 2px;
}

/* Auth Pages Styles (Login / Signup) */

.auth-body {
    background: radial-gradient(circle at top right, #1e293b, #0f172a); 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.auth-card {
    background: rgba(30, 41, 59, 0.7); 
    backdrop-filter: blur(12px); 
    padding: 40px; 
    border-radius: 20px; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); 
    border: 1px solid rgba(255,255,255,0.1); 
    width: 100%; 
    max-width: 400px;
}
 
.auth-logo {
    display: block;
    margin: 0 auto var(--space-20);
    max-width: 200px;
    height: auto;
}

.auth-input {
    width: 100%; 
    padding: 12px 16px; 
    border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 8px; 
    background: rgba(255, 255, 255, 0.05); 
    color: #fff; 
    box-sizing: border-box; 
    font-size: 16px; 
    transition: all 0.2s;
}

.auth-input:focus {
    outline: none; 
    background: rgba(255,255,255,0.08); 
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); 
}

.auth-btn {
    width: 100%; 
    padding: 14px; 
    border: none; 
    border-radius: 8px; 
    background: var(--accent); 
    color: #fff; 
    font-size: 16px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.2s; 
    margin-top: 10px;
}

.auth-btn:hover {
    background: var(--accent-hover); 
    transform: translateY(-1px);
}

.auth-footer { 
    margin-top: 30px; 
    text-align: center; 
    font-size: 14px; 
    color: var(--text-dim); 
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.auth-footer a { 
    color: var(--accent); 
    text-decoration: none; 
    font-weight: 500; 
}

.auth-footer a:hover { 
    text-decoration: underline; 
}

/* Alert Messages */
.alert {
    padding: var(--space-12) var(--space-15);
    border-radius: 8px;
    margin-bottom: var(--space-20);
    font-size: 0.9em;
    line-height: 1.4;
    border: 1px solid transparent;
}
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}
.alert-error, .alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}
.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.2);
}
.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.auth-help-link {
    margin-top: 15px;
    text-align: center;
}
.auth-help-link a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85em;
}
.auth-help-link a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* Page Specific Header Themes */
.header-recent  { background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); }
.header-ranking { background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); }
.header-user    { background: linear-gradient(135deg, #4c1d95 0%, #2e1065 100%); }
.header-course  { background: linear-gradient(135deg, #065f46 0%, #064e3b 100%); }
.header-search  { background: linear-gradient(135deg, #b45309 0%, #78350f 100%); }

/* Link Utilities */
.link-table     { color: var(--accent) !important; font-weight: 700; }
.link-table:hover { text-decoration: underline; }
.link-search    { color: #f59e0b !important; font-weight: 700; }
.link-course    { color: #2ecc71 !important; font-weight: 700; }
.link-logout    { color: #ef4444 !important; font-weight: 700; }

/* Theme Purple Overrides */
.theme-purple {
    --accent: var(--accent-purple);
    --accent-hover: var(--accent-purple-hover);
}
.theme-purple a:not(.lamp-rainbow):not(.back-link):not(.nav-link):not(.button):not(.rival-btn):not(.btn):not(.auth-btn) {
    color: var(--accent-purple);
}
.theme-purple .link-table {
    color: var(--accent-purple) !important;
}

/* Theme Orange Overrides */
.theme-orange {
    --accent: var(--accent-orange);
    --accent-hover: var(--accent-orange-hover);
}
.theme-orange a:not(.lamp-rainbow):not(.back-link):not(.nav-link):not(.button):not(.rival-btn):not(.btn):not(.auth-btn) {
    color: var(--accent-orange);
}
.theme-orange .link-table {
    color: var(--accent-orange) !important;
}

/* Theme Green Overrides */
.theme-green {
    --accent: var(--accent-green);
    --accent-hover: var(--accent-green-hover);
}
.theme-green a:not(.lamp-rainbow):not(.back-link):not(.nav-link):not(.button):not(.rival-btn):not(.btn):not(.auth-btn) {
    color: var(--accent-green);
}
.theme-green .link-table {
    color: var(--accent-green) !important;
}

/* Theme Blue Overrides */
.theme-blue {
    --accent: var(--accent-blue);
    --accent-hover: var(--accent-blue-hover);
}
.theme-blue a:not(.lamp-rainbow):not(.back-link):not(.nav-link):not(.button):not(.rival-btn):not(.btn):not(.auth-btn) {
    color: var(--accent-blue);
}
.theme-blue .link-table {
    color: var(--accent-blue) !important;
}

/* Theme Red Overrides */
.theme-red {
    --accent: var(--accent-red);
    --accent-hover: var(--accent-red-hover);
}
.theme-red a:not(.lamp-rainbow):not(.back-link):not(.nav-link):not(.button):not(.rival-btn):not(.btn):not(.auth-btn) {
    color: var(--accent-red);
}
.theme-red .link-table {
    color: var(--accent-red) !important;
}

/* Theme Cyan Overrides */
.theme-cyan {
    --accent: var(--accent-cyan);
    --accent-hover: var(--accent-cyan-hover);
}
.theme-cyan a:not(.lamp-rainbow):not(.back-link):not(.nav-link):not(.button):not(.rival-btn):not(.btn):not(.auth-btn) {
    color: var(--accent-cyan);
}
.theme-cyan .link-table {
    color: var(--accent-cyan) !important;
}

/* Theme Pink Overrides */
.theme-pink {
    --accent: var(--accent-pink);
    --accent-hover: var(--accent-pink-hover);
}
.theme-pink a:not(.lamp-rainbow):not(.back-link):not(.nav-link):not(.button):not(.rival-btn):not(.btn):not(.auth-btn) {
    color: var(--accent-pink);
}
.theme-pink .link-table {
    color: var(--accent-pink) !important;
}

/* Theme Yellow Overrides */
.theme-yellow {
    --accent: var(--accent-yellow);
    --accent-hover: var(--accent-yellow-hover);
}
.theme-yellow a:not(.lamp-rainbow):not(.back-link):not(.nav-link):not(.button):not(.rival-btn):not(.btn):not(.auth-btn) {
    color: var(--accent-yellow);
}
.theme-yellow .link-table {
    color: var(--accent-yellow) !important;
}

/* Theme Indigo Overrides */
.theme-indigo {
    --accent: var(--accent-indigo);
    --accent-hover: var(--accent-indigo-hover);
}
.theme-indigo a:not(.lamp-rainbow):not(.back-link):not(.nav-link):not(.button):not(.rival-btn):not(.btn):not(.auth-btn) {
    color: var(--accent-indigo);
}
.theme-indigo .link-table {
    color: var(--accent-indigo) !important;
}

/* Ranking Specific */
.rank-1 { background-color: rgba(251, 191, 36, 0.1) !important; }
.rank-2 { background-color: rgba(148, 163, 184, 0.1) !important; }
.rank-3 { background-color: rgba(180, 83, 9, 0.1) !important; }

/* Subtitle / Meta */
.subtitle { margin-top: 10px; color: rgba(255,255,255,0.7); font-weight: 500; font-size: 14px; }

/* Search Page Specific */
.search-container { 
    max-width: 600px; 
    margin: 0 auto 40px auto; 
    background: var(--bg-card); 
    padding: 30px; 
    border-radius: 12px; 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}
.search-input { 
    width: 100%; 
    padding: 14px 20px; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    background: rgba(255, 255, 255, 0.05); 
    color: white; 
    font-size: 16px; 
    box-sizing: border-box;
    transition: all 0.2s;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-button { 
    width: 100%; 
    padding: 14px; 
    background: var(--accent); 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-weight: 700; 
    font-size: 16px; 
    cursor: pointer; 
    margin-top: 15px;
    transition: all 0.2s;
}
.search-button:hover { background: var(--accent-hover); transform: translateY(-1px); }

.result-section { 
    max-width: 1000px;
    margin: 0 auto 40px auto;
    text-align: center;
}
.result-section h2 {
    border-left: none;
    padding-left: 0;
}
.result-list { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, 280px); 
    gap: 15px; 
    justify-content: center;
    padding: 0;
    list-style: none;
}
.no-result { text-align: center; color: var(--text-dim); }
.result-item { 
    background: var(--bg-card); 
    padding: 15px 20px; 
    border-radius: 10px; 
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.result-item:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--bg-table-row-hover); }

/* Settings / Form Specific */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; color: var(--text-dim); font-size: 14px; }
.form-input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    background: rgba(255, 255, 255, 0.05); 
    color: white; 
    box-sizing: border-box;
    font-size: 16px;
}
.form-input option {
    background-color: var(--bg-card);
    color: white;
}
.form-input:focus { outline: none; border-color: var(--accent); }

.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; font-size: 14px; text-align: center; }
.alert-success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.alert-error { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }

/* User Page Specific */
.rival-btn { 
    padding: 10px 20px; 
    border-radius: 8px; 
    border: none; 
    font-weight: 700; 
    font-size: 14px;
    cursor: pointer; 
    transition: all 0.2s; 
    margin-top: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}
.rival-btn.add { background-color: var(--accent); color: white; }
.rival-btn.remove { background-color: #ef4444; color: white; }

.rival-section { display: flex; gap: 20px; margin-bottom: 40px; justify-content: center; flex-wrap: wrap; }
.rival-list-box { 
    background: var(--bg-card); 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2); 
    width: 240px; 
    border: 1px solid var(--border-color);
}
.rival-list-box h3 { 
    margin-top: 0; font-size: 16px; font-weight: 700; color: var(--text-main);
    border-bottom: 2px solid var(--accent); padding-bottom: 8px; 
}
.rival-list-box ul { padding: 0; list-style: none; margin: 15px 0 0 0; }
.rival-list-box li { padding: 8px 0; border-bottom: 1px solid var(--border-color); font-size: 13px; }

/* Comment Styles */
.comment-row td {
    border-top: none !important;
    padding-top: 2px !important;
    padding-bottom: 8px !important;
}

.comment-cell {
    font-size: 15px;
    color: #ffffff;
    text-align: left !important;
    background: rgba(168, 85, 247, 0.05); /* Default purple tint */
    border-left: 4px solid var(--accent);
    line-height: 1.6;
}

.theme-purple .comment-cell { background: rgba(168, 85, 247, 0.05); }
.theme-orange .comment-cell { background: rgba(245, 158, 11, 0.05); }
.theme-green .comment-cell  { background: rgba(16, 185, 129, 0.05); }
.theme-blue .comment-cell   { background: rgba(59, 130, 246, 0.05); }

.editable-comment {
    cursor: pointer;
    transition: all 0.2s;
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 1.6em;
}
.editable-comment:hover {
    color: var(--accent);
    background: rgba(168, 85, 247, 0.1);
}
.editable-comment input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--accent);
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    padding: 2px 0;
    outline: none;
    box-sizing: border-box;
}
.static-comment {
    opacity: 0.9;
    display: block;
}

/* Theme Classes */
.theme-purple .header-card { background: linear-gradient(135deg, #6b21a8 0%, #4c1d95 100%); --accent: var(--accent-purple); --accent-hover: var(--accent-purple-hover); }
.theme-purple {
    --heatmap-lv1: rgba(168, 85, 247, 0.25);
    --heatmap-lv2: rgba(168, 85, 247, 0.5);
    --heatmap-lv3: rgba(168, 85, 247, 0.75);
    --heatmap-lv4: rgba(168, 85, 247, 1.0);
    --header-overlay: rgba(107, 33, 168, 0.6);
}
.theme-orange .header-card { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); --accent: var(--accent-orange); --accent-hover: var(--accent-orange-hover); }
.theme-orange {
    --heatmap-lv1: rgba(245, 158, 11, 0.25);
    --heatmap-lv2: rgba(245, 158, 11, 0.5);
    --heatmap-lv3: rgba(245, 158, 11, 0.75);
    --heatmap-lv4: rgba(245, 158, 11, 1.0);
    --header-overlay: rgba(180, 83, 9, 0.6);
}
.theme-green .header-card { background: linear-gradient(135deg, #059669 0%, #064e3b 100%); --accent: var(--accent-green); --accent-hover: var(--accent-green-hover); }
.theme-green {
    --heatmap-lv1: rgba(16, 185, 129, 0.25);
    --heatmap-lv2: rgba(16, 185, 129, 0.5);
    --heatmap-lv3: rgba(16, 185, 129, 0.75);
    --heatmap-lv4: rgba(16, 185, 129, 1.0);
    --header-overlay: rgba(6, 78, 59, 0.6);
}
.theme-blue .header-card { background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); --accent: var(--accent-blue); --accent-hover: var(--accent-blue-hover); }
.theme-blue {
    --heatmap-lv1: rgba(59, 130, 246, 0.25);
    --heatmap-lv2: rgba(59, 130, 246, 0.5);
    --heatmap-lv3: rgba(59, 130, 246, 0.75);
    --heatmap-lv4: rgba(59, 130, 246, 1.0);
    --header-overlay: rgba(30, 58, 138, 0.6);
}

.theme-red .header-card { background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%); --accent: var(--accent-red); --accent-hover: var(--accent-red-hover); }
.theme-red {
    --heatmap-lv1: rgba(239, 68, 68, 0.25);
    --heatmap-lv2: rgba(239, 68, 68, 0.5);
    --heatmap-lv3: rgba(239, 68, 68, 0.75);
    --heatmap-lv4: rgba(239, 68, 68, 1.0);
    --header-overlay: rgba(153, 27, 27, 0.6);
}

.theme-cyan .header-card { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); --accent: var(--accent-cyan); --accent-hover: var(--accent-cyan-hover); }
.theme-cyan {
    --heatmap-lv1: rgba(6, 182, 212, 0.25);
    --heatmap-lv2: rgba(6, 182, 212, 0.5);
    --heatmap-lv3: rgba(6, 182, 212, 0.75);
    --heatmap-lv4: rgba(6, 182, 212, 1.0);
    --header-overlay: rgba(8, 145, 178, 0.6);
}

.theme-pink .header-card { background: linear-gradient(135deg, #ec4899 0%, #9d174d 100%); --accent: var(--accent-pink); --accent-hover: var(--accent-pink-hover); }
.theme-pink {
    --heatmap-lv1: rgba(236, 72, 153, 0.25);
    --heatmap-lv2: rgba(236, 72, 153, 0.5);
    --heatmap-lv3: rgba(236, 72, 153, 0.75);
    --heatmap-lv4: rgba(236, 72, 153, 1.0);
    --header-overlay: rgba(157, 23, 77, 0.6);
}

.theme-yellow .header-card { background: linear-gradient(135deg, #eab308 0%, #854d0e 100%); --accent: var(--accent-yellow); --accent-hover: var(--accent-yellow-hover); }
.theme-yellow {
    --heatmap-lv1: rgba(234, 179, 8, 0.25);
    --heatmap-lv2: rgba(234, 179, 8, 0.5);
    --heatmap-lv3: rgba(234, 179, 8, 0.75);
    --heatmap-lv4: rgba(234, 179, 8, 1.0);
    --header-overlay: rgba(133, 77, 14, 0.6);
}

.theme-indigo .header-card { background: linear-gradient(135deg, #6366f1 0%, #3730a3 100%); --accent: var(--accent-indigo); --accent-hover: var(--accent-indigo-hover); }
.theme-indigo {
    --heatmap-lv1: rgba(99, 102, 241, 0.25);
    --heatmap-lv2: rgba(99, 102, 241, 0.5);
    --heatmap-lv3: rgba(99, 102, 241, 0.75);
    --heatmap-lv4: rgba(99, 102, 241, 1.0);
    --header-overlay: rgba(55, 48, 163, 0.6);
}
.theme-gray .header-card { background: linear-gradient(135deg, #475569 0%, #1e293b 100%); --accent: var(--accent-gray); --accent-hover: var(--accent-gray-hover); }
.theme-gray {
    --heatmap-lv1: rgba(148, 163, 184, 0.3);
    --heatmap-lv2: rgba(148, 163, 184, 0.5);
    --heatmap-lv3: rgba(148, 163, 184, 0.7);
    --heatmap-lv4: rgba(148, 163, 184, 1.0);
    --header-overlay: rgba(30, 41, 59, 0.6);
}

.theme-purple h2 { border-left-color: var(--accent-purple); }
.theme-orange h2 { border-left-color: var(--accent-orange); }
.theme-green h2 { border-left-color: var(--accent-green); }
.theme-blue h2 { border-left-color: var(--accent-blue); }
.theme-gray h2 { border-left-color: var(--accent-gray); }
.theme-red h2 { border-left-color: var(--accent-red); }
.theme-cyan h2 { border-left-color: var(--accent-cyan); }
.theme-pink h2 { border-left-color: var(--accent-pink); }
.theme-yellow h2 { border-left-color: var(--accent-yellow); }
.theme-indigo h2 { border-left-color: var(--accent-indigo); }

/* Admin Panel Components */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.table-card {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.theme-gray .table-header h2 { color: #94a3b8; border: none; padding: 0; }
.theme-blue .table-header h2 { color: #38bdf8; border: none; padding: 0; }

.folder-card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.theme-gray .folder-header h3 { color: #cbd5e1; margin: 0; }
.theme-blue .folder-header h3 { color: #a78bfa; margin: 0; }

.chart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.chart-table th, .chart-table td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}

.chart-table th {
    color: var(--text-dim);
    font-weight: normal;
}

.hash-text {
    font-family: monospace;
    font-size: 0.85em;
    opacity: 0.7;
}

/* Modal Components */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 25px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-header {
    color: #fbbf24;
    margin-bottom: 20px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.modal-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-badge {
    font-size: 0.8em;
    color: #fff;
    background: rgba(255, 215, 0, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.list-flex-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Rating List Items (Generated by JS) */
.rating-item {
    display: grid;
    grid-template-columns: 30px 1fr 75px 80px 80px;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.9em;
    color: #e2e8f0;
}

.rating-item-header {
    background: rgba(255, 255, 255, 0.1);
    font-weight: bold;
    color: var(--text-dim);
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 10px;
}

.rating-item-header .rating-item-title {
    color: var(--text-dim);
    text-align: left;
}

.rating-item-rank {
    color: #64748b;
    font-weight: bold;
}

.rating-item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    line-height: 1.2;
}

.rating-item-subtitle {
    color: #94a3b8;
    font-size: 0.85em;
    font-weight: normal;
}

.rating-item-nps {
    color: #94a3b8;
    text-align: right;
    font-family: monospace;
}

.rating-item-acc {
    color: #94a3b8;
    text-align: right;
    font-weight: normal;
}

.rating-item-value {
    color: #fbbf24;
    text-align: right;
    font-weight: 900;
    font-family: 'Consolas', monospace;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

/* User Page Specific UI */
.rating-box {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-box:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.6);
}

.rating-box.non-clickable {
    cursor: default;
}

.rating-box.non-clickable:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: none;
    border-color: rgba(255, 215, 0, 0.3);
}

.rating-label {
    font-size: 0.9em;
    color: #fbbf24;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.rating-value {
    font-size: 1.8em;
    font-weight: 800;
    color: #fff;
    font-family: 'Consolas', monospace;
}

.trophy-badge {
    font-size: 0.5em;
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Home Page Layout */
.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
    gap: 20px;
    padding-bottom: 40px;
}

.section-card {
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    text-align: left;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.section-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-content {
    padding: 20px;
    font-size: 14px;
}

.modal-content {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 { margin: 0; }

.close-btn {
    background: none; border: none; color: white;
    font-size: 1.5em; cursor: pointer; opacity: 0.7;
}

.close-btn:hover { opacity: 1; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; opacity: 0.8; font-size: 0.9em; }

.form-control {
    width: 100%; padding: 10px; border-radius: 4px;
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.8); color: white;
    font-family: inherit; box-sizing: border-box;
}

.search-results {
    max-height: 400px; overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px; margin-top: 10px;
    background: rgba(0,0,0,0.2);
}

.search-item:hover { background: rgba(59, 130, 246, 0.3); }
.search-title { font-weight: bold; }
.search-artist { font-size: 0.85em; opacity: 0.7; }

/* Search Table Styles */
.search-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.search-table th {
    position: sticky;
    top: 0;
    background: #1e293b;
    padding: 10px 12px;
    text-align: left;
    color: var(--text-dim);
    border-bottom: 2px solid var(--accent);
    z-index: 10;
}

.search-row {
    cursor: pointer;
    transition: background 0.1s;
}

.search-row:hover {
    background: rgba(59, 130, 246, 0.2) !important;
}

.search-row td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.search-level {
    font-weight: bold;
    color: var(--accent);
    text-align: center !important;
}

/* Source Badges */
.badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-mysql {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-sqlite {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Dashboard Widgets */
.btn-danger { background: #ef4444; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: #10b981; }
.btn-success:hover { background: #059669; }

#loading { text-align: center; padding: 40px; opacity: 0.5; }

/* =========================================
   Utility Classes
   ========================================= */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.d-flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.gap-5 { gap: 5px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }

.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-5 { margin-bottom: 5px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-25 { margin-bottom: 25px; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mr-10 { margin-right: 10px; }
.mx-5 { margin: 0 5px; }
.mx-10 { margin: 0 10px; }

.p-5 { padding: 5px; }
.p-10 { padding: 10px; }
.p-15 { padding: 15px; }
.p-20 { padding: 20px; }
.p-25 { padding: 25px; }

.w-40 { width: 40px; }
.w-60 { width: 60px; }
.w-80 { width: 80px; }
.w-100 { width: 100px; }
.w-120 { width: 120px; }
.w-150 { width: 150px; }
.inline-block { display: inline-block; }
.d-none { display: none; }
.d-block { display: block; }
.font-bold { font-weight: bold; }
.font-normal { font-weight: normal; }
.font-mono { font-family: monospace; }
.text-accent { color: var(--accent); }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }
.page-title { font-size: 28px; margin: 0; }
.login-status-nav { position: static; font-size: 13px; }

/* =========================================
   Admin Pages
   ========================================= */

/* admin.php */
.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.admin-menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.admin-menu-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.05);
}
.admin-menu-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-menu-desc {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* admin_courses.php */
.course-card { background: rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 20px; margin-bottom: 25px; border: 1px solid rgba(255, 255, 255, 0.1); }
.song-slot { display: flex; align-items: center; gap: 10px; padding: 10px; background: rgba(0,0,0,0.2); border-radius: 6px; margin-bottom: 8px; }
.slot-no { width: 30px; font-weight: bold; color: var(--accent); }
.slot-info { flex: 1; font-size: 14px; }
.slot-actions { display: flex; gap: 5px; }
.badge-dan { background: #e74c3c; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; }

/* admin_news.php */
.news-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}
.news-date {
    font-size: 14px;
    color: var(--text-dim);
}
.news-body {
    line-height: 1.6;
    margin: 10px 0;
    white-space: pre-wrap;
}
.news-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.news-status {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}
.status-public { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.status-private { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* admin_scores.php */
.score-row-abnormal {
    background-color: rgba(239, 68, 68, 0.1) !important;
}
.abnormal-reason {
    color: #ef4444;
    font-size: 0.85em;
    font-weight: bold;
    display: block;
}
.score-type-badge {
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 3px;
    text-transform: uppercase;
}
.type-normal { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.type-course { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }

/* admin_stats.php */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-dim);
}
.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent);
    margin: 10px 0;
}
.stat-card .stat-desc {
    font-size: 12px;
    color: var(--text-dim);
}

/* Common Components */
.info-panel {
    background: rgba(255,255,255,0.05);
    border-left: 4px solid var(--accent);
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}
.info-panel-warning { border-left-color: #f59e0b; }
.w-150 { width: 150px; }
.inline-block { display: inline-block; }
.fs-0-8 { font-size: 0.8em; }
.fs-0-85 { font-size: 0.85em; }
.fs-0-9 { font-size: 0.9em; }
.fs-1-1 { font-size: 1.1em; }
.text-success { color: #10b981; }
.text-danger { color: #ef4444; }

.search-results-placeholder { padding: 10px; opacity: 0.6; }

/* Stats Enhancements */
.stat-sub {
    font-size: 11px;
    margin-top: -5px;
    margin-bottom: 5px;
    opacity: 0.8;
}
.text-accent { color: var(--accent); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.mt-15 { margin-top: 15px; }
.pb-5 { padding-bottom: 5px; }
.opacity-80 { opacity: 0.8; }
.text-sm { font-size: 0.85em; }

/* =========================================
   Responsive Design
   ========================================= */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container, .admin-container {
        padding: 0 10px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 18px;
    }

    .header-card {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .card {
        padding: 15px;
    }

    .nav-buttons {
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 8px 16px;
        font-size: 13px;
        flex: 1 1 calc(50% - 10px);
        text-align: center;
    }

    th, td {
        padding: 10px 8px;
        font-size: 13px;
    }

    /* user.php specific */
    .rival-section {
        flex-direction: column;
        align-items: center;
    }

    .rival-list-box {
        width: 100%;
        max-width: 300px;
    }

    .comment-cell {
        font-size: 14px;
    }

    /* admin specific */
    .admin-menu-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 15px;
        width: 98%;
    }
}

@media (max-width: 480px) {
    .nav-link {
        flex: 1 1 100%;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Score/Ranking Utilities
   ========================================= */
.text-pgreat { color: #f39c12; font-weight: bold; }
.text-great { color: #e67e22; font-weight: bold; }
.text-good-bad { font-size: 0.9em; opacity: 0.9; }
.text-min-bp { color: #ef4444; font-weight: bold; }
.text-date { font-size: 0.9em; color: #7f8c8d; }

.btn-delete {
    margin-left: 10px;
    padding: 2px 16px;
    font-size: 11px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.8;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.btn-delete:hover {
    opacity: 1;
}

/* Difficulty Rating Styles */
.rating-badge {
    background: #fbbf24;
    color: #000;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 800;
    margin-right: 6px;
    display: inline-block;
}

.auth-card .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dim);
    font-size: 14px;
}

.editable-comment:hover {
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    border-radius: 4px;
}

/* Modal text input enhancement */
.auth-card input[type="number"] {
    font-family: inherit;
    font-size: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    width: 100%;
    box-sizing: border-box;
}

.auth-card input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
}

/* Rainbow Title Animation */
.shogo-rainbow {
    background: linear-gradient(
        to right, 
        #ff2400, #e81d1d, #e8b21d, #e3e81d, #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shogo-rainbow-animation 3s linear infinite;
    font-weight: bold;
}

@keyframes shogo-rainbow-animation {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Lamp Style Classes for Daily Report & Lists */
.lamp-style-fc {
    background: var(--lamp-bg-fc);
    color: #fff;
}
.lamp-style-exh {
    background: var(--lamp-bg-exh);
    color: var(--color-gold);
}
.lamp-style-hard {
    background: var(--lamp-bg-hard);
    color: #fca5a5;
}
.lamp-style-clear {
    background: var(--lamp-bg-clear);
    color: #93c5fd;
}
.lamp-style-easy {
    background: var(--lamp-bg-easy);
    color: #86efac;
}
.lamp-style-assist {
    background: var(--lamp-bg-assist);
    color: #d8b4fe;
}
.lamp-style-failed {
    background: var(--lamp-bg-failed);
}
.lamp-style-default {
    background: var(--lamp-bg-default);
}

/* Profile Comment Display */
.profile-comment-section {
    margin-top: var(--space-15);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.profile-comment-box {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--space-12) var(--space-20);
    border-radius: var(--radius-lg);
    font-size: var(--text-095em);
    line-height: 1.6;
    position: relative;
    word-break: break-all;
}

#profile-comment-display {
    white-space: pre-wrap;
}

.profile-comment-box .empty-text {
    opacity: 0.3;
    font-style: italic;
}

.profile-comment-edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--color-blue);
    cursor: pointer;
    font-size: 18px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.profile-comment-edit-btn:hover {
    opacity: 1.0;
}

/* Modal UI Enhancements */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-content-card {
    background: var(--bg-card);
    width: 90%;
    max-width: 600px;
    padding: var(--space-30);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-10);
    margin-top: var(--space-20);
}
