/* 全体のリセットと基本設定 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #ffffff;
    
    /* スクロールした先でも奥にイラストが超うっすら見えるように背景を設定 */
    background-image: linear-gradient(rgba(17, 17, 17, 0.93), rgba(17, 17, 17, 0.93)), url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 背景画像を画面の奥に固定 */
    
    line-height: 1.6;
}

/* --- ヘッダーのデザイン --- */
/* --- ヘッダーのデザイン --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.0);
    z-index: 100;
    transition: all 0.4s ease;
}

header.scrolled {
    background-color: rgba(15, 15, 15, 0.95);
    border-bottom: 2px solid #ff4500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.header-inner {
    display: flex;
    align-items: center; /* justify-contentを削除して自動調整させます */
    padding: 10px 40px;
    max-width: 1400px;
    margin: 0 auto;
    height: 80px;
}

/* 左側のロゴエリア（左側の重り） */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1; /* 【追加】横幅の割合を1にする */
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease;
}

.header-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.header-logo-img {
    height: 50px;
    width: 50px;
    object-fit: cover;
    border-radius: 50%;
}

.header-tournament-name {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* 【今回追加】右側の透明な重り */
.header-spacer {
    flex: 1; /* 左のロゴと同じ重さ（割合1）にする */
    transition: all 0.4s ease;
}

/* スクロールされた時、右側の重りを「ゼロ」にしてメニューを右に押し出す */
header.scrolled .header-spacer {
    flex: 0; 
}

/* ヘッダー右側リンク */
.header-nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
}

.header-nav a {
    color: #cccccc;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    padding: 12px 20px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: block;
}

.header-nav a:hover {
    color: #ffffff;
    background-color: rgba(255, 69, 0, 0.2);
}

.header-nav a.active {
    color: #ffffff;
    border-bottom: 2px solid #ff4500;
}

/* --- トップの背景と中央ロゴ --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(17,17,17,1) 100%);
}

#center-logo-container {
    position: relative;
    z-index: 10;
    transition: all 0.4s ease;
    text-align: center;
}

#center-logo {
    max-width: 350px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255,69,0,0.6));
}

#center-logo-container.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* スクロールを促すエフェクト */
.scroll-prompt {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    letter-spacing: 2px;
    font-weight: bold;
    font-size: 11px;
    transition: opacity 0.3s ease;
}

.scroll-prompt.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-prompt span {
    display: block;
    margin-bottom: 10px;
    color: #aaaaaa;
    text-shadow: 0 2px 4px rgba(0,0,0,1);
}

/* 3つの矢印を縦に並べる入れ物 */
.chevron-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
}

/* 「＞」を下向きにしたV字のパーツ */
.chevron {
    width: 14px;         /* 矢印の幅 */
    height: 14px;        /* 矢印の高さ */
    border-right: 3px solid #ff4500;  /* 右側の赤い線 */
    border-bottom: 3px solid #ff4500; /* 下側の赤い線 */
    transform: rotate(45deg);         /* 45度回転させてV字にする */
    margin-top: -6px;                 /* マイナスにして矢印同士を少し重ねる */
    animation: chevronFlow 1.5s infinite ease-in-out; /* 光って流れるアニメーション */
}

/* 2つ目と3つ目の矢印の光るタイミングを少し遅らせる */
.chevron:nth-child(1) { animation-delay: 0s; }
.chevron:nth-child(2) { animation-delay: 0.15s; }
.chevron:nth-child(3) { animation-delay: 0.3s; }

/* 上から下に光りながら流れるアニメーションの定義 */
@keyframes chevronFlow {
    0% { 
        opacity: 0; 
        transform: translateY(-5px) rotate(45deg); 
    }
    50% { 
        opacity: 1; 
    }
    100% { 
        opacity: 0; 
        transform: translateY(10px) rotate(45deg); 
    }
}

/* --- メインコンテンツ共通部分 --- */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
    z-index: 5;
}

/* 【今回追加】トップイラストが無いサブページ（応募フォーム等）用のマージン調整 */
.sub-page-main {
    padding-top: 140px; /* ヘッダー（80px）の下に綺麗に収まるように余白を確保 */
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #ff4500;
    letter-spacing: 2px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #ffffff;
    margin: 10px auto 0;
}

/* --- 大枠の四角を「すりガラス風の透けるカード」に進化させる --- */
section {
    margin-bottom: 100px;
    /* 背景の黒をかなり薄くして、透明感をアップ */
    background-color: rgba(10, 10, 10, 0.4); 
    padding: 50px 40px;
    border-radius: 16px; /* 角を少し丸くして柔らかく */
    /* 枠線を真っ暗ではなく「うっすら光る白い線」にして高級感を出す */
    border: 1px solid rgba(255, 255, 255, 0.08); 
    
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); /* 影をつけてカードを浮かせる */
}

/* 画像を正方形にする設定 */
.square-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #333;
}

/* 主催セクション */
.organizer-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.organizer-img {
    max-width: 180px;
    margin-bottom: 20px;
    border-color: #ff4500;
}

