:root {
    --one-minute: 60000;
    --one-hour: 3600000;
    --rain-threshold: 70;
    --drizzle-threshold: 40;
    --cloud-threshold: 50;
    --uv-threshold: 6;
    --night-start: 6;
    --night-end: 18;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-dark: rgba(0, 0, 0, 0.25);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-light: rgba(255, 255, 255, 0.18);
    --glass-hover: rgba(255, 255, 255, 0.15);
    --glass-active: rgba(255, 255, 255, 0.2);
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.25s ease-out;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --blur-amount: 20px;
    --blur-heavy: 30px;
    --border-radius: 20px;
    --border-radius-lg: 28px;
    --border-radius-sm: 14px;
    --animation-speed: 1;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-medium: 0 12px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(255, 255, 255, 0.05);
    --widget-gap: 16px;
}

html {
    background-color: #0a0a0f;
}

* {
    box-sizing: border-box;
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
}

::selection,
::-webkit-selection {
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0f;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#opened {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0 16px;
}

#bg,
#overlay {
    position: fixed;
    z-index: -2;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#bg {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

#bg.loaded {
    opacity: 1;
}

#overlay {
    z-index: -1;
    background: 
        radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.2) 100%);
}

#app {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 900px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 20px 16px 60px 16px;
    gap: 8px;
}

/* Clock Styles */
#time {
    position: relative;
    text-align: center;
    font-size: clamp(64px, 12vw, 110px);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -0.04em;
    opacity: 0.98;
    color: #fff;
    user-select: none;
    pointer-events: none;
    text-shadow: 
        0 2px 20px rgba(0, 0, 0, 0.3),
        0 8px 40px rgba(0, 0, 0, 0.2);
    transition: font-size var(--transition-normal), opacity var(--transition-normal), color var(--transition-normal);
    margin-bottom: 0;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#greeting {
    text-align: center;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    user-select: none;
    pointer-events: none;
    margin-bottom: 8px;
    margin-top: 0;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

/* Search Box */
#engine {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin-top: 12px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

#search {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 60px;
    color: #fff;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    border-radius: 999px;
    overflow: hidden;
    transition: all var(--transition-smooth);
    box-shadow:
        var(--shadow-soft),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#search:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(1.01);
}

#search.semi-rounded {
    border-radius: var(--border-radius);
}

#search.square {
    border-radius: var(--border-radius-sm);
}

#search svg,
#search i {
    font-size: 18px;
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.input-search-element {
    position: relative;
    width: 54px;
    height: 100%;
}

.input-search-element-inner {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#search>.input {
    flex: 1;
    height: inherit;
    font-weight: 500;
    padding: 0;
    color: #fff;
    appearance: none;
    font-size: 18px;
    border: none;
    outline: none;
    background: transparent;
}

#search>.input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}

#search>.submit {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 56px;
    height: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all var(--transition-fast);
}

#search>.submit:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Suggestions */
#suggestion {
    position: absolute;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 50vh;
    color: #fff;
    gap: 6px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: var(--border-radius);
    overflow-y: auto;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 0 rgba(255, 255, 255, 0.1) inset;
    animation: suggestion-slide-in 0.2s ease-out;
    transform-origin: top center;
}

@keyframes suggestion-slide-in {
    from {
        color: transparent;
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }

    to {
        color: #fff;
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.suggest {
    display: flex;
    align-items: center;
    width: 100%;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    font-weight: 450;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    outline: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
}

.suggest:hover,
.suggest:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.suggest:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Quick Links */
#pin {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

#pin>a,
#pin>button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    transition: all var(--transition-smooth);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    text-decoration: none;
}

/* Improved hover glow effect */
#pin>a::before,
#pin>button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

#pin>a:hover,
#pin>button:hover,
#pin>a:focus,
#pin>button:focus {
    transform: translateY(-6px) scale(1.08);
    background: var(--glass-hover);
    box-shadow: 
        0 16px 40px rgba(0, 0, 0, 0.25),
        var(--shadow-glow);
    border-color: var(--glass-border-light);
}

#pin>a:hover::before,
#pin>button:hover::before {
    opacity: 1;
}

#pin>a:active,
#pin>button:active {
    transform: translateY(-2px) scale(1.02);
}

#pin>a>svg,
#pin>button>svg {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
}

/* Add Link Button */
#pin>.add-link-btn {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
}

#pin>.add-link-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
}

/* Floating Settings Button */
.floating-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
    border-radius: var(--border-radius);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-heavy));
    -webkit-backdrop-filter: blur(var(--blur-heavy));
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
}

