:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: rgba(16, 185, 129, 0.15);
    --secondary: #f59e0b;
    --accent: #ef4444;
    --bg: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text: #1f2937;
    --text-muted: #6b7280;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-md: 1.25rem;
    --radius-lg: 2rem;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #e2e8f0;
    color: var(--text);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent body scrolling */
    height: 100vh;
    display: flex;
    justify-content: center;
}

#app-container {
    width: 100%;
    max-width: 500px;
    height: 100vh; /* Fixed height */
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: flex;
    flex-direction: column; /* Stack main and footer */
}

main {
    flex: 1;
    overflow-y: auto; /* Internal scrolling */
    -webkit-overflow-scrolling: touch;
}

.container {
    padding: 1.25rem;
    width: 100%;
}

/* Glassmorphism Refined */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

/* Premium Shadows & Transitions */
.premium-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:active {
    transform: scale(0.98);
    box-shadow: none;
}

/* Bottom Navigation Refined */
.bottom-nav {
    height: 85px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    flex-shrink: 0; /* Don't compress the nav */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 20%;
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* Home Modules (Mockup Style) */
.module-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem 0.75rem;
    margin: 2rem 0;
}

.module-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
}

.module-icon {
    width: 60px;
    height: 60px;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.module-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}

/* Search Bar (Mockup Style) */
.search-container {
    background: #f1f5f9;
    border-radius: 1rem;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.search-container:focus-within {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Product Cards (Mockup Style) */
.product-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    padding: 0.5rem;
    transition: all 0.3s;
}

.product-img {
    width: 100%;
    aspect-ratio: 1.1;
    object-fit: cover;
    border-radius: 1.25rem;
}

/* Buttons */
/* Buttons Base */
.btn {
    width: 100%;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
}

.btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4);
}

/* Forms Refined */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.form-icon-container {
    position: relative;
    display: flex;
    align-items: center;
}

.form-icon-container i {
    position: absolute;
    left: 1.25rem;
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 1.1rem 1.25rem;
    padding-left: 3.25rem;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 1.25rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    outline: none;
    transition: all 0.2s;
}

.form-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-input::placeholder {
    color: #94a3b8;
}
