* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

/* App Wrapper - Full viewport */
.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px 20px 20px; /* Top padding for hamburger button */
}

/* Main Container */
.container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 28px;
}

p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ========================================
   HAMBURGER MENU
   ======================================== */

.hamburger-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: #f8f8f8;
    transform: scale(1.05);
}

.hamburger-btn:active {
    transform: scale(0.95);
}

.hamburger-btn span {
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Menu Content */
.menu-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: white;
    box-shadow: 4px 0 20px rgba(0,0,0,0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.menu-overlay.active .menu-content {
    transform: translateX(0);
}

/* Close Button */
.menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.menu-close:hover {
    background: #f0f0f0;
    color: #333;
}

.menu-close:active {
    background: #e0e0e0;
}

/* Menu Navigation */
.menu-nav {
    margin-top: 60px;
    padding: 20px 0;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 25px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    font-size: 16px;
    font-weight: 500;
}

.menu-item:hover {
    background: #f8f9fa;
    border-left-color: #667eea;
}

.menu-item:active {
    background: #e9ecef;
}

.menu-icon {
    font-size: 24px;
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}

/* Hide Install menu item when in standalone mode */
.installed-app .menu-install,
.standalone-mode .menu-install {
    display: none !important;
}

/* Menu Footer */
.menu-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.menu-footer p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.menu-version {
    font-size: 12px !important;
    color: #999 !important;
    margin-top: 5px !important;
}

/* ========================================
   INSTALL BUTTON
   ======================================== */

#installBtn,
.install-btn {
    background: #007AFF;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
    width: auto;
}

#installBtn:hover,
.install-btn:hover {
    background: #0051D5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

#installBtn:active,
.install-btn:active {
    transform: translateY(0);
}

/* iOS Install Prompt Banner */
#ios-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9998;
    animation: slideUp 0.3s ease-out;
    max-width: 90%;
    width: 320px;
    padding: 20px;
    text-align: center;
}

/* Update Notification */
.update-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9997;
    text-align: center;
    max-width: 90%;
    width: 320px;
}

.update-notification p {
    margin: 0 0 10px 0;
    color: #333;
}

.update-notification button {
    background: #007AFF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.update-notification button:last-child {
    background: #666;
}

.update-notification button:hover {
    opacity: 0.9;
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ff3b30;
    color: white;
    padding: 10px;
    text-align: center;
    z-index: 9996;
    font-weight: 600;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hide install elements when app is installed */
.installed-app .install-btn,
.installed-app #installBtn,
.standalone-mode .install-btn,
.standalone-mode #installBtn {
    display: none !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets */
@media (max-width: 768px) {
    .app-wrapper {
        padding: 70px 15px 15px 15px;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .hamburger-btn {
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }
    
    .hamburger-btn span {
        width: 22px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .app-wrapper {
        padding: 60px 10px 10px 10px;
    }
    
    .container {
        padding: 1.25rem;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    p {
        font-size: 15px;
    }
    
    .hamburger-btn {
        top: 10px;
        left: 10px;
        width: 42px;
        height: 42px;
    }
    
    .menu-item {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .menu-icon {
        font-size: 22px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .container {
        max-width: 700px;
        padding: 2.5rem;
    }
    
    h1 {
        font-size: 32px;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}