/* ===================== */
/* TABLE OF CONTENTS     */
/* ===================== */
/* 1. Variables & Defaults
/* 2. Base Elements
/* 3. Typography
/* 4. Device Components
/* 5. Screen Components
/* 6. Widget Components
/* 7. Utility Components
/* 8. Animations & Transitions
/* 9. Design System Components
/* ===================== */

/* ==================== */
/* 1. VARIABLES & DEFAULTS */
/* ==================== */
:root {
    /* Colors */
    --background-color: #cabaa200;
    --iphone-color-light: #d6c0a0;
    --iphone-color-mid: #ceb698;
    --iphone-color-dark: #b5a17c;
    --iphone-reflection: rgba(255, 255, 255, 0.08);
    --iphone-shadow: rgba(0, 0, 0, 0.5);
    --magsafe-color-light: #2a2a2a;
    --magsafe-color-dark: #242424;
    --magsafe-border-light: #4a8a9a;
    --magsafe-border-dark: #2c5e6c;
    --epaper-background: #dbdbdb;
    --text-color-primary: #444;
    --text-color-secondary: #666666;
    --text-color-tertiary: #888888;
    --border-color: rgba(0, 0, 0, 0.2);
    --widget-background: #e2e2e2;

    /* Typography */
    --font-family-primary: "Nunito Sans", serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-family-secondary: "Instrument Serif", serif;

    .instrument-serif-regular {
        font-family: "Instrument Serif", serif;
        font-weight: 400;
        font-style: normal;
      }
      
      .instrument-serif-regular-italic {
        font-family: "Instrument Serif", serif;
        font-weight: 400;
        font-style: italic;
      }
      

    /* Font sizes */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 24px;
    --font-size-xl: 32px;
    --font-size-xxl: 36px;

    /* Font weights */
    --font-weight-regular: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Sizes */
    --border-radius-large: 56px;
    --border-radius-medium: 32px;
    --border-radius-small: 20px;
    --spacing-xs: 4px;
    --spacing-small: 8px;
    --spacing-medium: 16px;
    --spacing-large: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);

    /* Component-specific */
    --widget-padding: var(--spacing-medium);
    --widget-gap: var(--spacing-small);
    --widget-border: 1px solid var(--border-color);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0s ease;
}

/* =============== */
/* 2. BASE ELEMENTS */
/* =============== */
body {
    margin: 0;
    display: flex;
    background: var(--background-color);
    font-family: var(--font-family-primary);
    font-weight: 600;
    /* min-height: 100vh; */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    perspective: 2000px;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

/* ================ */
/* 3. TYPOGRAPHY */
/* ================ */
h1, .temp, .day, .notifications-count {
    font-size: var(--font-size-xxl);
    font-weight: var(--font-weight-bold);
    font-family: var(--font-family-secondary);
    line-height: 1.2;
    text-align: left;
    margin: 0;
    display: flex;
    align-items: center;
    height: auto;
    padding: 0;
    text-rendering: optimizeLegibility;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
    color: var(--text-color-primary);
    letter-spacing: 0.05em;
}

.title, .forecast, .weekday, .track-title, .notifications h3, .mindfulness .title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-color-primary);
    text-align: left;
}

.subtitle, .location, .month, .category-label, .notification-subtitle, .detail .label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--text-color-secondary);
    text-transform: uppercase;
}

.time, .notification-count {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-color-primary);
    line-height: 1;
}

.text, .notification-text, .notification-summary-text {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-regular);
    color: var(--text-color-primary);
    text-align: left;
}

.notification-time, .battery-level, .detail .value, .more-notifications {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-regular);
    color: var(--text-color-secondary);
}

.pomodoro-session-type {
    font-size: var(--font-size-xs); /* Updated from sm to xs */
    font-weight: var(--font-weight-bold); /* Added bold weight */
    color: var(--text-color-secondary);
    text-transform: uppercase;
}

.pomodoro-session-counter {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-regular); /* Added regular weight */
    color: var(--text-color-secondary);
}