.floating-btn:hover {
    transform: translateY(-4px) scale(1.05);
    background: var(--glass-hover);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), var(--shadow-glow);
    color: #fff;
}

.floating-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* Settings Panel - Glassy Design */
#settings-panel {
    position: fixed;
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
    max-width: 480px;
    background: rgba(12, 12, 18, 0.9);
    backdrop-filter: blur(var(--blur-heavy)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-heavy)) saturate(180%);
    z-index: 1000;
    overflow-y: auto;
    transform: translateX(calc(100% + 32px));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow:
        0 16px 64px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

#settings-panel.open {
    transform: translateX(0);
}

#settings-content {
    padding: 28px;
}

#settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease-out;
}

#settings-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Utils */
.transition {
    transition: all 0.2s ease-out;
}

.icon-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s ease-out;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fade-out-up {
    opacity: 0;
    transform: translateY(-8px);
}

.fade-out-down {
    opacity: 0;
    transform: translateY(8px);
}

/* Settings Typography & Components */
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

.settings-header h2 i {
    color: rgba(255, 255, 255, 0.8);
}

.settings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
}

.settings-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 60px;
}

.settings-tab:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.settings-tab.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.settings-section {
    margin-bottom: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.settings-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-section h3 i {
    font-size: 14px;
    opacity: 0.8;
    width: 18px;
    text-align: center;
}

.settings-section label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 450;
    color: rgba(255, 255, 255, 0.9);
}

