/* Beautiful resort & beach background theme for TomoTrip */
html, body {
    background: url('/assets/images/beach-yacht-tourists.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
}

.theme-ocean {
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    background: transparent;
}

/* 背景画像レイヤー - 動的効果付き */
.theme-ocean::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/assets/images/beach-yacht-tourists.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    z-index: -1;
    animation: subtleMove 15s ease-in-out infinite;
    will-change: transform, background-position;
}

/* 動的背景アニメーション - ゆっくりとした流れ */
@keyframes subtleMove {
    0% { 
        background-position: center center; 
        transform: scale(1.0) translateZ(0);
    }
    25% { 
        background-position: 60% 40%; 
        transform: scale(1.05) translateZ(0);
    }
    50% { 
        background-position: 40% 60%; 
        transform: scale(1.03) translateZ(0);
    }
    75% { 
        background-position: 55% 45%; 
        transform: scale(1.05) translateZ(0);
    }
    100% { 
        background-position: center center; 
        transform: scale(1.0) translateZ(0);
    }
}

/* パララックス風浮遊エフェクトレイヤー */
.theme-ocean::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 60%),
        radial-gradient(circle at 20% 80%, rgba(0,150,255,0.04) 0%, transparent 60%),
        linear-gradient(45deg, rgba(255,255,255,0.01) 0%, transparent 100%);
    z-index: 0;
    animation: floatingElements 30s linear infinite;
    pointer-events: none;
    will-change: transform;
}

@keyframes floatingElements {
    0% { transform: translateX(-10px) translateY(-5px); }
    25% { transform: translateX(5px) translateY(-10px); }
    50% { transform: translateX(10px) translateY(5px); }
    75% { transform: translateX(-5px) translateY(10px); }
    100% { transform: translateX(-10px) translateY(-5px); }
}

/* Mobile-friendly background for better compatibility */
@media (max-width: 768px) {
    .theme-ocean {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-image: url('/assets/images/beach-yacht-tourists.jpg') !important;
        min-height: 100vh !important;
        width: 100% !important;
    }
    
    .theme-ocean::before {
        background-attachment: scroll !important;
        animation: mobileSubtleMove 25s ease-in-out infinite;
    }
    
    /* モバイル専用の軽いアニメーション */
    @keyframes mobileSubtleMove {
        0%, 100% { background-position: center center; }
        50% { background-position: 52% 48%; }
    }
    
    /* Force background on very narrow screens */
    body.theme-ocean {
        background: url('/assets/images/beach-yacht-tourists.jpg') center center / cover no-repeat scroll !important;
        min-height: 100vh !important;
        width: 100% !important;
    }
}

/* Extra narrow mobile screens (320px and below) */
@media (max-width: 480px) {
    html, body, .theme-ocean {
        background: url('/assets/images/beach-yacht-tourists.jpg') center center / cover no-repeat scroll !important;
        min-height: 100vh !important;
        width: 100vw !important;
    }
    
    /* Ensure full viewport coverage */
    .theme-ocean::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: url('/assets/images/beach-yacht-tourists.jpg') center center / cover no-repeat;
        z-index: -1;
        animation: slowFloat 40s ease-in-out infinite;
    }
    
    @keyframes slowFloat {
        0%, 100% { transform: scale(1) translate(0, 0); }
        50% { transform: scale(1.01) translate(2px, -2px); }
    }
}

.theme-ocean::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    z-index: -1;
}

#main-footer img { 
    max-height: 40px; 
    height: auto; 
    width: auto; 
}

/* Ensure content is visible above background */
.container, .navbar, .modal, .card, .btn {
    position: relative;
    z-index: 1;
}

/* Text readability improvements with yacht background */
.text-white, .navbar-brand, .nav-link {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
}

/* Hero section improvements for yacht background */
.hero-section {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
}

.hero-section h1, .hero-section h2 {
    text-shadow: 3px 3px 8px rgba(0,0,0,0.9);
    color: white !important;
    font-weight: bold;
}

.hero-section p {
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Scroll parallax effect for background */
@media (prefers-reduced-motion: no-preference) {
    .theme-ocean {
        background-attachment: fixed;
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .theme-ocean {
        background-attachment: scroll;
        background-position: center top;
    }
}

/* Language switcher styling - guaranteed center positioning */
.language-switcher-center {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    padding: 0 20px !important;
    text-align: center !important;
}

.language-switcher-center .d-flex {
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
}

.language-switcher-center .lang-btn-jp,
.language-switcher-center .lang-btn-en {
    margin: 0 auto !important;
    text-align: center !important;
}