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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -.022em;
}

.container {
    max-width: 810px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
    padding: 40px 20px 20px;
    text-align: center;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.menu-toggle {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: #007AFF;
    font-size: 18px;
    transition: all 0.2s ease;
}

.menu-toggle:hover {
    background-color: #f0f0f0;
}

.header-spacer {
    width: 34px; /* Same width as menu toggle */
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

.header p {
    font-size: 17px;
    color: #86868b;
    font-weight: 400;
    margin-bottom: 20px;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    z-index: 1000;
}

.side-menu.open {
    left: 0;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.menu-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.menu-close {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: #86868b;
    font-size: 16px;
    transition: all 0.2s ease;
}

.menu-close:hover {
    background-color: #f0f0f0;
    color: #1d1d1f;
}

.menu-nav {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.menu-item:hover {
    background-color: #f0f0f0;
}

.menu-item.active {
    background-color: #f0f0f0;
    color: #007AFF;
}

.menu-item i {
    width: 20px;
    text-align: center;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Search Bar */
.search-container {
    position: relative;
    margin: 0 20px 20px;
}

.search-bar {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border: 1px solid #e5e5e7;
    border-radius: 12px;
    font-size: 16px;
    background-color: #f9f9f9;
    outline: none;
    transition: all 0.2s ease;
}

.search-bar:focus {
    border-color: #007AFF;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-bar::placeholder {
    color: #86868b;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* App List */
.app-list {
    padding: 0 20px 20px;
}

.app-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.app-item:hover {
    background-color: #f9f9f9;
    border-radius: 12px;
    margin: 0 -8px;
    padding: 16px 8px;
}

.app-item:last-child {
    border-bottom: none;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.app-icon i {
    font-size: 24px;
    color: white;
}

.potential-icon {
    background-color: #8B4513; /* Brown */
}

.treat-health-icon {
    background-color: #34C759; /* Green */
}

.feeder-icon {
    background-color: #AF52DE; /* Purple */
}

.vitally-icon {
    background-color: #30B0C7; /* Teal */
}

.app-info {
    flex: 1;
    min-width: 0;
}

.app-info h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #1d1d1f;
}

.app-description {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 2px;
}

.app-date {
    font-size: 13px;
    color: #86868b;
}

.app-price {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    margin-left: 12px;
}

/* Responsive Design */
@media (max-width: 414px) {
    .container {
        max-width: 100%;
        box-shadow: none;
    }
    
    .header {
        padding: 40px 16px 20px;
    }
    
    .search-container {
        margin: 0 16px 20px;
    }
    
    .app-list {
        padding: 0 16px 20px;
    }
}

/* PWA Support */
@media (display-mode: standalone) {
    .container {
        max-width: 100%;
        height: 100vh;
        overflow-y: auto;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.app-item:focus,
.menu-toggle:focus,
.menu-close:focus,
.menu-item:focus {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}
