#widget-container {
    --w-primary: #6366f1;
    --w-primary-hover: #4f46e5;
    --w-widget-bg: rgba(30, 41, 59, 0.9);
    --w-text: #f8fafc;
    --w-border: rgba(255, 255, 255, 0.15);
    --w-shadow: rgba(0, 0, 0, 0.4);
    --w-glass: 16px;

    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: none;
}

#widget-container * {
    box-sizing: border-box;
}

#widget-container .widget {
    pointer-events: auto;
    position: absolute;
    width: 300px;
    background: var(--w-widget-bg);
    backdrop-filter: blur(var(--w-glass));
    -webkit-backdrop-filter: blur(var(--w-glass));
    border: 1px solid var(--w-border);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px var(--w-shadow);
    color: white;
    overflow: hidden;
    user-select: none;
    transition: box-shadow 0.2s ease;
}

#widget-container .widget-header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--w-border);
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    justify-content: space-between;
}

#widget-container .header-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

#widget-container .widget-controls {
    display: flex;
    gap: 8px;
}

#widget-container .hide-btn {
    background: transparent;
    border: none;
    color: var(--w-text);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#widget-container .hide-btn:hover {
    opacity: 1;
    color: #ef4444;
}

/* Organizer Bar Styles */
#widget-container .organizer-bar {
    top: 20px;
    left: 20px;
    width: auto !important;
    min-width: 150px;
    z-index: 1000;
}

#widget-container .organizer-header {
    background: rgba(99, 102, 241, 0.2);
    padding: 8px 12px;
}

#widget-container .organizer-icons {
    display: flex;
    padding: 12px;
    gap: 15px;
    justify-content: center;
}

#widget-container .organizer-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--w-border);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

#widget-container .organizer-btn:hover {
    background: var(--w-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

#widget-container .widget-content {
    padding: 20px;
}

/* Timer Widget Specifics */
#widget-container .timer-setup-title {
    text-align: center;
    font-size: 0.9rem;
    color: var(--w-text);
    opacity: 0.7;
    margin-bottom: 12px;
}

#widget-container .timer-run-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
}

#widget-container .timer-run-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--w-border);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#widget-container .timer-run-controls button:hover {
    background: var(--w-primary);
}

#widget-container .timer-run-controls #timer-stop:hover {
    background: #ef4444;
}

#widget-container .timer-display {
    font-size: 3.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

#widget-container .timer-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#widget-container .timer-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

#widget-container .preset-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--w-border);
    color: var(--w-text);
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#widget-container .preset-btn span {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.6;
    margin-top: 4px;
    text-transform: lowercase;
}

#widget-container .preset-btn:hover {
    background: var(--w-primary);
    border-color: var(--w-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#widget-container .timer-input-group input {
    width: 70px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--w-border);
    color: white;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    font-size: 1rem;
}

#widget-container .timer-input-group button {
    background: var(--w-primary);
    color: white;
    border: none;
    border-radius: 8px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#widget-container .timer-input-group button:hover {
    background: var(--w-primary-hover);
}

/* Calculator Widget Specifics */
#widget-container #calculator-widget {
    width: 280px;
}

#widget-container .calc-display {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    padding: 15px;
    text-align: right;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-family: 'IBM Plex Mono', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}

#widget-container .calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

#widget-container .calc-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--w-border);
    color: white;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

#widget-container .calc-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

#widget-container .calc-btn.op {
    color: #818cf8;
}

#widget-container .calc-btn.eq {
    grid-column: span 1;
    grid-row: span 3;
    background: var(--w-primary);
}

#widget-container .calc-btn.zero {
    grid-column: span 2;
}