:root {
    --bg: #f9fafb;
    --text: #1f2937;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #e5e7eb;
    --secondary-hover: #d1d5db;
    --success: #10b981;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: var(--text);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Utilities */
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.flex-grow { flex-grow: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.h-full { height: 100%; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hidden { display: none !important; }

/* Typography */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-white { color: #ffffff; }
.text-blue-500 { color: var(--primary); }
.text-gray-500 { color: #6b7280; }
.opacity-80 { opacity: 0.8; }

/* Backgrounds & Borders */
.bg-blue-500 { background-color: var(--primary); }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-success { background-color: #d1fae5; color: #065f46; }
.bg-error { background-color: #fee2e2; color: #991b1b; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-b-xl { border-radius: 0 0 0.75rem 0.75rem; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); }

/* Interactive Elements */
.cursor-pointer { cursor: pointer; }
.btn {
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    width: 100%;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: var(--secondary); color: var(--text); }
.btn-secondary:hover { background-color: var(--secondary-hover); }

.input-field {
    width: 100%;
    padding: 1rem;
    font-size: 1.25rem;
    border: 2px solid var(--secondary);
    border-radius: 0.5rem;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}
.input-field:focus {
    border-color: var(--primary);
}

/* Safe areas */
.p-safe {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* SVG icons */
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }

.overflow-y-auto { overflow-y: auto; }
.pb-8 { padding-bottom: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.bg-white { background-color: #ffffff; }
.text-gray-700 { color: #374151; }
.text-lg { font-size: 1.125rem; }
.capitalize { text-transform: capitalize; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
