/* --- 基本設定 --- */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: #f7f9fc;
    color: #444;
    line-height: 1.7;
    margin: 0;
    padding: 20px;
}

.logo-bar {
    text-align: center;
    margin: 0 auto 20px auto;
}

.logo-bar img {
    width: 300px;
    height: auto;
}

.container {
    max-width: 800px;
    margin: auto;
    overflow: visible;
    padding: 30px 40px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* フォームと認証ページ */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    text-align: center;
}

.auth-container button {
    background-color: #dc3545;
}
.auth-container button:hover {
    background-color: #c82333;
}


/* --- 見出し --- */
h1, h2, h3 {
    font-weight: 700;
    border: none;
    padding: 0;
    color: #FF69B4; /* ピンク */
}

h1 {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 1.2em;
}

h2 {
    font-size: 1.6em;
    margin-top: 2em;
    margin-bottom: 1em;
}

.event-list li h3 {
    font-size: 1.2em;
    margin-top: 0;
}

/* --- リンク --- */
a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}
a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* h3内のリンクも通常のリンクスタイルを適用 */
.event-list li h3 a {
    color: #007bff;
}
.event-list li h3 a:hover {
    color: #0056b3;
}

/* --- フォーム要素 --- */
form {
    display: flex;
    flex-direction: column;
}

label {
    text-align: left;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input, textarea, select {
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

textarea {
    height: 120px;
    resize: vertical;
}

/* --- ボタン --- */
button {
    color: #fff;
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: #6c757d;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
}
.btn-danger:hover {
    background-color: #c82333;
}

.button-group {
   display: flex;
   flex-direction: row;
   gap: 10px;
   justify-content: center;
}
.button-group.justify-end {
   justify-content: flex-end;
}
.button-group button {
   margin-top: 0;
}

/* --- イベントリスト --- */
.event-list {
    list-style: none;
    padding: 0;
}
.event-list li {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.event-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.event-list li p {
    margin: 5px 0;
    color: #666;
}

/* --- ナビゲーション --- */
.navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.navbar p {
    margin: 0 0 10px 0;
    font-weight: 600;
}
.navbar div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.navbar a {
    margin: 5px 10px;
}

/* PC用ナビゲーションの縦積み・中央揃え */
.navbar-desktop {
    flex-direction: column;
    align-items: center;
}

/* --- 汎用スタイル --- */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mr-20 { margin-right: 20px; }
.no-margin { margin: 0; }
.no-margin-top { margin-top: 0; }
.no-margin-right { margin-right: 0 !important; }
.d-block { display: block; }
.d-flex { display: flex; }
.gap-5 { gap: 5px; }
.gap-10 { gap: 10px; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.p-15 { padding: 15px; }
.bg-light { background-color: #f9f9f9; }
.rounded { border-radius: 8px; }
br.sp-on { display: none; }
.favorite-groups ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.favorite-groups li { background: #fff; border: 1px solid #ddd; border-radius: 20px; padding: 5px 15px; }
.font-sm { font-size: 0.9em; }
.font-bold { font-weight: bold; }
.font-normal { font-weight: normal; }
.color-muted { color: #555; }
.color-danger { color: #dc3545; }
.btn-disabled { background-color: #ccc !important; border-color: #ccc !important; cursor: not-allowed !important; }
.danger-zone { border: 2px solid #dc3545; border-radius: 5px; padding: 20px; }
.danger-zone h2 { color: #dc3545; }

label.font-normal {
    margin-top: 0;
    margin-bottom: 0;
}

.form-choice-group {
    text-align: left;
    margin-bottom: 15px;
}
.form-choice-group.is-center {
    text-align: center;
}
.form-choice-group label {
    margin-right: 20px;
    font-weight: normal;
}
.form-choice-group input {
    width: auto;
    margin-right: 5px;
    vertical-align: middle;
}

.login-prompt {
    text-align: center;
    color: #dc3545;
    font-weight: bold;
    margin-bottom: 10px;
}

/* --- フッターのタグクラウド用 --- */
.tag-cloud-container {
    max-width: 800px;
    margin: 40px auto; /* 上下マージンを設定し、左右autoで中央揃え */
    padding: 0 40px; /* .containerの左右paddingと合わせる */
    box-sizing: border-box; /* paddingを含めて800pxにする */
}
.tag-cloud-container h2 {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}
.tag-cloud-container .tag-list {
    justify-content: center;
}

/* --- フッター --- */
.footer-container {
    max-width: 800px; /* .containerと幅を合わせる */
    margin: 0 auto; /* 左右autoで中央揃え (上下マージンはタグクラウド側で管理) */
    padding: 30px 40px; /* .containerのpaddingと合わせる */
    box-sizing: border-box; /* paddingを含めて800pxにする */
    border-top: 1px solid #eee;
    text-align: center;
}
.footer-links {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 20px;
    text-align: left;
}
.footer-group h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #333;
}
.footer-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-group ul li {
    margin-bottom: 8px;
}
.footer-group ul a {
    font-size: 0.9em;
    color: #555;
    font-weight: normal;
}
.copyright {
    margin-top: 20px;
    font-size: 0.8em;
    color: #888;
}

/* --- 特徴リストのスタイル --- */
.feature-list {
    list-style: none;
    padding-left: 0;
}
.feature-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2em;
    text-align: left;
}
.feature-icon {
    font-size: 1.5em;
    margin-right: 20px;
    color: #FF69B4;
    width: 30px;
    text-align: center;
    flex-shrink: 0;
}
.feature-text h4 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    color: #333;
}
.feature-text p {
    margin: 0;
    color: #555;
    font-size: 1em;
    line-height: 1.8;
}

/* --- ソーシャルログインボタン --- */
.social-login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}
.divider-line {
    flex-grow: 1;
    height: 1px;
    background-color: #ddd;
}
.divider-text {
    padding: 0 15px;
    color: #888;
    font-size: 0.9em;
}

.social-login-btn {
    display: block;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.social-login-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.google-btn {
    background-color: #4285F4;
}
.line-btn {
    background-color: #06C755;
}

/* --- リンクをボタン化するスタイル --- */
.btn {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: white !important;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0;
    line-height: 1.5;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white !important;
}
.btn-primary {
    background-color: #007bff;
}
.btn-primary:hover {
    background-color: #0056b3;
}

/* --- タブナビゲーション --- */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}
.tab-nav a {
    padding: 10px 20px;
    margin-bottom: -2px;
    border: 2px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: #888;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tab-nav a:hover {
    background-color: #f4f4f4;
    text-decoration: none;
}
.tab-nav a.active {
    border-color: #ddd;
    background-color: #fff;
}
.tab-nav a.tab-blue.active {
    border-bottom: 2px solid #fff;
    color: #FF69B4;
}
.tab-nav a.tab-red {
    color: #dc3545;
}
.tab-nav a.tab-red.active {
    border-bottom: 2px solid #fff;
}

.new-badge {
    background-color: #dc3545;
    color: white;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 8px;
    vertical-align: middle;
}

.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}

/* --- ハンバーガーメニュー --- */
#hamburger-btn {
    display: none; /* PCでは非表示 */
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}
#hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #333;
    margin: 5px auto;
    border-radius: 2px;
}

#mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 100;
    padding-top: 20px;
}
#mobile-menu.open {
    transform: translateX(0);
}
#mobile-menu .menu-user-name {
    padding: 15px 20px;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
}
#mobile-menu a {
    display: block;
    padding: 15px 20px;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}