/* ================= */
/* 4. DEVICE COMPONENTS */
/* ================= */
.iphone-mock {
    left: 0;
    top: 0;
    width: 375px;
    height: 812px;
    background: linear-gradient(145deg, 
                #E8D0B0 0%,
                #DEC19D 25%,
                #D4B08C 50%,
                #C5A076 75%,
                #B69070 100%);
   
    border-radius: var(--border-radius-large);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 15px 20px rgba(0, 0, 0, 0.2),
        inset 0 0 3px 1px rgba(255, 255, 255, 0.25),
        inset 0 0 0 1px rgba(0, 0, 0, 0.2);
    transform: perspective(2000px) rotateX(10deg) rotateY(5deg);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    cursor: default;
}

/* Add reflection effect to iPhone */
.iphone-mock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, 
                rgba(255, 255, 255, 0.15) 0%, 
                transparent 15%, 
                transparent 80%, 
                rgba(255, 255, 255, 0.08) 100%);
    border-radius: var(--border-radius-large);
    pointer-events: none;
    z-index: 5;
    opacity: 0.9;
}

/* Add highlight to edge of iPhone */
.iphone-mock::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
                rgba(0, 0, 0, 0.05) 0%,
                transparent 2%,
                transparent 98%,
                rgba(0, 0, 0, 0.05) 100%);
    border-radius: var(--border-radius-large);
    pointer-events: none;
    z-index: 4;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05);
}

.camera {
    position: absolute;
    top: 0;
    transform: translate(6%, 4%);
    width: 180px;
    height: 200px;
    background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.1) 0%,
                rgba(187, 187, 187, 0.2) 50%,
                rgba(100, 100, 100, 0.4) 100%);
    border-radius: 56px;
    box-shadow: 
        0 8px 12px rgba(0, 0, 0, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0px 1px 1px rgba(255, 255, 255, 0.12),
        inset 0px -1px 1px rgba(0, 0, 0, 0.3),
        inset 4px 0px 8px rgba(255, 255, 255, 0.2),
        inset 0px 0px 1px rgba(0, 0, 0, 0.4);
    z-index: 10;
    position: relative;
    padding: 20px 0;
    border: 4px solid rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
}

.camera::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 36px;
    background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.12) 0%, 
                transparent 25%, 
                transparent 75%, 
                rgba(255, 255, 255, 0.08) 100%);
    pointer-events: none;
    z-index: 1;
}

.camera-lens {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
                #2a2a2a 0%, 
                #232323 30%, 
                #181818 70%,
                #111111 100%);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.6),
        0 1px 4px rgba(0, 0, 0, 0.4),
        inset 0 0 15px rgba(0, 0, 0, 0.9),
        inset 0 0 6px rgba(0, 0, 0, 1);
            position: absolute;
    overflow: hidden;
    border: 2px solid rgba(30, 30, 30, 0.95);
    border: outset rgba(255, 255, 255, 0.4) 4px solid;
    transform-style: preserve-3d;
    transform: translateZ(2px);
    border: 4px solid rgba(255, 211, 140, 0.622);

}

/* Top lens (centered) */
.camera-lens:nth-child(1) {
    top: 5%;
    left: 5%;
}

/* Bottom left lens */
.camera-lens:nth-child(2) {
    bottom: 5%;
    left: 5%;
}

/* Bottom right lens */
.camera-lens:nth-child(3) {
    bottom: 32%;
    right: 5%;
}

/* Camera flash */
.camera-flash {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg,
                #f7f7f7 0%,
                #e0e0e0 40%,
                #d0d0d0 70%,
                #c0c0c0 100%);
    box-shadow: 
        0 1px 4px rgba(0, 0, 0, 0.3),
        inset 0 0 8px rgba(255, 255, 255, 0.8);
    top: 10%;
    right: 18%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transform-style: preserve-3d;
    transform: translateZ(1px);
    overflow: hidden;
}

.camera-flash::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 40% 40%,
                rgba(255, 255, 255, 0.9) 0%,
                rgba(255, 255, 255, 0.4) 60%,
                rgba(220, 220, 220, 0.2) 100%);
}

