/* Global Variables & Reset - Gruvbox Theme */
:root {
    --bg-primary: #1d2021;
    --bg-secondary: #282828;
    --bg-widget: #3c3836;
    --text-primary: #ebdbb2;
    --text-secondary: #a89984;
    --accent-primary: #d79921;
    --accent-secondary: #fe8019;
    --border-color: #504945;
    --positive: #b8bb26;
    --negative: #fb4934;
    --warning: #fabd2f;
    --shadow: rgba(0, 0, 0, 0.4);
    --gruvbox-red: #cc241d;
    --gruvbox-green: #98971a;
    --gruvbox-blue: #458588;
    --gruvbox-purple: #b16286;
    --gruvbox-aqua: #689d6a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 14px;
}

/* Container */
.content-bounds {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    height: 45px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left svg {
    color: var(--accent-primary);
}

.header-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.header-time {
    text-align: right;
}

#current-time {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

#current-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
    text-transform: uppercase;
}

/* Page Columns Layout - Glance Style */
.page-columns {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.page-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-column-small {
    width: 300px;
    flex-shrink: 0;
}

.page-column-full {
    flex: 1;
    min-width: 0;
}

/* Widget Styles */
.widget {
    background: var(--bg-widget);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.widget-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.widget-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.widget-content {
    padding: 16px;
}

/* Clock Widget */
.clock-widget {
    text-align: center;
    padding: 20px 0;
}

.clock-time {
    font-size: 3rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.clock-date {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Calendar Widget */
.calendar-month {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background 0.2s ease;
    cursor: pointer;
}

.calendar-day:hover {
    background: var(--border-color);
}

.calendar-day.today {
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-weight: 600;
}

.calendar-day.inactive {
    opacity: 0.3;
}

/* Weather Widget */
.weather-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.weather-icon {
    font-size: 2.5rem;
}

.weather-temp {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weather-detail {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.weather-detail span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* List Styles (for RSS/Reddit widgets) */
.list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border-left: 2px solid var(--border-color);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.list-item:hover {
    border-left-color: var(--accent-primary);
    background: var(--bg-primary);
}

.list-item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.list-item-title {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

.list-item-title:hover {
    color: var(--accent-primary);
}

.list-item-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.list-item-meta span::after {
    content: '•';
    margin-left: 12px;
    color: var(--border-color);
}

.list-item-meta span:last-child::after {
    content: '';
    margin-left: 0;
}

.list-item-points {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Bookmarks Widget */
.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.bookmark-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-secondary);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s ease, transform 0.2s ease;
}

.bookmark-item:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.bookmark-icon {
    font-size: 1.5rem;
}

.bookmark-name {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

/* Stats Widget */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.stat-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Notes Widget */
#notes {
    width: 100%;
    min-height: 150px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    resize: vertical;
    outline: none;
}

#notes:focus {
    border-color: var(--accent-primary);
}

#notes::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Responsive Design */
@media (max-width: 1100px) {
    .page-columns {
        flex-direction: column;
    }

    .page-column-small,
    .page-column-full {
        width: 100%;
    }

    .header-time {
        display: none;
    }
}

@media (max-width: 768px) {
    .content-bounds {
        padding: 0 12px;
    }

    .header {
        padding: 16px 0;
    }

    .header-title {
        font-size: 1.2rem;
    }

    .bookmarks-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .widget-content {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .header-left svg {
        width: 24px;
        height: 24px;
    }

    .clock-time {
        font-size: 2.5rem;
    }

    .bookmarks-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .bookmark-item {
        padding: 10px 6px;
    }

    .bookmark-icon {
        font-size: 1.3rem;
    }

    .bookmark-name {
        font-size: 0.7rem;
    }
}
