/* 
 * ==========================================
 *  VARIABLES & THEME
 *  - CSS Custom Properties
 *  - Light/Dark Mode
 *  - Resets
 * ==========================================
 */

:root {
    /* iOS Light Palette - Softened for eye comfort */
    --color-bg: #D8D8DC;
    --bg-gradient: linear-gradient(135deg, #D8D8DC 0%, #CCCCD0 100%);

    /* Ultra Glass Surface */
    --color-surface: rgba(245, 245, 247, 0.55);
    --color-surface-glass: rgba(245, 245, 247, 0.75);
    --color-border: rgba(255, 255, 255, 0.4);

    --color-text-primary: #000000;
    --color-text-secondary: #8E8E93;

    /* iOS Tint Colors */
    --color-accent: #FF9500;
    /* Apple Orange */
    --color-accent-hover: #F58900;
    --color-success: #34C759;
    /* Apple Green */
    --color-success-bg: rgba(52, 199, 89, 0.15);
    --color-danger: #FF3B30;
    /* Apple Red */
    --color-danger-bg: rgba(255, 59, 48, 0.15);
    --color-blue: #007AFF;
    /* Apple Blue */
    --color-blue-bg: rgba(0, 122, 255, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    /* Soft Diffuse */
    --shadow-glow: 0 0 20px rgba(255, 149, 0, 0.3);

    --radius-md: 12px;
    --radius-lg: 24px;
    /* iOS standard rounded corners */
    --radius-full: 9999px;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Crackman', system-ui, sans-serif;
    /* PRESERVED */

    --transition-base: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    /* Apple Spring-ish */
}

[data-theme="dark"] {
    /* iOS Dark Palette */
    --color-bg: #000000;
    --bg-gradient: linear-gradient(135deg, #000000 0%, #1C1C1E 100%);

    --color-surface: rgba(28, 28, 30, 0.65);
    --color-surface-glass: rgba(44, 44, 46, 0.75);
    --color-border: rgba(255, 255, 255, 0.1);

    --color-text-primary: #F5F5F7;
    --color-text-secondary: #98989D;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(255, 149, 0, 0.4);
}

/* ==========================================
 *  RESETS
 * ========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* No Spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ==========================================
 *  BASE
 * ========================================== */

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--color-text-primary);
    line-height: 1.5;
    min-height: 100vh;
    /* Apple smooth fonts */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    padding-top: 1rem;
    /* Space for Dynamic Island */
}

.app-container {
    width: 100%;
    max-width: 1100px;
    /* Slightly tighter for Bento feel */
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}