/* Depth sensor */
.depth-sensor {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg,
                #1a1a1a 0%,
                #161616 40%,
                #101010 70%,
                #080808 100%);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.5),
        inset 0 0 6px rgba(0, 0, 0, 0.8);
    bottom: 8%;
    right: 16%;
    border: 2px solid rgba(40, 40, 40, 0.9);
    transform-style: preserve-3d;
    transform: translateZ(1px);
}

.depth-sensor::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 30%;
    width: 40%;
    height: 40%;
    border-radius: 50%;
    background: radial-gradient(circle at center,
                rgba(60, 60, 60, 0.8) 0%,
                rgba(30, 30, 30, 0.6) 70%,
                rgba(10, 10, 10, 0.4) 100%);
}

.camera-lens::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65%;
    height: 65%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, 
                rgba(63, 72, 95, 0.3) 0%, 
                rgba(20, 20, 20, 0.9) 60%, 
                rgba(10, 10, 10, 1) 100%);
    box-shadow: 
        inset 0 0 10px rgba(7, 2, 34, 0.8),
        inset 0 0 5px rgba(0, 0, 0, 0.6),
        0 0 2px rgba(149, 0, 255, 0.1);
}

.camera-lens::after {
    content: '';
    position: absolute;
    top: 25%;
    left: 25%;
    width: 12%;
    height: 12%;
    border-radius: 50%;
    background: radial-gradient(circle at center, 
                rgba(124, 130, 255, 0.3) 0%, 
                rgba(166, 228, 255, 0.1) 100%);
}

.magsafe-container {
    position: absolute;
    width: 340px;
    height: 540px;
    background: linear-gradient(135deg, 
                #3a3a3a 0%, 
                #2a2a2a 40%,
                #252525 60%,
                #202020 100%);
    border-radius: 48px;
    box-shadow: 
        0px 20px 30px -15px rgba(0, 0, 0, 0.7),
        0px 15px 20px -5px rgba(0, 0, 0, 0.5),
        inset 0px 1px 2px rgba(255, 255, 255, 0.25),
        inset 0px -1px 2px rgba(0, 0, 0, 0.35);
    padding: 12px;
    overflow: hidden;
    will-change: transform;
    border: 0.5px solid rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    position: relative;
}

/* Add plastic material highlights */
.magsafe-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, 
            rgba(255, 255, 255, 0.15) 0%, 
            rgba(255, 255, 255, 0.05) 15%, 
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.03) 85%,
            rgba(255, 255, 255, 0.07) 100%);
    border-radius: 48px;
    z-index: 1;
    pointer-events: none;
}

/* Add subtle texture to the plastic surface */
.magsafe-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E"),
        linear-gradient(to right, 
            rgba(0, 0, 0, 0.02) 1px, 
            transparent 1px),
        linear-gradient(to bottom, 
            rgba(0, 0, 0, 0.02) 1px, 
            transparent 1px);
    background-size: 100% 100%, 4px 4px, 4px 4px;
    border-radius: 48px;
    opacity: 0.4;
    z-index: 2;
    pointer-events: none;
}

/* 3D hover effect for iPhone mock */
@media (hover: hover) {
    .iphone-mock:hover {
        transform: perspective(2000px) rotateX(8deg) rotateY(20deg);
        transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    }
}

.epaper-display {
    width: 100%;
    height: 100%;
    padding: var(--spacing-medium);
    box-sizing: border-box;
    background: var(--epaper-background);
    border-radius: 40px;
    filter: grayscale(100%) contrast(130%) brightness(80%) sepia(10%);
    overflow-y: hidden;
    position: relative;
    box-shadow: inset 0 0 8px 0px rgba(0, 0, 0, 0.4);
}

.epaper-display::before, .epaper-display::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    pointer-events: none;
}

.epaper-display::before {
    background: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise' x='0%' y='0%' width='100%' height='100%'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3C/rect width='100' height='100' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E"),
        linear-gradient(to right, rgba(0,0,0,0.01) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.01) 1px, transparent 1px);
    background-size: 100px 100px, 8px 8px, 8px 8px;
    opacity: 0.6;
}

