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

html {
    height: var(--vh, 100vh) !important;
    min-height: var(--vh, 100vh) !important;
    max-height: var(--vh, 100vh) !important;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-sizing: border-box;
}

:root {
    --bg-overlay-dark: rgba(0, 0, 0, 0.65);
    --bg-overlay-light: rgba(255, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.95);
    --text-tertiary: rgba(255, 255, 255, 0.7);
    --widget-bg: rgba(255, 255, 255, 0.05);
    --widget-bg-hover: rgba(255, 255, 255, 0.08);
    --widget-border: rgba(255, 255, 255, 0.18);
    --event-bg: rgba(255, 255, 255, 0.08);
    --event-bg-hover: rgba(255, 255, 255, 0.12);
    --event-bg-active: rgba(255, 255, 255, 0.15);
}

body.light-mode {
    --bg-overlay-dark: rgba(255, 255, 255, 0.3);
    --bg-overlay-light: rgba(255, 255, 255, 0.5);
    --text-primary: #1a1a1a;
    --text-secondary: rgba(26, 26, 26, 0.95);
    --text-tertiary: rgba(26, 26, 26, 0.7);
    --widget-bg: rgba(255, 255, 255, 0.7);
    --widget-bg-hover: rgba(255, 255, 255, 0.8);
    --widget-border: rgba(0, 0, 0, 0.1);
    --event-bg: rgba(255, 255, 255, 0.6);
    --event-bg-hover: rgba(255, 255, 255, 0.75);
    --event-bg-active: rgba(255, 255, 255, 0.85);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    height: var(--vh, 100vh) !important; /* Use JavaScript-calculated height */
    min-height: var(--vh, 100vh) !important;
    max-height: var(--vh, 100vh) !important;
    overflow-x: hidden;
    overflow-y: hidden;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: var(--text-primary);
    padding: 0 !important;
    margin: 0 !important;
    transition: background 1s ease-in-out, color 0.3s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: var(--vh, 100vh) !important;
    min-height: var(--vh, 100vh) !important;
    max-height: var(--vh, 100vh) !important;
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
    transition: background-image 1s ease-in-out;
    margin: 0 !important;
    padding: 0 !important;
}

.background-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay-dark);
    backdrop-filter: blur(0.5px);
    z-index: 1;
    transition: background 0.3s ease;
}

/* Theme Toggle */
.theme-toggle-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 35px;
    cursor: pointer;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: 0.3s;
    border-radius: 35px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 25px;
    width: 25px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle input:checked + .toggle-slider {
    background-color: rgba(0, 0, 0, 0.3);
}

.theme-toggle input:checked + .toggle-slider:before {
    transform: translateX(35px);
}

.toggle-icon {
    font-size: 16px;
    transition: opacity 0.3s;
    z-index: 1;
}

.theme-toggle input:checked + .toggle-slider .toggle-icon:first-child {
    opacity: 0.3;
}

.theme-toggle input:not(:checked) + .toggle-slider .toggle-icon:last-child {
    opacity: 0.3;
}

body.light-mode .toggle-slider {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .toggle-slider:before {
    background-color: #1a1a1a;
}

.dashboard-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 2rem 0 2rem;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 2rem;
    min-height: var(--vh, 100vh) !important;
    height: var(--vh, 100vh) !important;
    max-height: var(--vh, 100vh) !important;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    align-content: stretch;
    align-items: stretch;
    flex: 1;
    align-self: stretch;
    bottom: 0;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
    padding-bottom: 0;
}

.calendar-widget {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    height: 0; /* Force flex item to respect max-height */
    position: relative;
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0;
}

.events-section {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.events-section:last-child {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.events-section:last-child .events-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.events-section:not(:last-child) {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Today's events - larger font */
#today-events-list .event-title {
    font-size: 4rem;
}

/* Today's events - time on top */
#today-events-list .event-item {
    align-items: flex-start;
}

#today-events-list .event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#today-events-list .event-time {
    font-size: 1.6rem;
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    order: -1; /* Move time to top */
}

/* Up Next section - smaller header */
.events-section:last-child .widget-header h2 {
    font-size: 1.5rem;
}

