:root {
    --accent: #2563eb;
    --accent-soft: #dbeafe;
    --bg-app: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --sheet-bg: #ffffff;
    --heart: #dc2626;
}

body.dark-mode {
    --bg-app: #020617;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #334155;
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    --sheet-bg: #1e293b;
    --accent-soft: rgba(37, 99, 235, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }

body { background-color: var(--bg-app); color: var(--text-primary); display: flex; justify-content: center; overflow-x: hidden; min-height: 100vh; }

.app-shell { width: 100%; max-width: 500px; position: relative; padding-bottom: 80px; }

/* Header & UI Elements */
.top-bar { padding: 32px 24px 16px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--bg-app); z-index: 50; }
.brand-group h1 { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.brand-group p { font-size: 14px; color: var(--text-secondary); }

.action-group { display: flex; align-items: center; gap: 12px; }
.icon-btn { background: var(--card-bg); border: 1px solid var(--border); color: var(--text-primary); width: 42px; height: 42px; border-radius: 12px; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.custom-select { padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text-primary); font-weight: 600; outline: none; }

/* Feed & Cards */
.search-wrapper { padding: 8px 24px; }
.search-box input { width: 100%; padding: 14px 20px; border-radius: 16px; border: 1px solid var(--border); background: var(--card-bg); color: var(--text-primary); font-size: 16px; box-shadow: var(--shadow); outline: none; }

.feed { padding: 16px 24px; }
.card { background: var(--card-bg); border-radius: 20px; padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); cursor: pointer; border: 1px solid transparent; }
.dark-mode .card { border-color: var(--border); }
.qod-card { background: var(--accent); color: white; border: none !important; }
.qod-label { display: inline-block; font-size: 10px; text-transform: uppercase; font-weight: 800; background: rgba(255,255,255,0.15); padding: 4px 8px; border-radius: 6px; margin-bottom: 12px; letter-spacing: 0.5px; }

.quote-txt { font-size: 18px; line-height: 1.6; font-weight: 500; margin-bottom: 16px; }
.author-txt { font-weight: 700; font-size: 14px; text-align: right; color: var(--accent); }
.qod-card .author-txt { color: white; opacity: 0.9; }
.idx-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); }

/* Developer Section - Strict Fixes */
.bottom-sheet { position: fixed; bottom: 0; width: 100%; max-width: 500px; background: var(--sheet-bg); border-radius: 32px 32px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.2); z-index: 100; transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1); }
.bottom-sheet.collapsed { transform: translateY(calc(100% - 60px)); }
.drag-handle { width: 40px; height: 5px; background: var(--border); border-radius: 10px; margin: 12px auto; cursor: pointer; }

.sheet-content { padding: 0 32px 40px; display: flex; flex-direction: column; align-items: center; text-align: center; }

.avatar-box { width: 84px; height: 84px; aspect-ratio: 1/1; border-radius: 50%; border: 3px solid var(--accent); padding: 3px; background: var(--card-bg); overflow: hidden; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; }
.dev-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.dev-info h3 { font-size: 20px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.dev-info p { font-size: 14px; font-weight: 500; color: var(--text-secondary); margin-bottom: 20px; }

.dev-links a { display: inline-block; color: var(--accent); text-decoration: none; font-weight: 700; font-size: 14px; padding: 12px 28px; background: var(--accent-soft); border-radius: 12px; margin-bottom: 24px; }

.dev-motto { font-size: 13px; line-height: 1.6; color: var(--text-secondary); max-width: 280px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.heart-symbol { color: var(--heart); font-style: normal; padding: 0 2px; }
.legal { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

/* Toast */
#toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: var(--text-primary); color: var(--bg-app); padding: 12px 24px; border-radius: 14px; font-weight: 700; z-index: 200; box-shadow: var(--shadow); }
.toast-hidden { opacity: 0; pointer-events: none; transform: translate(-50%, 10px); }

/* Directionality */
[dir="rtl"] .author-txt { text-align: left; }