.epaper-display::after {
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 2px 2px;
    opacity: 0.3;
}

/* ================ */
/* 5. SCREEN COMPONENTS */
/* ================ */

/* Screen content container */
.screen-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Status bar and indicators */
.status-bar, .notification-content, .detail {
    display: flex;
    align-items: center;
}

.status-bar {
    justify-content: space-between;
    padding: 0 var(--spacing-small) var(--spacing-small) var(--spacing-small);
    font-size: 14px;
    color: var(--text-color-secondary);
}

/* Battery and notification indicators */
.battery-status, .notification-dot {
    display: flex;
    align-items: center;
}

.battery-status {
    gap: 4px;
    font-size: 14px;
    color: var(--text-color-secondary);
}

.battery-icon, .notification-icon, .weather-icon {
    filter: contrast(110%) brightness(90%);
}

.battery-icon {
    font-size: 14px;
}

.notification-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

.notification-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-color-primary);
    margin-left: 6px;
    opacity: 0;
    will-change: opacity;
}

.notification-dot.active {
    opacity: 1;
}

/* Status indicators */
.battery-status.low-battery .battery-level {
    color: #e25a3d;
}

.battery-status.charging .battery-level {
    color: #3d8fe2;
}

/* Content container */
.content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
}

/* ================ */
/* 6. WIDGET COMPONENTS */
/* ================ */

/* Base widget styles */
.widget {
    background: var(--widget-background);
    border-radius: var(--border-radius-small);
    border: var(--widget-border);
    padding: var(--widget-padding);
    box-shadow: var(--shadow-sm);
    gap: var(--widget-gap);
    display: flex;
    flex-direction: column;
    max-height: calc(100% - 60px);
    overflow: hidden;
}

/* Widget header pattern */
.widget-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-medium);
    border-bottom: rgba(0, 0, 0, 0.08) 1px solid;
    padding-bottom: var(--spacing-small);
    min-height: 40px;
}

/* Widget content container */
.widget-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-medium);
}

/* Apply consolidated styles */
.header, .notification-summary-title {
    @extend .widget-header;
}

.combined-widget, .notification-summary-content, .media-content {
    @extend .widget-content;
}

/* Shared widget header and container styles */
.header, .notification-summary-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-medium);
    border-bottom: rgba(0, 0, 0, 0.08) 1px solid;
    padding-bottom: var(--spacing-small);
}

.header {
    min-height: 40px;
}

.date-container, .label-container, .notification-title-content, .track-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.date-container, .label-container {
    justify-content: center;
    min-height: 40px;
}

/* Weather styles */
.weather-icon {
    font-size: 24px;
}

.detail .weather-icon {
    font-size: 16px;
}

/* Combined widget layout */
.combined-widget, .notification-summary-content, .media-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-medium);
}

/* Calendar section */
.calendar-section, .weather-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-small);
}

.calendar-section {
    padding-bottom: var(--spacing-medium);
    border-bottom: 1px solid var(--border-color);
}

.calendar-section .day {
    font-size: 32px;
    line-height: 1;
    margin: 0;
}

.events, .notification-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

/* Event and notification items */
.event, .notification-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event {
    padding: 4px 0px 4px 16px;
}

.notification-item {
    justify-content: space-between;
    padding: 4px 0;
    width: 100%;
    gap: 12px;
}

.event .time {
    font-size: 14px;
    color: var(--text-color-secondary);
    min-width: 40px;
}

/* Categories */
.event-category, .notification-category {
    display: flex;
    flex-direction: column;
    gap: 0px;
    margin-bottom: 8px;
}

.event-category:last-child, .notification-category:last-child {
    margin-bottom: 0;
}

/* Priority indicators */
.priority-indicator {
    width: 3px;
    height: 80%;
    position: absolute;
    left: 0;
    border-radius: 2px;
    opacity: 0.8;
}

.event.priority-high .priority-indicator {
    background: #1a1a1a;
}

.event.priority-medium .priority-indicator {
    background: #6b6b6b;
}

.event.priority-low .priority-indicator {
    background: #b9b9b9;
}

