/* ============================================
   TimeFlow Pro - Base Styles
   Reset and foundational styles
   ============================================ */

/* Box sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Reset margins */
* {
    margin: 0;
    padding: 0;
}

/* Core body defaults */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-background);
    min-height: 100vh;
}

/* Improve media defaults */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* Inherit fonts for form elements */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* Remove list styles */
ul,
ol {
    list-style: none;
}

/* Anchor reset */
a {
    color: inherit;
    text-decoration: none;
}

/* Button reset */
button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--color-primary-600);
    outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-neutral-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--color-neutral-300);
    border-radius: var(--radius-full);
}

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

/* Selection styling */
::selection {
    background-color: var(--color-primary-200);
    color: var(--color-primary-900);
}

/* App container */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Loading screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: var(--space-4);
    color: var(--color-text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-neutral-200);
    border-top-color: var(--color-primary-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility: hidden */
.hidden {
    display: none !important;
}

/* Utility: screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}