/* 航空券売機風デザイン */

/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --header-bg: #1a1a1a;
    --content-bg: #e8e8e8;
    --footer-bg: #1a1a1a;
    --button-blue: #0047ab;
    --button-blue-hover: #003580;
    --text-white: #ffffff;
    --text-dark: #333333;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    background: var(--content-bg);
    color: var(--text-dark);
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    margin: 0;
    padding: 0;
}

/* コンテナ */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ヘッダー - 黒背景 */
.header {
    background: var(--header-bg);
    padding: 25px 80px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo-icon {
    font-size: 56px;
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-white);
}

.company-name {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    font-weight: 400;
}

/* メッセージエリア - グレー背景 */
.message-area {
    text-align: center;
    padding: 28px 80px 22px 80px;
    background: var(--content-bg);
}

.message-main {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.message-sub {
    font-size: 20px;
    font-weight: 400;
    color: #666;
    letter-spacing: 0.5px;
    margin: 0;
}

/* 言語選択エリア - カルーセル対応 */
.language-grid {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--content-bg);
    padding: 20px 80px 50px 80px;
    overflow: hidden;
    position: relative;
}

/* カルーセルラッパー */
.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 35px;
    width: 100%;
    max-width: 1700px;
}

/* スクロールボタン */
.scroll-btn {
    background: var(--button-blue);
    border: none;
    border-radius: 12px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(0, 71, 171, 0.35);
    flex-shrink: 0;
    color: var(--text-white);
    font-size: 32px;
    font-weight: 700;
}

.scroll-btn:hover {
    background: var(--button-blue-hover);
    box-shadow: 0 8px 28px rgba(0, 71, 171, 0.45);
    transform: translateY(-2px);
}

.scroll-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(0, 71, 171, 0.35);
}

.scroll-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: none;
}

/* カルーセルコンテナ */
.carousel-container {
    display: grid;
    grid-template-columns: repeat(7, 200px);
    grid-template-rows: repeat(2, 170px);
    gap: 28px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 30px 0;
    flex: 1;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

/* 言語ボタン - テキストベース、2行レイアウト */
.language-btn {
    background: linear-gradient(180deg, var(--button-blue) 0%, #003d99 100%);
    border: none;
    border-radius: 16px;
    width: 200px;
    height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
    box-shadow: 0 8px 24px rgba(0, 71, 171, 0.4),
                0 2px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.language-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}

/* タッチ・ホバー時 */
.language-btn:hover {
    background: linear-gradient(180deg, var(--button-blue-hover) 0%, #002d75 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 71, 171, 0.5),
                0 4px 12px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.language-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 71, 171, 0.4),
                0 2px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.flag {
    font-size: 52px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1;
    letter-spacing: 2px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
    position: relative;
    z-index: 1;
}

.language-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-white);
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* フッター - 黒背景 */
.footer {
    background: var(--footer-bg);
    text-align: center;
    padding: 22px 80px;
    margin-top: auto;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

.footer-text {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* ローディング */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading.active {
    display: flex;
}

.spinner {
    border: 6px solid #e0e0e0;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
    box-shadow: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* アクセシビリティ */
.language-btn:focus-visible {
    outline: 5px solid rgba(255, 255, 255, 0.9);
    outline-offset: 8px;
    box-shadow: 0 12px 32px rgba(0, 71, 171, 0.5),
                0 4px 12px rgba(0, 0, 0, 0.2),
                0 0 0 5px rgba(255, 255, 255, 0.9);
}

/* スクロール可能コンテンツ用の共通スタイル */
.scrollable-content,
.processing-left {
    overflow-y: scroll;  /* autoからscrollに変更して常に表示 */
    overflow-x: hidden;
}

/* カスタムスクロールバー（WebKit系ブラウザ） */
.scrollable-content::-webkit-scrollbar,
.main-content::-webkit-scrollbar,
.payment-method-screen::-webkit-scrollbar,
.complete-screen::-webkit-scrollbar,
.processing-left::-webkit-scrollbar {
    width: 16px;  /* 幅を大きくして見やすく */
}

.scrollable-content::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track,
.payment-method-screen::-webkit-scrollbar-track,
.complete-screen::-webkit-scrollbar-track,
.processing-left::-webkit-scrollbar-track {
    background: #d0d0d0;  /* トラックを濃いめに */
    border-radius: 8px;
    margin: 4px 0;
    border: 2px solid #e8e8e8;
}

.scrollable-content::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb,
.payment-method-screen::-webkit-scrollbar-thumb,
.complete-screen::-webkit-scrollbar-thumb,
.processing-left::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0047ab 0%, #003d99 100%);
    border-radius: 8px;
    border: 2px solid #e8e8e8;
    min-height: 40px;  /* 最小サイズを設定 */
}

.scrollable-content::-webkit-scrollbar-thumb:hover,
.main-content::-webkit-scrollbar-thumb:hover,
.payment-method-screen::-webkit-scrollbar-thumb:hover,
.complete-screen::-webkit-scrollbar-thumb:hover,
.processing-left::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #003580 0%, #002d75 100%);
    border-color: #d0d0d0;
}

/* スクロールバーのボタン（上下の矢印） */
.scrollable-content::-webkit-scrollbar-button,
.main-content::-webkit-scrollbar-button,
.payment-method-screen::-webkit-scrollbar-button,
.complete-screen::-webkit-scrollbar-button,
.processing-left::-webkit-scrollbar-button {
    display: block;
    height: 16px;
    background: #b0b0b0;
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-button:hover,
.main-content::-webkit-scrollbar-button:hover,
.payment-method-screen::-webkit-scrollbar-button:hover,
.complete-screen::-webkit-scrollbar-button:hover,
.processing-left::-webkit-scrollbar-button:hover {
    background: #909090;
}

/* Firefox用スクロールバースタイル */
.scrollable-content,
.main-content,
.payment-method-screen,
.complete-screen,
.processing-left {
    scrollbar-width: auto;  /* thinからautoに変更 */
    scrollbar-color: #0047ab #d0d0d0;
}