/* Weather section */
.weather-section .header {
    border: none;
    padding: 0;
}

.weather-details {
    display: flex;
    gap: var(--spacing-medium);
    align-items: center;
}

.detail {
    gap: 4px;
}

/* Notifications */
.notifications .header {
    margin-bottom: var(--spacing-small);
}

.notification-content {
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.notification-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.notification-time {
    white-space: nowrap;
    margin-left: auto;
    min-width: 50px;
    text-align: right;
}

/* Media widget */
.media-content {
    align-items: center;
}

.media img {
    width: 80%;
    height: 80%;
    max-width: 180px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    filter: contrast(80%) brightness(95%);
}

.track-info {
    width: 100%;
    text-align: left;
}

.track-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    font-family: var(--font-family-secondary);
    line-height: 1.2;
}

/* Media controls */
.media .controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-small);
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius-small);
    padding: var(--spacing-small);
    width: 100%;
    border: 1px solid var(--border-color);
}

.media .controls button {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color-primary);
    cursor: pointer;
    padding: var(--spacing-small) var(--spacing-large);
    border-radius: var(--border-radius-small);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, opacity;
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-regular);
}

.media .controls .play {
    font-size: 32px;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.08);
    width: 80px;
}

.media .controls button.playing {
    background: rgba(0, 0, 0, 0.15);
}

/* ================ */
/* 7. UTILITY COMPONENTS */
/* ================ */

/* Page indicators */
.page-indicators {
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    gap: 16px;
    padding: 8px 8px;
    z-index: 100;
}

.page-indicator {
    width: 100%;
    height: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius-small);
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    opacity: 1;
    cursor: pointer;
    padding: 1rem;
    filter: contrast(3) brightness(1);
    will-change: transform, opacity, filter;
    position: relative;
}

.page-indicator.active,
.page-indicator[data-active="true"] {
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
    transform: scale(1.1);
    filter: contrast(3) brightness(1.2);
    border: var(--border-color) 1px solid;
}

.page-indicator:focus {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: 2px;
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--text-color-secondary);
    color: var(--widget-background);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--widget-background);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Notification overlay and summary */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right:  0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 149;
    display: none;
}

.notification-summary {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--widget-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: var(--spacing-medium);
    font-size: 14px;
    width: 300px;
    z-index: 150;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
}

.notification-summary-title {
    min-height: 32px;
}

.notification-summary-text {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    padding: var(--spacing-small) 0;
}

.more-notifications {
    display: block;
    text-align: center;
    padding: var(--spacing-small) 0 0;
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-small);
}

.notification-summary-content.expanded .notification-summary-text {
    -webkit-line-clamp: unset;
}

/* Button styles */
.notification-actions {
    margin-top: var(--spacing-small);
    padding-top: var(--spacing-small);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: row;
    gap: var(--spacing-small);
}

.notification-actions button {
    flex: 1;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: var(--spacing-small);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-family-primary);
    color: var(--text-color-primary);
    cursor: pointer;
    text-transform: uppercase;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-actions .notification-dismiss {
    background: var(--text-color-primary);
    border-color: var(--text-color-primary);
    color: var(--widget-background);
}

/* Focus styles */
.notification-actions button:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.08);
}

.notification-summary-text:focus {
    outline: none;
}

/* Screen reader announcer */
#sr-announcer {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* ======================== */
/* PRODUCTIVITY WIDGET STYLES */
/* ======================== */

/* Main productivity widget container */
.productivity-widget { 
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-medium);
}

.productivity-content { 
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    gap: var(--spacing-large);
}

.productivity-section-title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-color-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-small);
}

.productivity-section-title i.fas {
    font-size: var(--font-size-sm);
    color: var(--text-color-secondary);
}

.productivity-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    opacity: 0.7;
    width: 100%;
}

/* Pomodoro Section */
.pomodoro-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-medium);
}
.pomodoro-timer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius-small);
    padding: var(--spacing-medium);
    border: 2px solid transparent; /* Prevents layout shift */
}

