* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    height: 100%;
    position: fixed;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
}

input, textarea, select, button {
    -webkit-user-select: text;
    user-select: text;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #FAF8F3;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    height: 100vh;
    height: -webkit-fill-available;
    position: fixed;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Removed animated background for professional appearance */

.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: #F5F1E8;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    height: 100vh;
    height: -webkit-fill-available;
    box-shadow: none;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 0;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Prevent stretching on mobile */
@media screen and (max-width: 414px) {
    .container {
        max-width: 100%;
        width: 100vw;
    }
    
    body {
        width: 100vw;
        max-width: 100vw;
    }
    
    html {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }
}

@media (min-width: 415px) {
    body {
        padding: 0;
    }
    
    .container {
        border-radius: 0;
    }
}

.screen {
    display: block;
    padding: 0;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    animation: fadeIn 0.2s ease-out;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
    background: #F5F1E8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.header {
    background: linear-gradient(135deg, #722F37 0%, #8B2635 50%, #6B2C3E 100%);
    color: white;
    padding: 18px 20px;
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(114, 47, 55, 0.3);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
}

/* Removed header gradient animation for professional appearance */

.header h1 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    padding: 0;
    text-transform: uppercase;
}

.back-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    transition: opacity 0.3s;
    z-index: 10;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover {
    opacity: 0.8;
}

.content {
    padding: 20px;
}

/* Removed fadeInUp animation for professional appearance */

* {
    scroll-behavior: smooth;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #6B2C3E;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #D4C4B8;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(114, 47, 55, 0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #722F37;
    background: white;
    box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.15), 0 2px 8px rgba(114, 47, 55, 0.1);
    border-width: 2px;
}

.btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #722F37 0%, #8B2635 50%, #6B2C3E 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 48px;
    letter-spacing: 0.3px;
}

