/* Enhanced Mobile Styles */
@media screen and (max-width: 767px) {
    /* Body and Layout */
    body {
        padding-top: 60px; /* Space for fixed header */
    }
    
    /* Header Adjustments */
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 900;
        margin-left: 0;
        padding: 10px 15px;
        height: 60px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .header-content {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-direction: row;
    }

    .logo {
        height: 40px;
        margin: 0;
        max-width: 120px;
    }

    .language-selector {
        position: static;
        transform: none;
        margin-left: auto;
        margin-right: 10px;
    }

    .language-selector select {
        font-size: 12px;
        padding: 3px 5px;
    }

    /* Mobile Nav */
    nav {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 60px);
        background-color: #277ab9;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        padding-top: 20px;
        overflow-y: auto;
    }

    nav.active {
        left: 0;
    }

    .nav-links {
        gap: 5px;
        padding-left: 5px;
    }

    nav a {
        padding: 12px 15px;
        font-size: 16px;
    }

    /* Hamburger Menu */
    .hamburger {
        display: block;
        background: transparent;
        border: none;
        font-size: 28px;
        color: white;
        cursor: pointer;
        padding: 5px;
        margin-right: 5px;
    }

    /* Overlay Effect */
    .overlay {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .overlay.active {
        display: block;
    }

    /* Main content */
    main {
        margin-left: 0;
        padding: 15px;
        margin-top: 60px; /* Account for fixed header */
    }

    /* Tab Menu */
    .tab-menu {
        flex-direction: column;
        padding: 0;
    }

    .tab-button {
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid #ddd;
    }

    /* Footer adjustments */
    footer {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        position: static;
        margin-top: 15px;
        justify-content: center;
    }

    /* Form adjustments */
    form {
        padding: 15px;
    }

    /* Table adjustments */
    .table-container {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    /* Construction message */
    .construction-message {
        font-size: 18px;
        padding: 15px;
    }

    /* Auth buttons */
    .auth-buttons {
        display: flex;
        flex-direction: column;
        margin-top: 10px;
    }

    .auth-buttons a {
        margin: 5px 0;
        padding: 8px 15px;
        text-align: center;
    }

    /* Toolbar adjustments */
    .toolbar {
        flex-wrap: wrap;
    }

    .toolbar button {
        margin: 3px;
    }

    /* Logger */
    #logger {
        height: 100px;
        font-size: 14px;
    }
}

/* Additional Mobile-specific Enhancements */
@media screen and (max-width: 480px) {
    /* Even smaller devices */
    .logo {
        max-width: 100px;
    }
    
    .construction-message {
        font-size: 16px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    nav {
        width: 85%;
    }
    
    .tab-content {
        padding: 15px 10px;
    }
}