/* =========================================
   基本設定 & 変数
   ========================================= */
:root {
    --primary-color: #e67e22; /* 温かみのあるオレンジ */
    --accent-color: #d35400;  /* 濃いオレンジ（ホバー用） */
    --bg-color: #fdfaf6;      /* 柔らかな背景色 */
    --text-color: #4a4a4a;    /* メイン文字色 */
    --light-text: #888888;    /* 補助文字色 */
    --white: #ffffff;
    --header-height: 80px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Zen Maru Gothic', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.8;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   ヘッダー
   ========================================= */
header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.server-icon {
    height: 50px;
    width: 100px;
    vertical-align: middle;
}

#main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

#main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.3s;
}

#main-nav a:hover {
    color: var(--primary-color);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
}

.dropdown-content a {
    padding: 10px 20px;
    display: block;
    font-size: 0.85rem !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* =========================================
   ヒーロー・メインコンテンツ共通
   ========================================= */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3)), url('../images/hero_bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 140px 20px;
    text-align: center;
}

.badge {
    background: var(--primary-color);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: bold;
}

.hero h1 {
    font-size: 3rem;
    margin: 25px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ip-container {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: inline-block;
    padding: 20px 40px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ip-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

#server-ip {
    font-size: 1.8rem;
    font-weight: bold;
}

.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    position: relative;
}

.section-title span {
    display: block;
    font-size: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 5px;
}

/* =========================================
   ルール・マナーページ専用スタイル (rule-specific)
   ========================================= */

/* 1. 警告・重大な違反用の赤いボックス */
.rule-alert-box {
    background-color: #fff5f5; /* 非常に薄い赤 */
    border-left: 6px solid #e74c3c; /* 警告の赤 */
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.1);
}

.rule-alert-box h3 {
    color: #e74c3c;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* 2. ルール用カードのグリッド */
.rule-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

/* 3. ルール用カード単体 (マナーや禁止事項に使用) */
.rule-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.rule-card:hover {
    transform: translateY(-5px);
}

.rule-card .card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.rule-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 800;
}

.rule-card p {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* 4. 建築ルールや領地保護などの情報ボックス */
.rule-info-box {
    background-color: var(--white);
    border-left: 6px solid var(--primary-color); /* オレンジのアクセント */
    border-radius: 15px;
    padding: 30px;
    margin: 30px auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

/* 5. ルール詳細用リスト */
.rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rule-list li {
    position: relative;
    padding-left: 1.8em;
    margin-bottom: 12px;
    font-size: 1rem;
}

.rule-list li::before {
    content: "●";
    color: var(--primary-color);
    position: absolute;
    left: 0.5em;
    font-size: 0.8em;
    top: 0.1em;
}

.rule-list li strong {
    color: var(--text-color);
    border-bottom: 2px solid rgba(230, 126, 34, 0.2); /* 読みやすくするための下線 */
}

/* =========================================
   ニュース・お知らせ
   ========================================= */
.news-list-container {
    margin-bottom: 2rem;
    background: #fdfdfd;
    border-radius: 12px;
    padding: 10px 20px;
    border: 1px solid #eee;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #888;
    font-size: 0.9rem;
    min-width: 90px;
}

.news-category {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.news-title-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
}

.news-title-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.news-detail-content {
    margin-top: var(--header-height);
    padding-top: 40px;
}

/* =========================================
   フッター：完全修正版
   ========================================= */
footer {
    background-color: #fcfaf7; /* 柔らかな背景色 */
    padding: 60px 20px 40px;
    text-align: center;
    border-top: 1px solid #f0eee9;
}

/* リンクエリア */
.footer-links {
    max-width: 1000px;
    margin: 0 auto 30px;
}

.footer-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 15px;
}

.footer-group a {
    color: #666;
    text-decoration: none !important; /* 下線を強制排除 */
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-group a:hover {
    color: var(--primary-color);
}

.footer-separator {
    color: #ddd;
    user-select: none;
}

/* テキスト・免責事項 */
footer p {
    margin: 10px 0;
}

footer p small {
    display: block;
    font-size: 0.75rem;
    color: #999;
    line-height: 1.8;
}

/* SNSエリア：巨大化防止と丸ボタン化 */
.sns-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.sns-links a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;  /* ボタン自体の幅 */
    height: 44px !important; /* ボタン自体の高さ */
    background-color: #ffffff !important;
    border-radius: 50% !important; /* 強制的に円形 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    text-decoration: none !important; /* リンクの青い線を消す */
    transition: all 0.3s ease;
}

.sns-links a:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 15px rgba(230, 126, 34, 0.15);
}

/* 画像サイズを個別に指定 */
.sns-links a img {
    width: 24px !important;  /* アイコンの見た目のサイズ */
    height: 24px !important;
    object-fit: contain;
    border: none !important;
    padding: 0;
    display: block;
}

/* =========================================
   レスポンシブ (一括管理)
   ========================================= */
@media (min-width: 768px) {
    .vote-button-list {
        flex-direction: row;
    }
    .vote-link-card {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    #main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px 0;
    }
    #main-nav.open {
        display: block;
    }
    #main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .main-motto {
        font-size: 2rem;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .button-area-flex {
        flex-direction: column;
    }
    .status-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}