/* --- Reset and Box Sizing --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Add viewport height variables to handle mobile browsers better */
    --vh: 1vh;
    --window-height: 100vh;
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- Scrollbar Styling --- */
/* For Webkit browsers like Chrome, Safari */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--app-bg);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    height: 100vh; /* Fallback */
    height: var(--window-height);
    width: 100vw;
    overflow: hidden; /* Prevent body scrolling - we'll handle scrolling in components */
    transition: background-color 0.3s, color 0.3s;
    /* Ensure content is padded for safe areas on notched phones */
    padding-top: var(--safe-area-inset-top);
    padding-bottom: var(--safe-area-inset-bottom);
}