/* Sarahah - Clean Theme */

/* ========================
   CSS Custom Properties
   ======================== */
:root {
    --bg-primary: #fafafa;
    --bg-card: #ffffff;
    --bg-hover: #f4f4f4;
    --bg-input: #f4f4f4;
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #999999;
    --border-color: #e8e8e8;
    --header-bg: rgba(255, 255, 255, 0.95);
    --accent: #10BBB3;
    --shadow-menu: 0 10px 40px rgba(0,0,0,0.08);
}

html.dark {
    --bg-primary: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-hover: #252525;
    --bg-input: #252525;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border-color: #2a2a2a;
    --header-bg: rgba(10, 10, 10, 0.95);
    --accent: #10BBB3;
    --shadow-menu: 0 10px 40px rgba(0,0,0,0.3);
}

/* Smooth font rendering */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Selection color */
::selection {
    background-color: #10BBB3;
    color: white;
}

/* Focus styles */
*:focus-visible {
    outline: none;
}

/* Scrollbar hide utility */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Safe area for mobile bottom */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ========================
   Dark Mode Overrides
   (for hardcoded colors in views)
   ======================== */
html.dark body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Cards, inputs, and borders */
html.dark .bg-white { background-color: var(--bg-card) !important; }
html.dark .bg-\[\#fafafa\] { background-color: var(--bg-primary) !important; }
html.dark .bg-\[\#f4f4f4\] { background-color: var(--bg-input) !important; }
html.dark .border-\[\#e8e8e8\] { border-color: var(--border-color) !important; }
html.dark .divide-\[\#e8e8e8\] > :not([hidden]) ~ :not([hidden]) { border-color: var(--border-color) !important; }

/* Text colors */
html.dark .text-\[\#111\] { color: var(--text-primary) !important; }
html.dark .text-\[\#555\] { color: var(--text-secondary) !important; }
html.dark .text-\[\#999\] { color: var(--text-muted) !important; }
html.dark .text-\[\#1a1a1a\] { color: var(--text-primary) !important; }
html.dark .text-\[\#666\] { color: var(--text-secondary) !important; }

/* Hover states */
html.dark .hover\:bg-\[\#f4f4f4\]:hover { background-color: var(--bg-hover) !important; }
html.dark .hover\:bg-\[\#eee\]:hover { background-color: var(--bg-hover) !important; }
html.dark .hover\:text-\[\#555\]:hover { color: var(--text-secondary) !important; }

/* Header */
html.dark header { background: var(--header-bg) !important; border-color: var(--border-color) !important; }

/* Dropdown menu */
html.dark #hamburgerMenu { background-color: var(--bg-card) !important; border-color: var(--border-color) !important; box-shadow: var(--shadow-menu) !important; }

/* Hamburger lines */
html.dark .bg-\[\#111\] { background-color: var(--text-primary) !important; }

/* Footer */
html.dark footer { color: var(--text-muted); }

/* Toast */
html.dark .bg-gray-800 { background-color: #333 !important; }

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: var(--text-muted);
    background: transparent;
    border: none;
    padding: 0;
}
.theme-toggle:hover {
    background-color: var(--bg-hover);
    color: var(--text-secondary);
}
.theme-toggle:active {
    transform: scale(0.95);
}

/* Print */
@media print {
    .no-print { display: none !important; }
}
