* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* H1 and H2 Styles - Consistent across all cabintime pages */
h1, .section-header h1 {
    font-size: 32px !important;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    letter-spacing: 1px !important;
    margin-bottom: 20px !important;
    text-transform: none !important;
}

h2, .section-header h2, .section-title {
    font-size: 24px !important;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 15px !important;
    text-transform: none !important;
    position: relative !important;
    display: inline-block !important;
}

/* Remove any pseudo-elements */
.section-header h2::before,
.section-header h2::after {
    display: none !important;
}

body {
    background-color: #000;
    color: #fff;
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #0a1128;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.airline-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.airline-logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.airline-logo:hover {
    opacity: 0.8;
}

.logo-accent {
    color: #00c2ff;
    margin-left: 3px;
}

.flight-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flight-number {
    font-size: 16px;
    font-weight: bold;
    color: white;
}

.flight-status {
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: white;
}

.time-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 18px;
    color: white;
}

.map-container {
    position: relative;
    height: calc(100vh - 120px);
    width: 100%;
    min-height: 400px; /* Ensure minimum height on mobile */
}

#map {
    height: 100%;
    width: 100%;
    min-height: 400px; /* Ensure map has minimum height */
}

/* Google Maps controls positioning to avoid footer overlap */
.gm-style .gm-style-cc {
    bottom: 20px !important; /* Copyright closer to bottom */
}

.gm-style .gmnoprint {
    bottom: 120px !important; /* Position higher on desktop */
    right: 50px !important; /* Move even further left to be fully visible */
}

.gm-style-mtc {
    bottom: 150px !important; /* Move map type controls well above footer */
}

/* Hide Google's attribution text to reduce clutter */
.gm-style .gm-style-cc a {
    font-size: 10px !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.flight-panel {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    min-width: 280px;
    max-width: 320px;
    z-index: 500;
}

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

.route-codes {
    display: flex;
    align-items: center;
    gap: 10px;
}

.airport-code {
    font-size: 22px;
    font-weight: bold;
    color: #333;
}

.route-arrow {
    color: #666;
    font-size: 16px;
}

.airport-names {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 12px 0;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00a8ff, #00c2ff);
    border-radius: 4px;
    width: 24.7%;
    transition: width 1s ease;
}

.aircraft-marker {
    position: absolute;
    top: 50%;
    left: 24.7%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 16px;
    height: 16px;
    background: #ff6b35;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: left 1s ease;
}

.flight-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 15px;
    font-size: 13px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
}

.detail-label {
    color: #666;
    font-size: 12px;
}

.detail-value {
    font-weight: 500;
    color: #333;
}

.bottom-controls {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 500;
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100% - 100px);
}

.control-btn {
    background: rgba(10, 17, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 168, 255, 0.4);
    border-radius: 25px;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 168, 255, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 100px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(0, 168, 255, 0.3);
    border-color: #00c2ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 168, 255, 0.4);
    color: #ffffff;
}

.control-btn.active {
    background: linear-gradient(135deg, #00a8ff, #00c2ff);
    border-color: #00c2ff;
    color: white;
    box-shadow: 0 6px 20px rgba(0, 168, 255, 0.5);
}

/* Footer */
footer {
    width: 100%;
    position: relative;
    padding-bottom: 70px; /* ナビゲーションバーの高さ分の余白 */
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-around;
    background-color: #0a1128;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    border-top: 1px solid #1a3060;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    transition: color 0.3s ease;
    padding: 8px 16px;
}

.nav-item:hover {
    color: #00a8ff;
}

.nav-item.active {
    color: #00a8ff;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-text {
    color: inherit;
    margin-top: 4px;
}

/* Copyright Section */
.copyright {
    background-color: #051e3e;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #aaa;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
}

.copyright p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .header {
        padding: 8px 12px;
    }

    .airline-logo {
        font-size: 16px;
    }

    .flight-number {
        font-size: 14px;
    }

    .flight-panel {
        left: 10px;
        right: 10px;
        max-width: none;
        min-width: auto;
        padding: 12px;
        background: rgba(255, 255, 255, 0.75) !important; /* More transparent on mobile */
    }

    .airport-code {
        font-size: 20px;
    }

    .flight-details {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .bottom-controls {
        bottom: 65px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: column;
        align-items: center;
        max-width: 140px;
        gap: 8px;
    }

    .navbar {
        padding: 8px 0;
    }
    
    .nav-item {
        padding: 6px 12px;
    }

    .control-btn {
        padding: 10px 14px;
        font-size: 12px;
        min-width: 120px;
        width: 120px;
    }

    /* Ensure Google Maps controls are properly positioned on mobile */
    .gm-style .gm-style-cc {
        bottom: 15px !important;
    }

    .gm-style .gmnoprint {
        bottom: 90px !important;
        right: 45px !important;
    }

    .gm-style-mtc {
        bottom: 180px !important;
    }

    /* Fix map height on mobile */
    .map-container {
        height: calc(100vh - 60px) !important;
        min-height: 500px;
    }

    #map {
        height: 100% !important;
        min-height: 500px;
    }
}

/* Additional mobile adjustments for very small screens */
@media (max-width: 480px) {
    .bottom-controls {
        left: 50%;
        transform: translateX(-50%);
        bottom: 50px;
    }

    .control-btn {
        padding: 8px 12px;
        font-size: 11px;
        min-width: 100px;
        width: 100px;
    }

    .gm-style .gmnoprint {
        bottom: 90px !important;
        right: 40px !important;
    }

    .gm-style-mtc {
        bottom: 190px !important;
    }

    .flight-panel {
        background: rgba(255, 255, 255, 0.7) !important; /* Even more transparent on small screens */
    }

    /* Additional map height fix for small screens */
    .map-container {
        height: calc(100vh - 50px) !important;
        min-height: 450px;
    }

    #map {
        height: 100% !important;
        min-height: 450px;
    }
}