/* --- メインコンテンツ --- */
main {
    min-height: 80vh;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 24px 0 24px;
}

/* --- インデックス/アップロードエリア --- */
.index-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    margin-bottom: 32px;
}

.hero h2 {
    font-size: 2rem;
    color: var(--text-main);
    font-weight: 400;
    margin-bottom: 8px;
}

.hero p {
    font-size: 1rem;
    color: var(--text-sub);
}

.upload-area {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px 0 rgba(60,64,67,.3);
}

/* ファイルドロップゾーン (分析ツールらしい清潔感) */
.file-drop-zone {
    position: relative;
    border: 2px dashed var(--border-color);
    background-color: #fbfbfc;
    padding: 60px 40px; /* 上下の余白を少し広げて分析ツール感を出す */
    border-radius: 8px;
    transition: all 0.2s;
    
    /* 中央揃えのコア設定 */
    display: flex;
    flex-direction: column;
    align-items: center;     /* 左右の中央 */
    justify-content: center;  /* 上下の中央 */
    text-align: center;
    min-height: 250px;
}

.file-drop-zone:hover {
    border-color: var(--primary-blue);
    background-color: #f1f7fe;
}

#fileInput {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--primary-blue); /* アイコンを青系にすると分析ツールらしくなります */
    opacity: 0.7;
    display: block; /* 確実に1行占有 */
}

#instructionText {
    font-size: 0.95rem;
    color: var(--text-main);
    text-align: center;
}

/* ボタン (オレンジ系) */
.submit-wrapper {
    margin-top: 32px;
    text-align: center;
}

.btn-submit {
    background-color: var(--accent-orange);
    color: #000; /* オレンジ背景には黒文字がGA風で見やすい */
    border: none;
    padding: 12px 48px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px; /* 丸すぎない角丸 */
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.btn-primary-outline {
    display: inline-block;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    background-color: transparent;
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 12px;
    pointer-events: none; /* inputが上にあるのでクリック判定を無効化 */
    transition: background-color 0.2s;
}

.file-drop-zone:hover .btn-primary-outline {
    background-color: rgba(26, 115, 232, 0.04);
}

/* --- フッター --- */
footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
    text-align: center;
    padding: 24px 0;
    font-size: 0.75rem;
    color: var(--text-sub);
}

#link_jra_van{
    margin-top: 20px;
    text-align: center;
}

/* 免責事項のエリア */
.footer-disclaimer {
    max-width: 800px;        /* 広がりすぎないように制限 */
    margin: 0 auto;          /* 中央配置 */
    margin-bottom: 40px;
    padding-top: 20px;
    border-top: 1px dashed #dee2e6;
    font-size: 0.75rem;
    line-height: 1.6;
}

.copyright strong {
    color: #333;
}

.btn-submit.is-loading {
    opacity: 0.7;
    cursor: not-allowed; /* マウスカーソルを禁止マークに */
    pointer-events: none; /* クリックイベント自体を無効化 */
}

/* --- ログインページ専用 (index.html) --- */
.login-container {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    padding: 48px 40px;
}

.login-container .hero h2 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.login-container .hero p {
    margin-bottom: 40px;
    font-size: 0.95rem;
}

/* Google ログインボタン (公式ガイドライン準拠スタイル) */
.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    color: #3c4043;
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .2s, box-shadow .2s;
    box-shadow: 0 1px 2px rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.btn-google img {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.btn-google:hover {
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
    border-color: #d2d4d7;
}

.btn-google:active {
    background-color: #eeeeee;
}

/* --- サブナビゲーション (Google Dashboard Style) --- */
.header-sub-nav {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 70px; /* ヘッダーの高さ(header-inner)に合わせる */
    z-index: 90;
}

.header-sub-menu {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    list-style: none;
    display: flex;
    justify-content: flex-end; /* 右寄せにする */
    align-items: center;
    height: 48px; /* 少し低めにしてツール感を出す */
}

.header-sub-menu li {
    margin-left: 8px;
}

.header-sub-menu li a {
    display: block;
    padding: 8px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* ホバー時の挙動 */
.header-sub-menu li a:hover {
    background-color: #f1f3f4;
    color: var(--primary-blue);
}

/* ログアウトボタンだけ少し色味を変える (警告の赤を少し混ぜる) */
.header-sub-menu li a.nav-logout {
    color: var(--text-sub);
}

.header-sub-menu li a.nav-logout:hover {
    background-color: #fce8e6;
    color: #d93025;
}

/* スマホ対応: 中央寄せに切り替え */
@media (max-width: 600px) {
    .header-sub-menu {
        justify-content: center;
        padding: 0 10px;
    }
    .header-sub-menu li {
        margin: 0 4px;
    }
    .header-sub-menu li a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

.header-sub-menu i {
    margin-right: 6px;
    opacity: 0.8; /* 少し透かすと文字が主役になってプロっぽいです */
}

.btn-delete-danger {
    background-color: transparent;
    color: #d93025; /* Google等の警告赤 */
    border: 1px solid #d93025;
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-delete-danger:hover {
    background-color: #fce8e6;
    box-shadow: 0 1px 2px rgba(217, 48, 37, 0.2);
}

/* --- Index Page Optimized Styles --- */

.index-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ログインカードの強化 */
.login-container {
    text-align: center;
    padding: 60px 40px !important;
    margin-bottom: 80px;
    background: #fff;
    border-radius: 24px !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.badge-new {
    display: inline-block;
    background: #e8f0fe;
    color: #1a73e8;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.login-note {
    font-size: 0.8rem;
    color: #70757a;
    margin-top: 20px;
}

/* プレビューセクションのレイアウト */
.preview-title {
    text-align: center;
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 40px;
    font-weight: 700;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

/* ブラウザウィンドウ風の装飾 */
.preview-item {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.preview-item:hover {
    transform: translateY(-8px);
}

.browser-bar {
    background: #f1f3f4;
    padding: 12px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #dadce0;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.red { background: #ea4335; }
.yellow { background: #fbbc05; }
.green { background: #34a853; }

.preview-img-container {
    background: #fff;
    line-height: 0;
}

.preview-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.preview-caption {
    padding: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #5f6368;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #eee;
}

/* モバイル対応：縦並びにする */
@media (max-width: 768px) {
    .preview-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .login-container {
        padding: 40px 20px !important;
    }
}

@media (max-width: 480px) {
    .matome_header_title {
        font-size: 1.1rem; /* 少し小さくして1行に収まりやすく */
    }

    .header-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    .header-nav {
        margin-left: 0; /* 左余白をリセット */
    }

    .nav-portal-link span {
        display: none; /* スマホでは「Home」の文字を消してアイコンだけにする */
    }
}