/* global.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-text-primary);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: var(--font-body);
    border: none;
    background: none;
    cursor: pointer;
}

/* Base Layout Container (Mobile First) */
.app-container {
    width: 100%;
    max-width: 500px; /* Constrain on desktop to maintain mini-app feel */
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--color-bg-primary);
    position: relative;
    box-shadow: var(--shadow-xl, 0 0 40px rgba(0,0,0,0.05)); /* Slight shadow on desktop */
    overflow-x: hidden;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Page Views */
.page-view {
    display: none;
    animation: fadeIn var(--transition-smooth);
}

.page-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header Utilities */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.view-all {
    font-size: 0.875rem;
    color: var(--color-accent-cocoa);
    font-weight: 500;
}

/* Common Padding */
.container-pad {
    padding: 0 var(--spacing-md);
}

.section-margin {
    margin-top: var(--spacing-xl);
}

/* Layout Utilities */
.flex-row { display: flex; flex-direction: row; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
