/* ==========================================================
   Original Full Styles (NO DELETIONS)
   ========================================================== */

:root {
    --primary: #003366; 
    --accent: #ff4500; 
    --bg: #f4f7f9; 
    --white: #ffffff; 
    --text-dark: #1a202c;
    --text-muted: #64748b;
    --border-light: #edf2f7;
    --danger: #e11d48;
}

* { box-sizing: border-box; }
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    margin: 0; background-color: var(--bg); color: var(--text-dark); line-height: 1.8;
}

/* Header & Bar */
.preview-mode-bar { background: #e11d48; color: white; text-align: center; font-size: 12px; padding: 6px; position: sticky; top: 0; width: 100%; z-index: 10000; letter-spacing: 1px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.site-header { background: rgba(255, 255, 255, 0.85) !important; backdrop-filter: blur(12px); position: sticky; top: 0; width: 100%; z-index: 1000; border-bottom: 1px solid var(--border-light); padding: 15px 0; }
.header-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.header-logo { font-size: 1.4rem; font-weight: bold; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.lang-switcher { display: flex; gap: 5px; }
.lang-btn { padding: 5px 12px; font-size: 0.85rem; text-decoration: none; color: var(--text-muted); border: 1px solid var(--border-light); border-radius: 6px; transition: 0.2s; }
.lang-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.lang-btn:hover:not(.active) { background: #f8fafc; border-color: var(--accent); color: var(--accent); }

/* Hero Section */
.hero { position: relative; height: 85vh; display: flex; align-items: center; justify-content: center; color: white; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)), url('hero.jpg') center/cover; z-index: 1; background-color: #000; }
.hero-content { position: relative; z-index: 2; width: 100%; max-width: 1200px; padding: 0 20px; }
.killer-phrase { font-size: 4.8rem; font-weight: 900; line-height: 1.1; margin-bottom: 30px; letter-spacing: -1px; }
.current-topic { font-size: 2.2rem; font-weight: 800; border-bottom: 4px solid var(--accent); padding-bottom: 8px; margin-bottom: 20px; display: inline-block; }
.target-text { font-size: 1.8rem; font-weight: 700; display: block; opacity: 0.9; }

/* Components */
.section { padding: 60px 20px; max-width: 1100px; margin: 0 auto; width: 100%; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.2rem; color: var(--primary); position: relative; padding-bottom: 15px; display: inline-block; }
.section-title h2::after { content: ''; position: absolute; bottom: 0; left: 10%; width: 80%; height: 4px; background: var(--accent); }
.card { background: var(--white); padding: 40px; border-radius: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-bottom: 40px; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 30px; }
.item-box { background: var(--white); padding: 25px; border-radius: 15px; border: 1px solid var(--border-light); text-align: center; }
.item-box img { width: 80px; height: auto; margin-bottom: 15px; }
.item-box h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 10px; }
.item-box p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.item-icon { font-size: 3rem; color: var(--accent); margin-bottom: 15px; }
.platform-box { background: var(--primary); color: white; padding: 70px 40px; border-radius: 40px; text-align: center; box-shadow: 0 20px 50px rgba(0,33,102,0.3); }

/* Buttons & Utils */
.btn-accent { background-color: var(--accent); color: white; padding: 16px 40px; border-radius: 50px; font-weight: bold; text-decoration: none; display: inline-block; transition: all 0.3s ease; box-shadow: 0 10px 15px -3px rgba(255, 69, 0, 0.3); border: none; cursor: pointer; }
.btn-accent:hover { transform: translateY(-3px); box-shadow: 0 20px 25px -5px rgba(255, 69, 0, 0.4); background-color: #ff5714; }
.btn-back { display: inline-flex; align-items: center; gap: 10px; color: var(--primary); text-decoration: none; font-weight: bold; padding: 12px 30px; border: 2px solid var(--primary); border-radius: 50px; transition: 0.3s; font-size: 1rem; }
.btn-back:hover { background: var(--primary); color: white; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.mt-40 { margin-top: 40px !important; }
.w-full { width: 100%; }

/* Subpage Detail Styles */
.concept-card { position: relative; overflow: hidden; padding: 50px; }
.concept-title-decorated { color: var(--primary); margin-bottom: 25px; font-size: 1.8rem; border-left: 5px solid var(--accent); padding-left: 20px; }
.rule-card { display: flex; align-items: center; gap: 40px; padding: 30px; margin-bottom: 30px; border-left: 6px solid var(--accent); }
.rule-icon-wrap { width: 100px; text-align: center; font-size: 3.5rem; color: var(--accent); flex-shrink: 0; }
.legal-card { background: var(--white); padding: 60px; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.legal-content li { margin-bottom: 10px; position: relative; list-style-type: none; padding-left: 20px; }
.legal-content li::before { content: "•"; color: var(--accent); font-weight: bold; position: absolute; left: 0; }
.penalty-card { border-left: 6px solid var(--danger); display: flex; gap: 20px; padding: 30px; }
.register-hero { background: linear-gradient(rgba(0,33,102,0.8), rgba(0,33,102,0.9)), url('hero.jpg') center/cover; color: white; padding: 80px 20px; text-align: center; }
.form-container { max-width: 600px; margin: -50px auto 0; position: relative; z-index: 5; }

/* Footer */
.footer-cta { padding: 100px 20px; background-color: #f0f4f8; display: flex; justify-content: center; }
.cta-card { max-width: 800px; width: 100%; background: #001a4d; padding: 60px 40px; border-radius: 40px; color: white; text-align: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.site-footer { background: #ffffff; padding: 60px 0; border-top: 1px solid var(--border-light); text-align: center; }
.footer-nav { margin-bottom: 20px; }
.footer-link { margin: 0 15px; text-decoration: none; color: var(--text-muted); font-size: 0.95rem; transition: 0.3s; }
.footer-link:hover { color: var(--accent); }
.copyright { font-size: 0.85rem; color: var(--text-muted); }

/* Language Switches */
.lang-ja, .lang-en, .lang-zh { display: none !important; }
body.ja-mode .lang-ja { display: block !important; }
body.en-mode .lang-en { display: block !important; }
body.zh-mode .lang-zh { display: block !important; }

/* --- [ADDED] UPLOAD PAGE & SLIM ADAPTATION --- */
.upload-container { max-width: 500px; margin: 10px auto; padding: 0 15px; }
.upload-card-compact { background: var(--white); padding: 25px; border-radius: 20px; box-shadow: 0 8px 25px rgba(0,0,0,0.05); text-align: center; }
.drop-zone { border: 2px dashed var(--primary); border-radius: 12px; background: #fbfcfd; padding: 30px 10px; cursor: pointer; transition: 0.3s; margin-bottom: 15px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.upload-icon { font-size: 2.5rem; color: var(--primary); display: block; }
.upload-limit-notice { background: #fff5f5; color: var(--danger); padding: 10px; border-radius: 8px; margin-top: 15px; font-weight: bold; border: 1px solid #feb2b2; font-size: 0.85rem; display: none; }
.progress-thumb { background: var(--accent); height: 100%; width: 0%; transition: 0.3s; }

/* Global Responsive (logic consolidated) */
@media (max-width: 768px) {
    .killer-phrase { font-size: 3rem; }
    .current-topic { font-size: 1.5rem; }
    .section-title h2 { font-size: 1.8rem; }
    .card { padding: 25px; }
    .hero { height: 70vh; }
    .rule-card { flex-direction: column; text-align: center; gap: 20px; }
    .rule-icon-wrap { width: auto; }
    .legal-card { padding: 30px 20px; }
    .penalty-card { flex-direction: column; gap: 15px; }
    .footer-cta { padding: 60px 20px; }
    .cta-card { padding: 40px 20px; border-radius: 30px; }
    .register-hero { padding: 60px 20px; }
    .form-container { margin-top: -30px; }
}

@media (max-width: 480px) {
    .section { padding: 40px 15px; }
    .upload-container { margin: 5px auto; }
    .upload-card-compact { padding: 15px; }
    .drop-zone { padding: 20px 10px; }
    .mt-40 { margin-top: 20px !important; }
}
/* --- [1] オリジナルデザインを最優先復元 --- */

/* Penaltyアイコンのサイズと色を厳格に固定 */
.penalty-card i, .penalty-card .item-icon {
    font-size: 3rem !important; 
    color: var(--danger) !important; /* Penaltyは赤 */
    flex-shrink: 0;
}

/* Registerのフォーム崩れを修正 */
.form-container { 
    max-width: 600px; 
    margin: -50px auto 40px; /* 下マージンを確保 */
    padding: 0 20px; 
    position: relative; 
    z-index: 5; 
}
.input-field { 
    width: 100%; 
    padding: 15px; 
    border: 2px solid var(--border-light); 
    border-radius: 10px; 
    background: white; /* 背景色を固定 */
}

/* --- [2] upload.php の「タップできない」問題を解消 --- */
/* ファイル選択ボタン(input)を透明にして、ドロップゾーン全体でタップを拾えるようにします */
#video-upload {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0; /* 見えないが、ここをタップすればファイル選択が開く */
    cursor: pointer;
    z-index: 10;
}
.drop-zone {
    position: relative; /* inputを重ねるための基点 */
    border: 2px dashed var(--primary);
    border-radius: 12px;
    background: #fbfcfd;
    padding: 30px 10px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* --- [3] 以下の記述はオリジナル全量をそのまま継承（省略なし） --- */
:root { --primary: #003366; --accent: #ff4500; --bg: #f4f7f9; --white: #ffffff; --text-dark: #1a202c; --text-muted: #64748b; --border-light: #edf2f7; --danger: #e11d48; }
* { box-sizing: border-box; }
body { font-family: "Helvetica Neue", Arial, sans-serif; margin: 0; background-color: var(--bg); color: var(--text-dark); line-height: 1.8; }

.site-header { background: rgba(255, 255, 255, 0.85) !important; backdrop-filter: blur(12px); position: sticky; top: 0; width: 100%; z-index: 1000; border-bottom: 1px solid var(--border-light); padding: 15px 0; }
.header-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.header-logo { font-size: 1.4rem; font-weight: bold; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 10px; }

.hero { position: relative; height: 85vh; display: flex; align-items: center; justify-content: center; color: white; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)), url('hero.jpg') center/cover; z-index: 1; }
.killer-phrase { font-size: 4.8rem; font-weight: 900; line-height: 1.1; margin-bottom: 30px; }

.section { padding: 60px 20px; max-width: 1100px; margin: 0 auto; }
.card { background: var(--white); padding: 40px; border-radius: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-bottom: 40px; }

.site-footer { background: #ffffff; padding: 60px 0; border-top: 1px solid var(--border-light); text-align: center; }
.cta-card { max-width: 800px; margin: 0 auto; background: #001a4d; padding: 60px 40px; border-radius: 40px; color: white; }

/* 統合メディアクエリ */
@media (max-width: 768px) {
    .killer-phrase { font-size: 2.8rem; }
    .form-container { margin-top: -30px; }
    .cta-card { padding: 40px 20px; border-radius: 30px; }
}
/* --- 修正ポイント：Penaltyアイコンの強制固定 --- */
.penalty-card i, .penalty-card .item-icon {
    font-size: 3rem !important;
    color: var(--danger) !important;
}

/* --- 修正ポイント：Register入力項目の余白 --- */
.form-container .input-field {
    background-color: #ffffff !important;
    margin-bottom: 15px;
}

/* --- 修正ポイント：Upload機能（タップと表示） --- */
.upload-container .hidden { display: none !important; }

.drop-zone {
    cursor: pointer;
    position: relative;
    border: 2px dashed var(--primary);
    background: #fbfcfd;
    padding: 30px 10px;
    border-radius: 12px;
    text-align: center;
    transition: background 0.2s;
}
.drop-zone:active { background: #f0f4f8; } /* スマホでのタップフィードバック */

.file-name-text {
    display: block;
    font-weight: bold;
    color: var(--primary);
    word-break: break-all;
    margin-bottom: 5px;
}
.status-ok {
    color: #059669; /* 緑色 */
    font-weight: bold;
    font-size: 0.8rem;
}

/* --- オリジナルCSSをそのまま続けてください --- */

/* --- メディアクエリ（スマホ用サイズ調整） --- */
@media (max-width: 768px) {
    /* ロゴのフォントサイズを 1.4rem -> 1.1rem に抑制 */
    .header-logo {
        font-size: 1.1rem !important;
        gap: 8px;
    }

    /* 多言語ボタンのサイズを 0.85rem -> 0.75rem に、余白も微調整 */
    .lang-btn {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
    }

    /* 既存のスマホ設定も維持 */
    .killer-phrase { font-size: 3rem; }
    .current-topic { font-size: 1.5rem; }
}

/* さらに小さい画面（iPhone SE等）用 */
@media (max-width: 480px) {
    .header-logo {
        font-size: 1.0rem !important; /* さらに小さく */
    }
    .lang-btn {
        padding: 3px 6px !important;
        font-size: 0.7rem !important;
    }
}
/* 送信中のボタンの状態 */
.btn-accent:disabled {
    background-color: #cbd5e0 !important; /* グレーアウト */
    cursor: not-allowed !important;        /* 禁止マークのカーソル */
    transform: none !important;            /* ホバー時の浮き上がりを無効化 */
    box-shadow: none !important;           /* 影を消す */
    opacity: 0.7;
}
/* style.css のメディアクエリ内に追加 */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important; /* iOSの自動ズーム防止 */
    }
}