/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    height: 100vh;
}

/* App Layout */
#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    text-align: center;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Main Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    /* Extra padding at bottom for tab bar on mobile */
    padding-bottom: 80px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

.text-secondary {
    color: var(--text-secondary);
}

.error-msg {
    color: var(--error);
    font-size: 0.9rem;
    padding: 8px 0;
    text-align: center;
}

.error {
    color: var(--error);
}

.space-y-4>*+* {
    margin-top: 1rem;
}

/* Spinner */
.center-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Tab Bar */
.tab-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 60px;
    z-index: 100;
}

.tab-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    padding: 5px;
    flex: 1;
}

.tab-link.active {
    color: var(--accent);
}

.tab-link .icon {
    font-size: 20px;
    margin-bottom: 2px;
}