/* Common Styles - Shared across all pages */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    padding: 15px;
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Menu Toggle Button */
.menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    cursor: pointer;
    z-index: 1000;
    padding: 10px;
    margin: -10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menu */
.menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 280px;
    height: 100%;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out;
    z-index: 998;
    padding: 70px 0 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.menu.active {
    left: 0;
    transform: translateX(0);
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu ul li {
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.menu ul li:active {
    background-color: rgba(0,0,0,0.05);
}

.menu ul li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 15px 20px;
    -webkit-tap-highlight-color: transparent;
}

.menu ul li a i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
}

.menu ul li a:hover,
.menu ul li a.active {
    color: #007bff;
    background-color: #f8f9fa;
}

/* Content */
.content {
    padding: 15px;
    margin-top: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.menu-active .content {
    transform: translateX(calc(85% - 20px));
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 997;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    body {
        padding: 10px;
    }
    
    .content {
        padding: 10px;
        margin-top: 50px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    body {
        padding: 8px;
    }
    
    .content {
        padding: 8px;
        margin-top: 45px;
    }
}