/* Range Inputs */
input[type="range"] {
    -webkit-appearance: none;
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Range Group */
.range-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-value {
    font-size: 12px;
    width: 32px;
    text-align: right;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

/* Checkboxes */
input[type="checkbox"] {
    appearance: none;
    width: 40px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input[type="checkbox"]:checked {
    background: var(--accent-color, #4ade80);
}

input[type="checkbox"]:checked::after {
    transform: translateX(16px);
}

select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    font-size: 13px;
}

input[type="text"],
input[type="color"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    outline: none;
}

input[type="color"] {
    padding: 0;
    width: 36px;
    height: 28px;
    border: none;
    overflow: hidden;
}

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

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}

/* Settings Footer */
.settings-footer {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.action-btn.danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    background: rgba(239, 68, 68, 0.08);
}

.action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

.action-btn.primary {
    background: var(--accent-color, #4ade80);
    border-color: transparent;
    color: #000;
}

.action-btn.primary:hover {
    filter: brightness(1.1);
}

/* Widget System */
#widgets-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--widget-gap);
    width: 100%;
    max-width: 900px;
    margin-top: 16px;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.widget {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 14px 16px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.widget:hover {
    background: var(--glass-hover);
    border-color: var(--glass-border-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
}

.widget-title i {
    font-size: 12px;
    opacity: 0.75;
}

.widget-content {
    color: #fff;
}

/* Widget Sizes */
.widget.widget-md {
    grid-column: span 1;
}

.widget.widget-lg {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .widget.widget-lg,
    .widget.widget-md {
        grid-column: span 1;
    }
}

/* Calendar Widget - Compact */
.calendar-compact {
    text-align: center;
}

.calendar-compact .calendar-day-name {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.calendar-compact .calendar-date-num {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
}

.calendar-compact .calendar-month-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* World Clock Widget */
.world-clocks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.world-clock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.world-clock-item:last-child {
    border-bottom: none;
}

.wc-city {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.wc-time {
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Weather Widget */
.weather-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.weather-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 6px;
}

.weather-stat i {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.weather-stat-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.weather-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.weather-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Notes Widget */
.notes-textarea {
    width: 100%;
    min-height: 70px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: #fff;
    padding: 10px;
    font-size: 13px;
    resize: vertical;
    outline: none;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.notes-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.notes-textarea:focus {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
}

/* Quote Widget */
.widget-quote {
    position: relative;
}

.quote-content blockquote {
    font-size: 14px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.quote-content cite {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-style: normal;
}

.refresh-quote-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.refresh-quote-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Pomodoro Widget */
.pomodoro-timer {
    font-size: 42px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    margin-bottom: 12px;
}

.pomodoro-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pomo-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pomo-btn:hover {
    background: var(--accent-color, #4ade80);
    color: #000;
}

.pomo-btn.pause {
    background: rgba(255, 200, 0, 0.2);
    color: #ffc800;
}

/* Countdown Widget */
.countdown-setup {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.countdown-setup input {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    outline: none;
}

.countdown-set-btn,
.countdown-reset-btn {
    padding: 8px 12px;
    background: var(--accent-color, #4ade80);
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.countdown-reset-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
}

.countdown-event {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.countdown-num {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
}

.countdown-num span {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.countdown-complete {
    text-align: center;
    font-size: 16px;
}

/* Bookmarks Widget */
.bookmark-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.bookmark-item,
.bookmark-add-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}

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

/* Integration Widgets */
.integration-setup {
    text-align: center;
}

.integration-setup p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.integration-setup input {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    margin-bottom: 8px;
    outline: none;
}

.github-connect-btn {
    padding: 10px 20px;
    background: var(--accent-color, #4ade80);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.integration-help,
.integration-help-sm {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
}

.github-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.github-user {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.github-disconnect {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    border-radius: 4px;
}

.github-disconnect:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
}

.github-stats,
.gh-stat {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.gh-stat {
    margin-bottom: 4px;
}

.gh-stat strong {
    color: #fff;
    font-weight: 600;
}

/* Crypto Widget */
.crypto-prices {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.crypto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.crypto-item:last-child {
    border-bottom: none;
}

.crypto-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.crypto-price {
    font-size: 14px;
    font-weight: 600;
}

.crypto-change {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}

.crypto-change.up {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.crypto-change.down {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

/* Help Modal */
.help-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.help-modal-content {
    background: rgba(20, 20, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.help-modal-content h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #fff;
}

.help-modal-content p,
.help-modal-content li {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 10px;
}

.help-modal-content ul,
.help-modal-content ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.help-modal-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.help-modal-close {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.help-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Settings hint */
.settings-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.settings-hint i {
    margin-top: 2px;
}

/* Empty state small */
.empty-state-sm {
    text-align: center;
    padding: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

/* Quick Links Editor */
.links-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.link-item .link-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.link-item .link-info {
    flex: 1;
    min-width: 0;
}

.link-item .link-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-item .link-url {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-item .link-actions {
    display: flex;
    gap: 4px;
}

.link-item .link-actions button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.link-item .link-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.link-item .link-actions button.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Add Link Form */
.add-link-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
}

.add-link-form input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all var(--transition-fast);
}

.add-link-form input:focus {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

.add-link-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.add-link-form .form-row {
    display: flex;
    gap: 8px;
}

.add-link-form .form-row input {
    flex: 1;
}

/* Widget Settings */
.widget-settings {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.widget-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.widget-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.widget-toggle.active {
    background: rgba(var(--accent-color-rgb, 74, 222, 128), 0.15);
    border-color: rgba(var(--accent-color-rgb, 74, 222, 128), 0.3);
}

.widget-toggle i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.widget-toggle span {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Todo Widget */
.todo-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.todo-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.todo-item span {
    flex: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    word-break: break-word;
}

.todo-item.done span {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.4);
}

.todo-item .delete-todo {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0;
}

.todo-item:hover .delete-todo {
    opacity: 1;
}

.todo-item .delete-todo:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.add-todo-form {
    display: flex;
    gap: 6px;
}

.add-todo-form input,
.new-todo-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: all var(--transition-fast);
}

.add-todo-form input:focus,
.new-todo-input:focus {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

.add-todo-form input::placeholder,
.new-todo-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.add-todo-form button,
.add-todo-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: var(--accent-color, #4ade80);
    color: #000;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.add-todo-form button:hover,
.add-todo-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

/* Quote Widget */
.widget-quote blockquote {
    font-size: 15px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.widget-quote cite {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-style: normal;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* Animations included in style block in head */

/* Responsive */
@media (max-width: 768px) {
    #widgets-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .widget.widget-lg {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    #app {
        padding: 16px 16px 100px 16px;
    }

    #status {
        gap: 16px;
        padding: 12px 20px;
    }

    .status {
        font-size: 13px;
    }

    #search {
        height: 56px;
    }

    #pin>a,
    #pin>button {
        width: 50px;
        height: 50px;
    }

    #settings-panel {
        max-width: 100%;
        top: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }
    
    #widgets-container {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .widget {
        padding: 16px;
    }
    
    .widget-value {
        font-size: 26px;
    }
    
    .widget.widget-lg {
        grid-column: span 2;
    }
}

@media (max-width: 400px) {
    #widgets-container {
        grid-template-columns: 1fr;
    }
    
    .widget.widget-lg {
        grid-column: span 1;
    }
}

/* Tab Panel Visibility */
.settings-tab-panel {
    display: none;
}

.settings-tab-panel.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}