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

/* Theme variables */
:root[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --bg-input: #1e2a4a;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --danger: #ed4245;
    --danger-hover: #c03537;
    --success: #57f287;
    --warning: #fee75c;
    --border: #2a2a4a;
    --shadow: rgba(0, 0, 0, 0.3);
}

:root[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f2f3f5;
    --bg-tertiary: #e3e5e8;
    --bg-input: #ebedef;
    --text-primary: #2e3338;
    --text-secondary: #4f5660;
    --text-muted: #96989d;
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --danger: #ed4245;
    --danger-hover: #c03537;
    --success: #57f287;
    --warning: #fee75c;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* iOS Safari zooms into inputs with font-size < 16px on focus — prevent globally on touch devices */
@media (pointer: coarse) and (hover: none) {
    input, textarea, select {
        font-size: 16px !important;
    }
}

#app {
    height: 100%;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

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