/* =========================================
   FG TOURNAMENT - STREET / GREEN NEON THEME
   ========================================= */

:root {
    color-scheme: dark;
    --bg: #09090c;
    --panel: rgba(22, 22, 28, 0.94);
    --panel-light: #202027;
    --red: #00ff66;
    --red-dark: #00a844;
    --white: #f7f7fb;
    --muted: #b5b5c0;
    --border: rgba(0, 255, 102, 0.35);
    --shadow: 0 0 24px rgba(0, 255, 102, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background:
        radial-gradient(ellipse at 10% 10%, rgba(0, 150, 60, 0.20), transparent 38%),
        radial-gradient(ellipse at 90% 55%, rgba(0, 255, 100, 0.11), transparent 35%),
        linear-gradient(135deg, #08080b, #111116 55%, #08080b);
    background-size: 160% 160%;
    color: var(--white);
    font-family: Arial, "Noto Sans JP", sans-serif;
    line-height: 1.65;
    animation: bg-drift 18s ease-in-out infinite alternate;
}

/* Moving red light */
body::before {
    content: "";
    position: fixed;
    inset: -35%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(0, 255, 100, 0.12), transparent 25%),
        radial-gradient(ellipse at 70% 65%, rgba(0, 255, 100, 0.09), transparent 24%);
    filter: blur(35px);
    animation: light-sweep 12s ease-in-out infinite alternate;
}

@keyframes bg-drift {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

@keyframes light-sweep {
    0% { transform: translate(-3%, -2%) rotate(0deg); opacity: 0.55; }
    100% { transform: translate(4%, 3%) rotate(8deg); opacity: 1; }
}

@keyframes red-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 102, 0.2); }
    50% { box-shadow: 0 0 22px rgba(0, 255, 102, 0.48); }
}

header,
.site-header {
    position: relative;
    z-index: 5;
    padding: 24px 20px;
    text-align: center;
    color: white;
    background: linear-gradient(110deg, #09090c, #102519 50%, #09090c);
    border-bottom: 2px solid var(--red);
    box-shadow: 0 5px 28px rgba(255, 20, 45, 0.18);
}

header h1,
.site-header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 1000;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.85);
}

header p,
.site-header p {
    color: var(--muted);
}

.home-link {
    color: var(--white);
    text-decoration: none;
}

.home-link:hover {
    color: #8affb5;
}

main {
    width: min(1100px, calc(100% - 32px));
    margin: 38px auto;
    padding: 0 0 50px;
}

h1, h2, h3 {
    line-height: 1.25;
}

h2 {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

h2, h3 {
    text-shadow: 0 0 14px rgba(0, 255, 102, 0.12);
}

p, li, label {
    overflow-wrap: anywhere;
}

a {
    color: #66ff99;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
    color: white;
    text-shadow: 0 0 10px var(--red);
}

.tournament,
.info,
.bracket,
.champion,
form,
main > .note {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.tournament,
.info {
    padding: 22px;
    margin-bottom: 22px;
}

.tournament {
    position: relative;
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.tournament::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--red);
    box-shadow: 0 0 18px var(--red);
}

.tournament:hover {
    transform: translateY(-4px);
    border-color: var(--red);
    box-shadow: 0 0 28px rgba(0, 255, 102, 0.24);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
input[type="submit"],
a.button,
a.create-button {
    border: 1px solid #00e65c;
    border-radius: 7px;
    padding: 11px 16px;
    background: linear-gradient(135deg, #ff2638, #bd1025);
    color: white;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

button:hover,
input[type="submit"]:hover,
a.button:hover,
a.create-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.13);
    box-shadow: 0 0 18px rgba(0, 255, 102, 0.52);
}

button:active,
input[type="submit"]:active {
    transform: translateY(0);
}

input:not([type="hidden"]),
select,
textarea {
    width: 100%;
    max-width: 100%;
    margin: 6px 0 14px;
    padding: 12px 13px;
    border: 1px solid #41414c;
    border-radius: 7px;
    background: #101015;
    color: white;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(0, 255, 102, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: #92929e;
}

form {
    padding: 18px;
    margin: 12px 0;
}

form button {
    margin: 4px 4px 4px 0;
}

.menu-button {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 20;
}

.menu {
    display: none;
    position: absolute;
    top: 66px;
    right: 18px;
    z-index: 100;
    width: 200px;
    overflow: hidden;
    border: 1px solid var(--red);
    border-radius: 10px;
    background: #111116;
    box-shadow: 0 0 24px rgba(0, 255, 102, 0.3);
}

.menu a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
}

.menu a:hover {
    background: #10321d;
}

.bracket {
    padding: 24px;
    overflow-x: auto;
}

.rounds {
    display: flex;
    gap: 42px;
    min-width: 1000px;
    align-items: flex-start;
}

.round {
    width: 220px;
    flex-shrink: 0;
}

.round-title {
    margin-bottom: 20px;
    padding: 10px;
    border-bottom: 2px solid var(--red);
    color: #66ff99;
    font-weight: 900;
    text-align: center;
}

.match {
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid #45404a;
    border-radius: 9px;
    background: #111116;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.player {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding: 9px;
    border-bottom: 1px solid #34343d;
    background: #17171e;
}

.player:last-child {
    border-bottom: none;
}

.player.winner {
    background: linear-gradient(90deg, rgba(255, 38, 56, 0.30), #19151b);
    color: white;
    font-weight: 900;
    box-shadow: inset 4px 0 var(--red);
}

.player.loser {
    color: #777782;
}

.name {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.score {
    width: 35px;
    flex-shrink: 0;
    color: #39ff85;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.score-button {
    margin: 2px;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 13px;
}

.champion {
    margin-top: 28px;
    padding: 30px;
    border: 1px solid #00e65c;
    text-align: center;
    animation: red-pulse 3s ease-in-out infinite;
}

.champion h2 {
    border: 0;
    color: #39ff85;
}

.champion-name {
    color: white;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 1000;
    text-shadow: 0 0 18px rgba(0, 255, 102, 0.65);
}

ol {
    padding-left: 25px;
}

li {
    margin-bottom: 14px;
}

.note {
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 650px) {
    header,
    .site-header {
        padding: 70px 14px 20px;
    }

    .menu-button {
        top: 12px;
        right: 12px;
    }

    main {
        width: calc(100% - 22px);
        margin: 22px auto;
    }

    .info,
    .tournament {
        padding: 15px;
    }

    .bracket {
        padding: 12px;
    }

    form {
        padding: 12px;
    }

    button {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 参加者名の横に表示するSF6キャラクター画像 */
.participant-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.character-icon {
    width: 48px;
    height: 48px;
    object-fit: cover;
    object-position: top center;
    border-radius: 8px;
    border: 1px solid #555;
    background: #222;
    flex-shrink: 0;
}
