:root {
    --primary-color: #5865F2;
    /* Discord Blurpleish */
    --secondary-color: #EB459E;
    /* Accent Pink */
    --text-color: #2c2f33;
    --background-color: #ffffff;
    --card-bg: #f6f6f7;
    --header-height: 70px;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* Layout */
header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
}

nav a.btn-login {
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 600;
}

nav a.btn-login-x {
    background-color: #000;
}

main {
    min-height: calc(100vh - var(--header-height));
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f0f4ff 0%, #fff0f9 100%);
    padding: 80px 5%;
    text-align: center;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    margin-bottom: 50px;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 40px;
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(88, 101, 242, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(88, 101, 242, 0.4);
    opacity: 1;
}

/* Features Section */
.features {
    padding: 50px 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--text-color);
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Recent Events Section (if added) */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin: 60px 0 40px;
    font-weight: 800;
}

/* Footer */
footer {
    border-top: 1px solid #eee;
    padding: 40px 5%;
    text-align: center;
    color: #888;
    margin-top: 80px;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Flash Messages */
blockquote {
    max-width: 800px;
    margin: 20px auto;
    padding: 15px 20px;
    border-radius: 8px;
    background-color: #e0f0ff;
    border-left: 5px solid #0077cc;
}

/* Buttons */
.button {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.button:hover {
    background: #4752c4;
    opacity: 1;
}

.btn-danger {
    display: inline-block;
    background: #ed4245;
    color: #fff;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #c83538;
    opacity: 1;
}

/* Participation Badge */
.participating-badge {
    display: inline-block;
    background: #57f287;
    color: #1a1a2e;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-left: 10px;
    vertical-align: middle;
}

/* Participants Section */
.participants-section {
    margin: 30px 0;
    padding: 20px;
    background: #f6f6f7;
    border-radius: 12px;
}

.participants-section h3 {
    margin-bottom: 15px;
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: #fff;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.participant-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.participant-item.is-friend {
    border-left: 3px solid var(--primary-color);
    background: #f0f4ff;
}

.participant-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.participant-avatar-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.participant-name {
    font-weight: 500;
}

.friend-badge {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

/* 共通コンテンツコンテナ（home以外の全ページ） */
.page {
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 20px 64px;
}

.page > h2 {
    margin-bottom: 18px;
}

/* Event Detail */
.event-detail {
    margin: 0;
}

/* Event list / cards */
.event-card {
    margin: 16px 0;
    padding: 20px 24px;
    background: var(--card-bg);
    border-radius: 12px;
}

.event-card h3 {
    margin-bottom: 10px;
}

/* Status badge */
.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
    color: #fff;
}

.status-upcoming { background: #3ba55d; }   /* 開催前 */
.status-ongoing  { background: #faa61a; color: #1a1a2e; } /* 開催中 */
.status-finished { background: #99aab5; }   /* 終了 */

/* Prefecture tag */
.pref-tag {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 1px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 4px;
}

/* Filter bar */
.filter-bar {
    margin: 0 0 20px;
    padding: 14px 16px;
    background: var(--card-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-bar label {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Discord sub-name in participant list */
.discord-sub {
    color: #888;
    font-weight: 400;
    font-size: 0.8rem;
}

/* Form controls */
form label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

form input[type="text"],
form input[type="datetime-local"],
form textarea,
form select {
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid #d0d0d5;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

form button[type="submit"] {
    display: inline-block;
    margin-top: 20px;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}