.organizer-container h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.organizer-container a {
    color: #888888;
    font-size: 22px; /* アイコンの大きさ */
    text-decoration: none;
    transition: all 0.2s ease;
}

/* マウスを乗せたときのアクション */
.organizer-container a:hover {
    color: #ff4500;        /* おなじみの赤ラインの色に光る */
    transform: scale(1.2); /* 少しだけ大きくなる */
}

.organizer-description {
    color: #cccccc;
    font-size: 16px;
    text-align: left;
}



/* 運営陣セクション */
.staff-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

/* --- スタッフ個別の四角もスタイリッシュに --- */
/* --- スタッフ個別の四角もスタイリッシュに（縦長＆アイコン追加） --- */
.staff-card {
    flex: 1;
    display: flex;
    flex-direction: column; /* 中身を縦並びに設定 */
    align-items: center;    /* 中央揃え */
    min-height: 340px;      /* 【重要】カードを少し大きく縦長にする */
    background-color: rgba(0, 0, 0, 0.3);
    padding: 30px 20px;     /* 上下の余白を広げてスタイリッシュに */
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.staff-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 69, 0, 0.4);
}

.staff-card img {
    max-width: 130px;       /* 写真の大きさはそのままキープ */
    margin: 0 auto 15px;
}

/* 名前と肩書きのエリア */
.staff-info {
    flex-grow: 1;           /* 【魔法】ここの高さを自動で伸ばして、アイコンを一番下に押しやる */
    text-align: center;
}

.staff-info h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.staff-info p {
    font-size: 14px;
    color: #aaaaaa;
}

/* --- 【今回追加】SNS＆配信アイコンのスタイル --- */
.staff-socials {
    display: flex;
    gap: 15px;
    margin-top: 20px; /* 上の文字との隙間 */
}

.staff-socials a {
    color: #888888;
    font-size: 22px; /* アイコンの大きさ */
    text-decoration: none;
    transition: all 0.2s ease;
}

/* マウスを乗せたときのアクション */
.staff-socials a:hover {
    color: #ff4500;        /* おなじみの赤ラインの色に光る */
    transform: scale(1.2); /* 少しだけ大きくなる */
}

/* --- 【今回追加】応募フォーム（entry.html）用のスタイル --- */
.entry-subtitle {
    text-align: center;
    color: #cccccc;
    margin-top: -20px;
    margin-bottom: 40px;
}

.form-wrapper {
    background-color: #ffffff; /* フォームの背景を白にして見やすく */
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.entry-notice {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 25px;
    border-radius: 6px;
    border-left: 4px solid #ff4500; /* 注意事項の横に赤ライン */
}

.entry-notice h3 {
    font-size: 18px;
    color: #ff4500;
    margin-bottom: 10px;
}

.entry-notice ul {
    padding-left: 20px;
    color: #dddddd;
}

.entry-notice li {
    margin-bottom: 8px;
}

/* --- 【今回追加】エラー画面（404.html）用のスタイル --- */
.error-page {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.error-container {
    background-color: rgba(26, 26, 26, 0.85);
    padding: 60px 40px;
    border-radius: 16px;
    border: 2px solid #ff4500; /* エラー箱の周りを赤ラインで囲む */
    box-shadow: 0 0 30px rgba(255,69,0,0.2);
    
    max-width: 500px;
    width: 90%;
}

.error-code {
    font-size: 96px;
    font-weight: 900;
    color: #ff4500;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255,69,0,0.5);
}

.error-title {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.error-divider {
    width: 60px;
    height: 2px;
    background-color: #ffffff;
    margin: 0 auto 25px;
}

.error-message {
    color: #cccccc;
    font-size: 15px;
    margin-bottom: 35px;
    line-height: 1.8;
}

/* リトライ（戻る）ボタン */
.btn-retry {
    display: inline-block;
    color: #ffffff;
    background-color: #ff4500;
    text-decoration: none;
    font-weight: bold;
    padding: 14px 35px;
    border-radius: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(255,69,0,0.4);
}

.btn-retry:hover {
    background-color: #e03d00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,69,0,0.6);
}

/* --- 【今回追加】大会概要（ABOUT）セクションのスタイル --- */
.about-grid {
    display: flex;
    flex-wrap: wrap; /* 画面が狭いと自動で改行されるようにする */
    gap: 20px;
}

.about-item {
    flex: 1 1 calc(50% - 20px); /* 基本は横に2つ並べる設定 */
    background-color: rgba(0, 0, 0, 0.3); /* スタッフカードと同じ透ける黒 */
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-left: 4px solid #ff4500; /* 左側に赤ラインを入れて引き締める */
}

.about-item h3 {
    font-size: 16px;
    color: #aaaaaa;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.about-item p {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
}

/* スマホ対策 */
@media (max-width: 768px) {
    .staff-grid { flex-direction: column; }
    .header-inner { padding: 10px 15px; }
    .header-tournament-name { display: none; }
    section { padding: 30px 20px; }
    .error-code { font-size: 72px; }
}