/* Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IRANSansX', 'Peyda', 'Dana', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { 
    text-decoration: none; 
    color: inherit;
    transition: color 0.15s ease;
}
a:hover { color: var(--accent-color); }

ul { list-style: none; }
img { max-width: 100%; display: block; }

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Utilities */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 100vh;
    position: relative;
    padding-bottom: 88px; /* Space for bottom nav */
    padding-top: 72px; /* Space for header */
}

.hidden { display: none !important; }

/* Spacing Utilities */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }

.p-3 { padding: 12px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }

/* Theme Toggle Icons Logic for Light Mode (Default) */
body:not([data-theme="dark"]) .icon-sun { display: none !important; }
body:not([data-theme="dark"]) .icon-moon { display: flex !important; }