#mobile-menu a:hover {
    background-color: #f9f9f9;
}


#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 99;
}
#overlay.open {
    display: block;
}

.navbar-mobile-welcome {
    display: none;
}

/* --- シェアボタン --- */
#share-buttons {
    text-align:center;
    margin-bottom: 25px;
    margin-top: -10px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
#share-buttons button {
    padding: 5px 12px;
    font-size: 13px;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 0;
    box-shadow: none;
}
#share-buttons button:hover {
    opacity: 0.8;
    transform: none;
    box-shadow: none;
}

#copy-url-btn { background-color: #007bff; }
#share-x-btn { background-color: #000000; }
#share-line-btn { background-color: #06c755; }

/* --- ▼▼▼ アプリ内ブラウザ(WebView)警告 ▼▼▼ --- */
#webview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
}

#webview-box {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 85%;
    max-width: 400px;
}

#webview-box p {
    margin: 0 0 20px 0;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.webview-btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: #007bff;
    color: #fff !important; /* 強制的に白文字 */
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.2s;
}
.webview-btn:hover {
    background-color: #0056b3;
    text-decoration: none;
}
/* --- ▲▲▲ WebView警告ここまで ▲▲▲ --- */


/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
    body {
        padding: 0;
        font-size: 0.9em;
    }
    .container {
        width: 100%;
        padding: 15px;
        box-shadow: none;
        box-sizing: border-box;
    }

    .logo-bar {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    .logo-bar img {
        width: 150px;
    }

    #hamburger-btn {
        display: block;
    }
    /* PC用のナビゲーションを非表示 */
    .navbar-desktop {
        display: none;
    }

    .navbar-desktop div a {
        display: none;
    }

    /* スマホ用のウェルカムメッセージを表示 */
    .navbar-mobile-welcome {
        display: block;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    .navbar-mobile-welcome p {
        margin: 0;
        font-weight: 600;
    }

    h1 { font-size: 1.6em; }
    h2 { font-size: 1.4em; }
    .event-list li h3 { font-size: 1.1em; }
    .feature-text h4 { font-size: 1.0em; }
    .feature-text p { font-size: 0.8em; }

    input, select, textarea, button {
        font-size: 1em;
    }

    .category-actions {
        flex-direction: column;
        width: 100%;
    }
    .category-actions form {
        margin-left: 0 !important;
        margin-top: 15px;
    }

    /* ▼▼▼ スマホ用のタグクラウドとフッターのpadding ▼▼▼ */
    .tag-cloud-container {
        padding: 0 15px; /* スマホの .container の padding(15px)に合わせる */
        margin: 30px auto; /* スマホでは上下マージンを少し詰める */
    }
    .footer-container {
        padding: 30px 15px; /* スマホの .container の padding(15px)に合わせる */
        margin: 0 auto;
    }
    /* ▲▲▲ 修正ここまで ▲▲▲ */

    .footer-links {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-group {
        margin-bottom: 20px;
    }

    .event-list li .d-flex {
        flex-direction: column;
        gap: 15px;
    }
    .event-list li .min-w-150 {
        width: 100%;
        min-width: 0;
        text-align: center;
    }
    .event-list li .button-group {
        flex-direction: column;
        align-items: center;
    }

    #share-buttons {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-top: 0;
    }
    #share-buttons button {
        width: auto;
        max-width: none;
    }

    br.sp-on {
        display: inline;
    }
}

/* --- ハッシュタグリスト --- */
.tag-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 5px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list li {
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    box-shadow: none;
}
.tag-list li:hover {
    transform: none;
    box-shadow: none;
}

.tag-list a {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: #007bff;
    background-color: #e6f2ff;
    padding: 4px 12px;
    border-radius: 15px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}
.tag-list a::before {
    content: "#"; /* タグの先頭に # を自動で追加 */
}

.tag-list a:hover {
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
}
