/* Main Styling */
:root {
    /* Minimalistic Color Palette */
    --primary: #2C2C2C;
    --secondary: #FAFAFA;
    --accent-1: #E8E0D5;
    --accent-2: #C4B5A0;
    --accent-3: #9B8B7E;
    --success: #7BA68A;
    --warning: #D9A75A;
    --error: #C17A7A;
    
    /* Subtle Gradient Colors */
    --gradient-1: linear-gradient(135deg, #E8E0D5 0%, #D9CFC0 100%);
    --gradient-2: linear-gradient(135deg, #F5F0E8 0%, #E8DED2 100%);
    --gradient-3: linear-gradient(135deg, #E0D5C8 0%, #CFC4B5 100%);
    --gradient-4: linear-gradient(135deg, #F0EBE3 0%, #E5DDD0 100%);
    --gradient-5: linear-gradient(135deg, #DDD5CA 0%, #CEC5B8 100%);
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.20);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    zoom: 0.85;
}

/* Page Container */
.page {
    min-height: 100%;
    padding: 30px 20px 100px;
    background: #FFFFFF;
    position: relative;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page.dark-bg {
    background: var(--primary);
    color: white;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 32px;
    font-weight: 700;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

.display-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
}

p {
    margin: 0;
    line-height: 1.6;
    color: var(--accent-3);
}

.text-sm {
    font-size: 14px;
}

.text-xs {
    font-size: 12px;
}

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

.text-muted {
    color: var(--accent-3);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 100%;
    padding: 0 var(--space-md);
}

.flex {
    display: flex;
}

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

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

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

.justify-between {
    justify-content: space-between;
}

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* Header */
.page-header {
    margin-bottom: var(--space-xl);
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.page-subtitle {
    font-size: 15px;
    color: var(--accent-3);
    line-height: 1.5;
}

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

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.see-all {
    font-size: 14px;
    color: var(--accent-3);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.see-all:hover {
    color: var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    opacity: 0.3;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.empty-state-text {
    font-size: 15px;
    color: var(--accent-3);
    margin-bottom: var(--space-lg);
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(26, 26, 26, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 50%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 16px;
    margin-bottom: var(--space-sm);
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: var(--space-md);
}

/* Modal/Bottom Sheet Base */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-lg);
    padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom));
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2001;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--accent-2);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-lg);
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--primary);
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    max-width: calc(100% - 40px);
    font-size: 14px;
    font-weight: 500;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

.toast.warning {
    background: var(--warning);
}

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

.invisible {
    visibility: hidden;
}

.opacity-0 {
    opacity: 0;
}

.pointer-events-none {
    pointer-events: none;
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Focus Styles */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--accent-1);
    color: var(--primary);
}
