:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #007bff;
    --accent-glow: rgba(0, 123, 255, 0.3);
    --danger: #ff4d4d;
    --success: #00cc66;
    --warning: #ffa500;
    /* Orange for flash info */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-weight: 300;
}

/* --- DASHBOARD LAYOUT --- */
.dashboard-container {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    /* Allow growing if needed */
}

/* Top Bar */
.top-bar {
    display: flex;
    background-color: var(--warning);
    height: 60px;
    /* Adjust height based on logo usually */
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.logo-container {
    background-color: #fff;
    /* White bg for logo if transparent? Or just fits better */
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.logo-img {
    max-height: 50px;
    width: auto;
}

/* Flash Info Banner */
.flash-banner {
    flex-grow: 1;
    background-color: var(--warning);
    color: #000;
    overflow: hidden;
    white-space: nowrap;
    font-weight: bold;
    font-size: 1.2rem;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    min-width: 0;
    /* Fix for flexbox overflow */
}

.flash-content {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 20s linear infinite;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Main Content Area */
.main-content {
    padding: 20px;
    display: grid;
    grid-template-columns: 3fr 1fr;
    /* Planning vs Sidebar/History */
    gap: 20px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

/* --- TIMELINE COMPONENTS --- */
.timeline-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.timeline-header {
    display: flex;
    height: 40px;
    border-bottom: 1px solid #444;
    background: #252525;
}

.timeline-header-bench {
    width: 150px;
    flex-shrink: 0;
    border-right: 1px solid #444;
    padding: 10px;
    font-weight: bold;
    color: #ccc;
}

.timeline-dates {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

.timeline-date-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    font-size: 0.8rem;
    padding-left: 5px;
    border-left: 1px solid #333;
    color: #888;
}

.timeline-body {
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
}

.timeline-row {
    display: flex;
    height: 60px;
    border-bottom: 1px solid #333;
    position: relative;
}

.timeline-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.timeline-bench-name {
    width: 150px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-left: 10px;
    border-right: 1px solid #444;
    font-weight: bold;
    background: #1e1e1e;
    /* Sticky look context */
    z-index: 10;
}

.timeline-track {
    flex-grow: 1;
    position: relative;
}

.timeline-bar {
    position: absolute;
    height: 40px;
    top: 10px;
    background-color: var(--accent);
    border-radius: 6px;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 40px;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-bar:hover {
    z-index: 20;
    opacity: 1;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.current-time-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: red;
    z-index: 50;
    pointer-events: none;
}


.flash-history-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    word-break: break-word;
    /* Prevent overflow */
}

/* --- ADMIN LAYOUT --- */
.admin-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
}

.admin-section {
    margin-bottom: 40px;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background-color: #2c2c2c;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="color"] {
    padding: 0;
    border: none;
    height: 40px;
    cursor: pointer;
    background: none;
    /* Let the swatch show */
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
    border: 1px solid #555;
    /* Subtle border to see black colors */
}

button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

button:hover {
    background-color: #0056b3;
}

button.delete-btn {
    background-color: var(--danger);
    padding: 5px 10px;
    font-size: 0.8rem;
    margin-left: 10px;
}

button.delete-btn:hover {
    background-color: #cc0000;
}

/* List styles for Admin */
.admin-list {
    margin-top: 20px;
}

.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a2a2a;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
}

/* ... previous code ... */

/* TOOLTIP */
.custom-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    pointer-events: none;
    display: none;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
}

/* RSS Feeds */
.rss-section {
    grid-column: 1 / -1;
    /* Full width if grid allows, or just below planning */
    margin-top: 20px;
}

.rss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.rss-card {
    background: #252525;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    border: 1px solid #444;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
}

.rss-card:hover {
    transform: translateY(-3px);
    background: #333;
    border-color: var(--accent);
}

.rss-source {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 5px;
    font-weight: bold;
}

.rss-title {
    font-size: 1rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.rss-date {
    font-size: 0.8rem;
    color: #888;
    margin-top: auto;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f0f13;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-box {
    background: #1e1e24;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    border: 1px solid #333;
}

.login-box h2 {
    margin-top: 0;
    color: var(--text-primary);
}

.login-box input {
    display: block;
    width: 200px;
    padding: 10px;
    margin: 15px auto;
    border-radius: 6px;
    border: 1px solid #444;
    background: #2a2a32;
    color: white;
    font-size: 1rem;
}

.login-box button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

.login-box button:hover {
    background: #4ec2ff;
}