/* Up Next events - smaller font */
#upnext-events-list .event-title {
    font-size: 2rem;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
    padding-bottom: 0;
}

.right-column .calendar-widget {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    height: 0; /* Force flex item to respect max-height */
    position: relative;
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    row-gap: 0 !important;
}

/* Quote Widget */
.quote-widget {
    background: var(--widget-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0.8rem 1rem;
    border: 1px solid var(--widget-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    flex-shrink: 0; /* Don't shrink */
    overflow: visible; /* Allow content to show */
    transition: background 0.3s ease, border-color 0.3s ease;
}

.quote-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quote-text {
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--text-secondary);
    font-weight: 400;
    font-style: italic;
    text-align: center;
    display: block;
    overflow: visible;
    word-wrap: break-word;
    transition: color 0.3s ease;
}

.quote-author {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-align: right;
    font-weight: 500;
    margin-top: 0;
    transition: color 0.3s ease;
}

.widget {
    background: var(--widget-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid var(--widget-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

body.light-mode .widget {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.widget:hover {
    transform: translateY(-2px);
    background: var(--widget-bg-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

body.light-mode .widget:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 1);
}

.widget.calendar-widget:hover {
    background: transparent !important;
    background-color: transparent !important;
    transform: none;
    box-shadow: none !important;
}

.widget.clock-widget:hover {
    background: transparent !important;
    background-color: transparent !important;
    transform: none;
    box-shadow: none !important;
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    flex-shrink: 0; /* Prevent header from shrinking */
    transition: color 0.3s ease;
}

.calendar-widget .widget-header {
    margin-bottom: 1rem;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
}

.events-section:last-child .widget-header {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.events-section:last-child {
    margin-top: 0;
}

.events-section {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.events-section:first-child {
    flex: 0 1 auto;
    min-height: auto;
}

.events-section:last-child {
    flex: 1 1 0;
    min-height: 0;
}

.events-section:not(:last-child) {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Today's events - larger font */
#today-events-list .event-title {
    font-size: 4rem;
}

/* Today's events - time on top */
#today-events-list .event-item {
    align-items: flex-start;
}

#today-events-list .event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#today-events-list .event-time {
    font-size: 1.6rem;
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    order: -1; /* Move time to top */
}

/* Up Next section - smaller header */
.events-section:last-child .widget-header h2 {
    font-size: 1.5rem;
}

/* Up Next events - smaller font */
#upnext-events-list .event-title {
    font-size: 2rem;
}

.widget-header .icon {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.widget-header h2 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Clock Widget */
.clock-widget {
    text-align: left;
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
    padding: 1.5rem 0;
    flex-shrink: 0; /* Prevent clock from shrinking */
}

.widget.clock-widget {
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

.time {
    font-size: 9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 3px;
}

.time-colon {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.time .ampm {
    font-size: 4rem;
    font-weight: 600;
    vertical-align: baseline;
}

.date {
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

/* Calendar Events Widget */
.events-list {
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    height: 0; /* Force flex item to respect constraints */
    position: relative;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

#today-events-list {
    margin-bottom: 0;
    padding-bottom: 0;
    flex: 0 1 auto;
    min-height: auto;
    max-height: none;
    overflow-y: visible;
    height: auto;
    flex-shrink: 0;
}

#upnext-events-list {
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.events-section:last-child .widget-header {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.events-list::-webkit-scrollbar {
    display: none;
    width: 0;
}

.event-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.8rem;
    background: var(--event-bg);
    border-radius: 12px;
    border-left: 4px solid #667eea; /* Default color, can be overridden by inline style */
    transition: all 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.events-list .event-item:first-child,
.events-list .event-item.next-event {
    background: var(--event-bg-active) !important;
    border-left-width: 4px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body.light-mode .events-list .event-item:first-child,
body.light-mode .events-list .event-item.next-event {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.events-list .event-item:first-child .event-title,
.events-list .event-item.next-event .event-title {
    font-weight: 700;
    font-size: 2.4rem;
}

.events-list .event-item:first-child .event-date,
.events-list .event-item.next-event .event-date {
    font-weight: 600;
}

.events-list .event-item:first-child .event-time,
.events-list .event-item.next-event .event-time {
    font-size: 1.6rem;
    font-weight: 700;
}

.event-item:hover {
    background: var(--event-bg-hover);
    transform: translateX(5px);
}

.events-list .event-item:first-child:hover,
.events-list .event-item.next-event:hover {
    background: var(--event-bg-active) !important;
    opacity: 0.9;
    transform: translateX(5px);
}

.event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-date {
    font-size: 1.3rem;
    color: var(--text-tertiary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.event-title {
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.event-time {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.loading {
    text-align: center;
    color: var(--text-tertiary);
    padding: 2rem;
    font-style: italic;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

/* Weather Widget */
.weather-widget {
    padding: 1rem 3rem;
    flex: 0 0 auto; /* Size based on content */
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
    position: relative;
}

/* Hide any browser-generated location icons or markers */
.weather-widget::after,
.weather-content::after {
    display: none !important;
    content: none !important;
}

.weather-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    flex: 0 0 auto;
    min-height: 0;
    position: relative;
    overflow: visible;
    gap: 0;
    padding-top: 0;
}

.temperature-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.3rem;
    margin: 0;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.temperature-row {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.temperature {
    font-size: 4.2rem;
    font-weight: 700;
}

.temperature-separator {
    font-size: 3.2rem;
    font-weight: 400;
    color: var(--text-tertiary);
    margin: 0 0.2rem;
    transition: color 0.3s ease;
}

.temperature-celsius {
    font-size: 3.8rem;
    font-weight: 600;
    color: rgb(142 142 142 / 90%);
}

.weather-description {
    font-size: 1.6rem;
    color: var(--text-secondary);
    margin: 0;
    text-transform: capitalize;
    transition: color 0.3s ease;
    text-align: left;
    margin-top: 0;
}

/* Hourly Forecast */
.hourly-forecast {
    margin-bottom: 0.5rem;
    margin-top: 0.3rem;
    padding: 0.5rem 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    max-width: 100%;
    width: 100%;
    display: block;
    visibility: visible;
}

.hourly-forecast::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.hourly-forecast-container {
    display: flex;
    gap: 1rem;
    min-width: max-content;
    width: max-content;
}

.hourly-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 50px;
    padding: 0.3rem;
    background: transparent;
    border-radius: 0;
    transition: none;
}

.hourly-item:hover {
    background: transparent;
}

.hourly-time {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.hourly-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.hourly-temp {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
    transition: color 0.3s ease;
}

.weather-metrics {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    margin-top: 0.3rem;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.metric {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0;
    background: transparent;
    border-radius: 0;
    min-height: auto;
    justify-content: flex-start;
    transition: color 0.3s ease;
    flex: 0 0 auto;
}

.metric-icon {
    color: var(--text-secondary);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.metric-label {
    display: none; /* Hide labels, show only icons */
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* UV Index Widget */
.uv-widget {
    padding: 1rem;
}

.uv-widget .widget-header {
    margin-bottom: 0.75rem;
}

.uv-widget .widget-header h2 {
    font-size: 1.8rem;
}

.uv-content {
    text-align: center;
}

.uv-value {
    margin-bottom: 0.75rem;
}

.uv-number {
    font-size: 4rem;
    font-weight: 700;
    display: block;
}

.uv-level {
    font-size: 1.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.uv-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.uv-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #fbbf24 50%, #f87171 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.uv-recommendation {
    font-size: 1.3rem;
    color: var(--text-tertiary);
    font-style: italic;
    transition: color 0.3s ease;
}

/* Todo Widget */
.todo-widget {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    height: 0; /* Force flex item to respect max-height */
}

.todo-input-container {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

#todo-input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.8rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#todo-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#todo-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.add-btn {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.add-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
}

.add-btn:active {
    transform: scale(0.95);
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.5rem;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.todo-list::-webkit-scrollbar {
    display: none;
    width: 0;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.todo-item.completed {
    opacity: 0.6;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
}

.todo-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: rgba(255, 255, 255, 0.8);
}

.todo-text {
    flex: 1;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.95);
}

.todo-delete {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.todo-delete:hover {
    color: rgba(255, 100, 100, 1);
    background: rgba(255, 100, 100, 0.1);
}

.todo-delete svg {
    width: 18px;
    height: 18px;
}

/* News Ticker Bar */
.news-ticker-container {
    position: fixed;
    bottom: env(safe-area-inset-bottom);
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    min-height: 50px;
    background: var(--widget-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--widget-border);
    display: flex;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, border-color 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: max(0px, env(safe-area-inset-bottom)) !important;
    height: max(50px, calc(50px + env(safe-area-inset-bottom))) !important;
    transform: translate3d(0, 0, 0) !important;
    box-sizing: border-box !important;
    display: none !important; /* Hidden for debugging */
}

body.light-mode .news-ticker-container {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.news-ticker-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    background: var(--event-bg-active);
    height: 100%;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 1px solid var(--widget-border);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.news-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.news-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.news-ticker {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: scroll-news 60s linear infinite;
    padding-left: 2rem;
}

.news-ticker:hover {
    animation-play-state: paused;
}

.news-item {
    display: inline-block;
    padding-right: 3rem;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    transition: color 0.3s ease;
}

.news-item::before {
    content: "•";
    margin-right: 1rem;
    color: var(--text-tertiary);
    font-weight: bold;
}

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

/* Dashboard container */
.dashboard-container {
    padding-bottom: 0;
}

/* Responsive Design */
/* iPad landscape and larger - keep 2-column layout */
@media (min-width: 901px) {
    .dashboard-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .right-column .top-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Smaller tablets and phones - stack vertically */
@media (max-width: 900px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .right-column .top-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
        gap: 1.5rem;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for iOS */
        min-height: -webkit-fill-available;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for iOS */
        height: -webkit-fill-available;
        max-height: 100vh;
        max-height: 100dvh; /* Dynamic viewport height for iOS */
        max-height: -webkit-fill-available;
        grid-template-rows: 1fr;
    }
    
    .left-column {
        height: 100%;
    }
    
    .right-column {
        height: 100%;
    }
    
    .time {
        font-size: 8rem;
    }
    
    .time .ampm {
        font-size: 3.5rem;
    }
    
    .temperature {
        font-size: 3.5rem;
    }
    
    .temperature-separator {
        font-size: 2.5rem;
    }
    
    .temperature-celsius {
        font-size: 3rem;
        color: rgb(142 142 142 / 90%);
    }
    
    .weather-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .temperature-container {
        flex: 1 1 auto;
        width: 100%;
    }
    
    .weather-metrics {
        flex-direction: column;
        flex: 1 1 auto;
        width: 100%;
        margin-top: 1rem;
    }
    
    .metric {
        min-height: auto;
        padding: 0.3rem 0;
    }
    
    .hourly-forecast {
        margin-bottom: 0.75rem;
        margin-top: 0.5rem;
        padding: 0.5rem 0;
    }
    
    .quote-text {
        font-size: 1.2rem;
    }
    
    .quote-author {
        font-size: 0.9rem;
    }
    
    .quote-widget {
        padding: 1.2rem;
    }
    
    .dashboard-container {
        padding-bottom: 0;
    }
}

/* News Ticker Bar */
.news-ticker-container {
    position: fixed;
    bottom: env(safe-area-inset-bottom);
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    min-height: 50px;
    background: var(--widget-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--widget-border);
    display: flex;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, border-color 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: max(0px, env(safe-area-inset-bottom)) !important;
    height: max(50px, calc(50px + env(safe-area-inset-bottom))) !important;
    transform: translate3d(0, 0, 0) !important;
    box-sizing: border-box !important;
    display: none !important; /* Hidden for debugging */
}

body.light-mode .news-ticker-container {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.news-ticker-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    background: var(--event-bg-active);
    height: 100%;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
    border-right: 1px solid var(--widget-border);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.news-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.news-ticker-wrapper {
    flex: 1;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.news-ticker {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    animation: scroll-news 60s linear infinite;
    padding-left: 2rem;
}

.news-ticker:hover {
    animation-play-state: paused;
}

.news-item {
    display: inline-block;
    padding-right: 3rem;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    transition: color 0.3s ease;
}

.news-item::before {
    content: "•";
    margin-right: 1rem;
    color: var(--text-tertiary);
    font-weight: bold;
}

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

/* Dashboard container */
.dashboard-container {
    padding-bottom: 0;
}



