:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel-alt: #edf3ff;
    --primary: #1f5eff;
    --primary-dark: #163ec7;
    --text: #1d2433;
    --muted: #61708a;
    --border: #dfe7f5;
    --success: #1d9d6c;
    --warning: #d9822b;
    --shadow: 0 18px 40px rgba(21, 38, 74, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
    color: var(--text);
}

img {
    max-width: 100%;
    display: block;
}

button,
a {
    font: inherit;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: #0e1832;
    color: #fff;
    padding: 22px 0;
    box-shadow: 0 10px 24px rgba(4, 11, 24, 0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.8;
}

h1, h2, h3, p {
    margin-top: 0;
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.top-nav a {
    color: #dfe8ff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    transition: 0.2s ease;
}

.top-nav a:hover,
.top-nav a.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.main-content {
    padding: 48px 0 80px;
}

.page-intro {
    margin-bottom: 28px;
}

.page-intro button {
    border: none;
    background-color: #eef4ff;
}

.page-intro .admin-button {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-top: 8px;
    border: none;
    border-radius: 3px;
    background-color: #eef4ff;
    opacity: 0.3;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.page-intro .admin-button:hover {
    opacity: 0.7;
}

.section-label {
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
}

.page-intro h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 5px;
}

.page-intro p:last-child {
    color: var(--muted);
    max-width: 720px;
    line-height: 1.7;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.tournament-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tournament-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(18, 32, 58, 0.12);
}

.tournament-card__image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #dfeafb;
}

.tournament-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    background: rgba(31, 94, 255, 0.1);
    color: var(--primary-dark);
}

.tournament-card__content {
    padding: 20px;
}

.tournament-card__content h3 {
    margin: 14px 0 12px;
    font-size: 1.5rem;
}

.meta-list {
    display: grid;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.96rem;
}

.meta-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.meta-item strong {
    color: var(--text);
    min-width: 76px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.link-button,
.primary-button,
.secondary-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 11px 18px;
    font-weight: 600;
    transition: 0.2s ease;
    cursor: pointer;
}

.primary-button,
.link-button {
    background: var(--primary);
    color: white;
}

.primary-button:hover,
.link-button:hover {
    background: var(--primary-dark);
}

.secondary-button {
    color: var(--text);
    background: #f4f7ff;
    border-color: var(--border);
}

.secondary-button:hover {
    background: #ebf1ff;
}

.detail-layout {
    display: grid;
    gap: 28px;
}

.detail-hero {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.detail-hero__image {
    height: 280px;
    background: #dfeafb;
}

.detail-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero__content {
    padding: 28px;
}

.detail-hero__content h2 {
    margin-bottom: 16px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.detail-description {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.info-card {
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
}

.info-card h3 {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.empty-state {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 40px 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-state h2 {
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--muted);
}

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-nav {
        width: 100%;
    }

    .top-nav a {
        flex: 1 1 auto;
        text-align: center;
    }

    .card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .link-button,
    .secondary-button,
    .primary-button {
        width: 100%;
    }
}