.btn:hover {
    background: linear-gradient(135deg, #8B2635 0%, #9d2d42 50%, #722F37 100%);
    box-shadow: 0 6px 16px rgba(114, 47, 55, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.btn:active {
    background: linear-gradient(135deg, #6B2C3E 0%, #722F37 50%, #5A1F2E 100%);
    box-shadow: 0 2px 6px rgba(114, 47, 55, 0.3);
    transform: translateY(0);
}


.btn-secondary {
    background: linear-gradient(135deg, #A68B8B 0%, #8B6F6F 50%, #6B2C3E 100%);
    box-shadow: 0 4px 12px rgba(166, 139, 139, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #8B6F6F 0%, #A68B8B 50%, #8B2635 100%);
    box-shadow: 0 6px 16px rgba(166, 139, 139, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid #722F37;
    color: #722F37;
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(114, 47, 55, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.2);
}

.btn-outline:active {
    background: rgba(114, 47, 55, 0.1);
    transform: translateY(0);
}

.link {
    color: #722F37;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    display: block;
    margin-top: 15px;
    transition: all 0.2s ease;
}

.link:hover {
    color: #8B2635;
    text-decoration: underline;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(114, 47, 55, 0.1);
    border: 1px solid #E8DED4;
    border-left: 4px solid #722F37;
    transition: all 0.2s ease;
    position: relative;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(114, 47, 55, 0.15);
    border-color: #D4C4B8;
    border-left-color: #8B2635;
}

.card h3 {
    color: #6B2C3E;
    font-size: 17px;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.4;
}

.card p {
    color: #5A4A4A;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 4px;
}

.card-meta {
    font-size: 12px;
    color: #8B6F6F;
    margin-top: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, #F5E6E6 0%, #E8D4D4 100%);
    color: #722F37;
    margin-right: 6px;
    box-shadow: 0 2px 4px rgba(114, 47, 55, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(114, 47, 55, 0.15);
}

.badge-primary {
    background: linear-gradient(135deg, #722F37 0%, #8B2635 50%, #6B2C3E 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    border: none;
}

.badge-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.list-item {
    padding: 16px 18px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(114, 47, 55, 0.08);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border: 1px solid #E8DED4;
    position: relative;
}

.list-item:hover {
    background: #FDF9F5;
    box-shadow: 0 2px 8px rgba(114, 47, 55, 0.12);
    border-color: #D4C4B8;
}

.list-item:active {
    background: #FAF8F3;
}

.list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.list-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #F5E6E6 0%, #E8D4D4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border: 1px solid rgba(114, 47, 55, 0.1);
}

.list-item:hover .list-item-icon {
    background: linear-gradient(135deg, #E8D4D4 0%, #D4C4B8 100%);
    border-color: rgba(114, 47, 55, 0.2);
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: 700;
    color: #6B2C3E;
    margin-bottom: 4px;
    font-size: 15px;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.list-item-subtitle {
    font-size: 12px;
    color: #8B6F6F;
    font-weight: 500;
    line-height: 1.4;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border-top: 2px solid #722F37;
    display: flex;
    justify-content: space-around;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 12px rgba(114, 47, 55, 0.15);
    z-index: 1000;
    border-radius: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (min-width: 415px) {
    .bottom-nav {
        border-radius: 24px 24px 0 0;
    }
}

@media screen and (max-width: 414px) {
    .bottom-nav {
        max-width: 100%;
        width: 100vw;
        left: 0;
        transform: none;
    }
}

@media (min-width: 415px) {
    .bottom-nav {
        left: 0;
        transform: none;
    }
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    cursor: pointer;
    color: #999;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 8px;
    margin: 0 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(114, 47, 55, 0.08) 0%, rgba(139, 38, 53, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-item.active::before {
    opacity: 1;
}

.nav-item:hover {
    background: rgba(114, 47, 55, 0.05);
}

.nav-item.active {
    color: #722F37;
    background: linear-gradient(135deg, rgba(114, 47, 55, 0.12) 0%, rgba(139, 38, 53, 0.12) 100%);
    transform: translateY(-1px);
}

.nav-item.active .nav-item-icon {
    transform: scale(1.15);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: linear-gradient(135deg, #722F37 0%, #8B2635 100%);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(114, 47, 55, 0.4);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 50px;
        opacity: 1;
    }
}

.nav-item-icon {
    font-size: 22px;
    margin-bottom: 2px;
    transition: all 0.3s ease;
    line-height: 1;
}

.nav-item-label {
    font-size: 11px;
    font-weight: 500;
    margin-top: 2px;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.flash-message {
    background: #ff4757;
    color: white;
    padding: 16px 20px;
    margin: 0 0 20px 0;
    text-align: left;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.2);
    position: relative;
    border-bottom: none;
    letter-spacing: 0.2px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.flash-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.flash-text {
    flex: 1;
    line-height: 1.4;
}

@keyframes flashGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.flash-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 2s infinite;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.search-bar {
    width: 100%;
    padding: 16px 18px 16px 48px;
    border: 2.5px solid #e8e8e8;
    border-radius: 16px;
    font-size: 15px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), inset 0 1px 2px rgba(0,0,0,0.02);
}

.search-bar:focus {
    outline: none;
    border-color: #722F37;
    background: white;
    box-shadow: 0 0 0 4px rgba(114, 47, 55, 0.1);
}

.search-bar::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.tabs {
    display: flex;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 28px;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.05);
}

.tab {
    flex: 1;
    padding: 14px 18px;
    text-align: center;
    cursor: pointer;
    color: #666;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    position: relative;
    font-size: 14px;
}

.tab.active {
    color: white;
    background: linear-gradient(135deg, #722F37 0%, #8B2635 50%, #9d2d42 100%);
    background-size: 200% 200%;
    animation: tabGradient 6s ease infinite;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(114, 47, 55, 0.4), 0 2px 6px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-1px);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

@keyframes tabGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.tab:not(.active):hover {
    background: rgba(114, 47, 55, 0.08);
    color: #722F37;
    transform: translateY(-1px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: linear-gradient(135deg, #722F37 0%, #8B2635 50%, #6B2C3E 100%);
    color: white;
    padding: 20px 18px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.stat-card:hover {
    background: linear-gradient(135deg, #8B2635 0%, #9d2d42 50%, #722F37 100%);
    box-shadow: 0 6px 16px rgba(114, 47, 55, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 6px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.25);
    letter-spacing: -1px;
    line-height: 1.1;
}

.stat-label {
    font-size: 11px;
    opacity: 0.98;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    background: linear-gradient(135deg, rgba(114, 47, 55, 0.02) 0%, rgba(139, 38, 53, 0.02) 100%);
    border-radius: 20px;
    border: 2px dashed rgba(114, 47, 55, 0.1);
}

.empty-state-icon {
    font-size: 72px;
    margin-bottom: 24px;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.otp-input {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
    padding: 0 10px;
}

.otp-input input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: #fafafa;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.otp-input input:focus {
    border-color: #722F37;
    background: white;
    box-shadow: 0 0 0 6px rgba(114, 47, 55, 0.15), 0 4px 12px rgba(114, 47, 55, 0.2), inset 0 1px 2px rgba(0,0,0,0.02);
    transform: scale(1.08);
    outline: none;
    border-width: 3px;
}

/* Mobile responsive OTP inputs */
@media screen and (max-width: 414px) {
    .otp-input {
        gap: 8px;
        margin: 25px 0;
        padding: 0 5px;
    }
    
    .otp-input input {
        width: 45px;
        height: 45px;
        font-size: 20px;
        border-radius: 10px;
    }
    
    .otp-input input:focus {
        transform: scale(1.03);
    }
}

/* Very small screens */
@media screen and (max-width: 360px) {
    .otp-input {
        gap: 6px;
    }
    
    .otp-input input {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(14px);
    background: linear-gradient(135deg, #ff4444 0%, #ff6666 100%);
    color: white;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5), 0 0 0 2px white;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(14px) scale(1);
    }
    50% {
        transform: translateX(14px) scale(1.1);
    }
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 10px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #722F37;
}

.filter-chip.active {
    background: linear-gradient(135deg, #722F37 0%, #8B2635 100%);
    color: white;
    border-color: #722F37;
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.3);
    transform: translateY(-2px);
}

.spinner {
    border: 3px solid rgba(114, 47, 55, 0.1);
    border-top: 3px solid #722F37;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

button, .list-item, .card, .tab, .filter-chip, .nav-item {
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 {
    letter-spacing: -0.5px;
    font-weight: 800;
}

h2 {
    font-size: 22px;
    color: #222;
    margin-bottom: 16px;
    font-weight: 800;
}

h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 700;
}

.modal-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

*:focus-visible {
    outline: 2px solid #722F37;
    outline-offset: 2px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #722F37 0%, #8B2635 100%);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8B2635 0%, #722F37 100%);
}

/* App-like enhancements - instant display for fast navigation */
body:not(.loaded) {
    opacity: 0;
    animation: fadeInFallback 0.15s ease-in forwards;
}

body.loaded {
    opacity: 1;
}

/* Fallback: if app.js doesn't load, show content immediately */
@keyframes fadeInFallback {
    to {
        opacity: 1;
    }
}

/* Prevent text selection on UI elements (app-like) */
.card, .tab, .filter-chip {
    -webkit-user-select: none;
    user-select: none;
}

/* Allow text selection on list items and nav items for better accessibility */
.list-item, .nav-item {
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}

/* Better touch targets */
button, .btn, .list-item, .nav-item {
    min-height: 44px;
    min-width: 44px;
}

/* Hide scrollbar on mobile for cleaner look */
@media (max-width: 414px) {
    .container::-webkit-scrollbar {
        width: 0;
        background: transparent;
    }
}

/* Safe area support for notched devices */
@supports (padding: max(0px)) {
    .header {
        padding-top: max(18px, env(safe-area-inset-top));
    }
    
    .bottom-nav {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    
    .screen {
        padding-bottom: max(80px, calc(80px + env(safe-area-inset-bottom)));
    }
}

/* Prevent horizontal scrolling and stretching on mobile */
@media screen and (max-width: 414px) {
    * {
        max-width: 100%;
    }
    
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
    
    .content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    input, textarea, select, button {
        max-width: 100%;
        box-sizing: border-box;
    }
}

