/*
    base.css
    Base styles: CSS variables, resets, global styles, typography
    Codex Studio - Minimalist Black & White Design
*/

/* CSS Variables */
:root {
    --bg: #fff;
    --fg: #000;
    --muted: #f5f5f5;
    --gap: 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* CSS Reset */
* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color: var(--fg);
    margin: 0;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    background: var(--bg);
    color: var(--fg);
    margin: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    /* Dynamic viewport height for mobile */
    overscroll-behavior-x: none;
    overscroll-behavior-y: auto;
}

/* Ensure all interactive elements have sufficient touch areas */
button,
a,
.icon-btn {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
}

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}