/* ============================================================
   macOS Web — extra features part 2 styles
   ============================================================ */

/* ---------- 2048 ---------- */
.g2048 { height: 100%; background: #faf8ef; display: flex; flex-direction: column; padding: 14px; color: #776e65; box-sizing: border-box; }
body.dark .g2048 { background: #2b2a26; color: #e8e2d8; }
.g2048-head { display: flex; align-items: center; justify-content: space-between; }
.g2048-logo { font-size: 42px; font-weight: 800; color: #776e65; }
body.dark .g2048-logo { color: #edcf72; }
.g2048-scores { display: flex; gap: 8px; }
.g2048-score { background: #bbada0; color: #fff; border-radius: 6px; padding: 6px 14px; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; }
.g2048-score b { display: block; font-size: 18px; }
.g2048-sub { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; font-size: 12.5px; gap: 10px; }
.g2048-new, .g2048-retry { background: #8f7a66; color: #fff; border: none; border-radius: 6px; padding: 8px 16px; cursor: pointer; font-weight: 700; font-size: 12.5px; }
.g2048-wrap { position: relative; flex: 1; }
.g2048-board-grid { display: grid; grid-template-columns: repeat(4,1fr); grid-template-rows: repeat(4,1fr); gap: 10px; background: #bbada0; border-radius: 8px; padding: 10px; height: 100%; box-sizing: border-box; }
.g-cell { background: rgba(238,228,218,0.35); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 30px; }
.g-tile.pop { animation: tilePop 0.12s ease; }
@keyframes tilePop { from { transform: scale(0.55); } to { transform: scale(1); } }
.v2 { background: #eee4da; color: #776e65; } .v4 { background: #ede0c8; color: #776e65; }
.v8 { background: #f2b179; color: #fff; } .v16 { background: #f59563; color: #fff; }
.v32 { background: #f67c5f; color: #fff; } .v64 { background: #f65e3b; color: #fff; }
.v128 { background: #edcf72; color: #fff; font-size: 24px; } .v256 { background: #edcc61; color: #fff; font-size: 24px; }
.v512 { background: #edc850; color: #fff; font-size: 24px; } .v1024 { background: #edc53f; color: #fff; font-size: 20px; }
.v2048 { background: #edc22e; color: #fff; font-size: 20px; box-shadow: 0 0 22px rgba(237,194,46,0.7); } .vsuper { background: #3c3a32; color: #fff; font-size: 18px; }
.g2048-over { position: absolute; inset: 0; background: rgba(238,228,218,0.72); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; border-radius: 8px; }
body.dark .g2048-over { background: rgba(43,42,38,0.78); }
.g2048-over.show { display: flex; }
.g2048-over-msg { font-size: 36px; font-weight: 800; color: #776e65; }
body.dark .g2048-over-msg { color: #edcf72; }

/* ---------- Stickies ---------- */
#stickies-layer .sticky { position: absolute; width: 204px; min-height: 168px; pointer-events: auto; box-shadow: 0 10px 26px rgba(0,0,0,0.24); display: flex; flex-direction: column; border-radius: 2px; }
.sticky-head { height: 23px; display: flex; align-items: center; padding: 0 8px; gap: 6px; cursor: grab; font-size: 12px; flex-shrink: 0; }
.sticky-head:active { cursor: grabbing; }
.sticky-add, .sticky-close { cursor: pointer; opacity: 0.5; font-size: 12px; user-select: none; }
.sticky-add:hover, .sticky-close:hover { opacity: 1; }
.sticky-colors { display: flex; gap: 4px; margin: 0 auto; opacity: 0; transition: opacity 0.15s; }
.sticky:hover .sticky-colors { opacity: 1; }
.sticky-dot { width: 11px; height: 11px; border-radius: 50%; cursor: pointer; border: 1px solid rgba(0,0,0,0.18); }
.sticky-body { flex: 1; border: none; outline: none; resize: none; background: transparent; padding: 8px 11px; font-family: var(--font); font-size: 13.5px; line-height: 1.45; color: #3a3320; }

/* ---------- Desktop widgets ---------- */
#widgets-layer .dw { position: absolute; pointer-events: auto; width: 176px; padding: 16px 18px; border-radius: 22px; background: rgba(30,30,40,0.28); backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5); border: 1px solid rgba(255,255,255,0.22); box-shadow: 0 12px 34px rgba(0,0,0,0.25); color: #fff; cursor: grab; text-shadow: 0 1px 6px rgba(0,0,0,0.4); }
#widgets-layer .dw:active { cursor: grabbing; }
.dw-close { position: absolute; top: 8px; right: 11px; opacity: 0; cursor: pointer; font-size: 12px; transition: opacity 0.15s; }
.dw:hover .dw-close { opacity: 0.75; }
.dw-clock .dw-time { font-size: 42px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.dw-ap { font-size: 17px; margin-left: 4px; font-weight: 500; }
.dw-clock .dw-date { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.dw-weather .dw-wx-row { display: flex; align-items: center; justify-content: space-between; }
.dw-wx-temp { font-size: 46px; font-weight: 300; line-height: 1; }
.dw-wx-emoji { font-size: 34px; }
.dw-wx-city { font-size: 13px; opacity: 0.85; margin-top: 4px; }

/* ---------- Screen saver ---------- */
#screensaver { position: fixed; inset: 0; z-index: 9700; background: #05060a; opacity: 0; transition: opacity 0.6s; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: none; }
#screensaver.show { opacity: 1; }
.ss-aurora { position: absolute; inset: -25%; background: radial-gradient(circle at 28% 30%, #2a4d8f, transparent 42%), radial-gradient(circle at 72% 62%, #7a2f8f, transparent 46%), radial-gradient(circle at 50% 82%, #1f7a8f, transparent 42%); filter: blur(44px); animation: ssDrift 22s ease-in-out infinite; }
@keyframes ssDrift { 0%,100% { transform: scale(1) translate(0,0); } 50% { transform: scale(1.25) translate(4%,-3%); } }
.ss-clock { position: relative; text-align: center; color: #fff; text-shadow: 0 6px 40px rgba(0,0,0,0.6); }
.ss-time { font-size: 112px; font-weight: 200; letter-spacing: -2px; font-variant-numeric: tabular-nums; line-height: 1; }
.ss-date { font-size: 23px; opacity: 0.85; margin-top: 8px; }
.ss-hint { position: absolute; bottom: 42px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.5); font-size: 13px; }

/* ---------- Quick Look ---------- */
#quicklook { position: fixed; inset: 0; z-index: 9600; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.25); opacity: 0; transition: opacity 0.16s; }
#quicklook.show { opacity: 1; }
.ql-card { width: 520px; max-width: 84vw; max-height: 80vh; background: rgba(245,245,247,0.94); backdrop-filter: blur(30px); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.5); display: flex; flex-direction: column; animation: winPop 0.2s ease; }
body.dark .ql-card { background: rgba(40,40,42,0.94); color: #eee; }
.ql-titlebar { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: 13px; font-weight: 600; border-bottom: 0.5px solid rgba(0,0,0,0.1); }
.ql-close { cursor: pointer; opacity: 0.6; } .ql-close:hover { opacity: 1; }
.ql-body { flex: 1; overflow: auto; padding: 26px; display: flex; align-items: center; justify-content: center; }
.ql-text { white-space: pre-wrap; font-family: var(--font); font-size: 13.5px; line-height: 1.6; width: 100%; color: #333; }
body.dark .ql-text { color: #ddd; }
.ql-big { font-size: 120px; line-height: 1; }
.ql-big svg { width: 140px; height: 140px; }
.ql-big span { font-size: 120px; }

/* ---------- Photos lightbox ---------- */
#lightbox { position: fixed; inset: 0; z-index: 9650; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
#lightbox.show { opacity: 1; }
.lb-stage { text-align: center; }
.lb-photo { width: 60vw; max-width: 760px; height: 60vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.lb-cap { color: #fff; margin-top: 16px; font-size: 14px; opacity: 0.9; }
.lb-close { position: absolute; top: 20px; right: 28px; color: #fff; font-size: 26px; cursor: pointer; opacity: 0.8; }
.lb-close:hover { opacity: 1; }
.lb-nav { background: rgba(255,255,255,0.12); color: #fff; border: none; width: 54px; height: 54px; border-radius: 50%; font-size: 30px; cursor: pointer; margin: 0 18px; transition: background 0.15s; }
.lb-nav:hover { background: rgba(255,255,255,0.25); }