.pomodoro-time {
    font-size: calc(var(--font-size-xl) * 1.2);
    font-weight: var(--font-weight-bold);
    color: var(--text-color-primary);
    margin: 0;
    letter-spacing: 0.05em;
}

.pomodoro-controls {
    display: flex;
    gap: var(--spacing-medium);
    padding-bottom: var(--spacing-xs);
}

.pomodoro-controls button {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color-primary);
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-regular);
}

/* Pomodoro controls styling */
.pomodoro-controls button:focus {
    outline: 2px solid var(--border-color);
    outline-offset: 2px;
}

.pomodoro-timer.running {
    border-color: var(--text-color-primary); /* Only color changes */
    box-shadow: 0 0 0 2px rgba(68,68,68,0.08);
    background: rgba(0,0,0,0.05);
}

/* Mindfulness Section - Refactored for better space utilization */
.mindfulness-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--spacing-small);
    height: 100%;
    flex: 1;
    min-height: 0; /* Critical for flex child to properly size */
}

.mindfulness-prompt-display {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--border-radius-small);
    padding: var(--spacing-medium);
    flex: 1;
    min-height: 140px; /* Set minimum height to prevent collapse */
    overflow: hidden;
    position: relative; /* Needed for absolute button positioning */
}

.mindfulness-new-prompt-btn {
    position: absolute;
    bottom: var(--spacing-xs);
    right: var(--spacing-xs);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-color-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: none;
    cursor: pointer;
    z-index: 2;
    transition: background 0.15s, color 0.15s;
}

.mindfulness-new-prompt-btn:hover, .mindfulness-new-prompt-btn:focus {
    background: rgba(0,0,0,0.07);
    color: var(--text-color-secondary);
}

/* ======================== */
/* 9. DESIGN SYSTEM COMPONENTS */
/* ======================== */

/* Card/Container Components */
.ds-card {
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--border-radius-small);
    padding: var(--spacing-medium);
    /* border: 1px solid var(--border-color); */ /* Uncomment if a border is desired by default */
}

/* Button Components */
.ds-button {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color-primary);
    border-radius: var(--border-radius-small);
    padding: var(--spacing-small) var(--spacing-medium);
    font-size: var(--font-size-sm);
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-regular);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: default; /* Optimized for e-ink */
}

.ds-button--icon {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
    padding: 0; /* Override default padding for icon buttons */
}

.ds-button--icon i {
    margin-right: 0; /* Ensure no margin for icons in icon-only buttons */
}

.ds-button--center {
    margin-left: auto;
    margin-right: auto;
}

.ds-button:focus {
    outline: 2px solid var(--border-color);
    outline-offset: 2px;
}

.ds-button i { /* For buttons with text and icon */
    margin-right: var(--spacing-small);
}

/* Divider Component */
.ds-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    opacity: 0.7;
    width: 100%;
}

/* Section Title Component */
.ds-section-title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-color-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-small);
}

.ds-section-title i {
    font-size: var(--font-size-sm);
    color: var(--text-color-secondary);
}

/* Text Container (e.g., for prompts) */
.ds-text-container {
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius-small);
    padding: var(--spacing-medium);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1; /* Allows it to grow if in a flex container */
}

/* Content Section Wrapper */
.ds-content-section {
    display: flex;
    flex-direction: column;
}

/* Layout Utilities */
.ds-flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.ds-flex-column {
    display: flex;
    flex-direction: column;
}

.ds-justify-between {
    justify-content: space-between;
}

.ds-justify-center {
    justify-content: center;
}

.ds-align-center {
    align-items: center;
}

.ds-gap-xs { gap: var(--spacing-xs); }
.ds-gap-sm { gap: var(--spacing-small); }
.ds-gap-md { gap: var(--spacing-medium); }
.ds-gap-lg { gap: var(--spacing-large); }

/* Display Text (e.g., for large timer text) */
.ds-display-text {
    font-size: calc(var(--font-size-xl) * 1.2);
    font-weight: var(--font-weight-bold);
    color: var(--text-color-primary);
    margin: 0;
    letter-spacing: 0.05em;
}