/* Alapbeállítások és betűtípus: Bahnschrift mindenhol */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Bahnschrift', 'DIN Alternate', 'Franklin Gothic Medium', 'Segoe UI', sans-serif !important;
}

body {
    background-color: #FAF8F5 !important;
    color: #18181B;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Fejléc formázása */
.top-header {
    background-color: #18181B;
    color: #FAF8F5;
    text-align: center;
    padding: 15px 30px;
    border-bottom: 1px solid #27272A;
}

.top-header h1 {
    font-size: 1.4rem;
    font-style: normal;
    letter-spacing: 0.8px;
}

.top-header .red-text {
    color: #FAF8F5;
    background: rgba(250, 248, 245, 0.12);
    border: 1px solid rgba(250, 248, 245, 0.22);
    padding: 3px 10px;
    border-radius: 6px;
    font-style: normal;
}

/* Fő elrendezés (Flexbox) */
.main-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 36px;
    padding: 50px 20px;
    flex: 1;
    flex-wrap: wrap;
}

/* --- Versenyek --- */
.tournaments-section {
    flex: 1;
    max-width: 750px;
}

.tournaments-section h2 {
    color: #18181B;
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.tournament-card {
    background-color: #FFFFFF;
    border-radius: 10px;
    border: 1px solid #E4E0D7;
    display: flex;
    padding: 24px;
    gap: 24px;
    box-shadow: 0 4px 16px rgba(24, 24, 27, 0.05);
}

.tournament-logo {
    width: 140px;
    height: auto;
    border-radius: 6px;
}

.card-right h3 {
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    margin-bottom: 22px;
    font-weight: 600;
}

.badge-green {
    background-color: #18181B;
    color: #FAF8F5;
    padding: 4px 10px;
    border-radius: 5px;
}

.organizer {
    color: #52525B;
    font-weight: normal;
}

/* Gombok szép kiemelésekkel */
.action-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    background: #FFFFFF;
    color: #18181B;
    border: 1.5px solid #CFC9BC;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05);
}

.btn:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(24, 24, 27, 0.12), 0 0 0 2px rgba(24, 24, 27, 0.06);
    border-color: #18181B;
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    border: 1.5px solid #CFC9BC;
    color: #18181B;
    background: #FFFFFF;
}

.btn-outline:hover {
    background-color: #F3F0EA;
    border-color: #18181B;
}

.btn-outline-blue {
    border: 1.5px solid #27272A;
    background-color: #27272A;
    color: #FAF8F5;
}

.btn-outline-blue:hover {
    background-color: #09090B;
    border-color: #09090B;
    color: #FFFFFF;
}

.btn-outline-green {
    border: 1.5px solid #18181B;
    background-color: #18181B;
    color: #FAF8F5;
}

.btn-outline-green:hover {
    background-color: #27272A;
    border-color: #27272A;
    color: #FFFFFF;
}

/* --- Belépés --- */
.login-section {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E4E0D7;
    padding: 32px;
    box-shadow: 0 8px 28px rgba(24, 24, 27, 0.06);
}

.login-title {
    text-align: center;
    font-size: 1.15rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #E4E0D7;
}

.input-group {
    margin-bottom: 15px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #3F3F46;
}

.input-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #CFC9BC;
    border-radius: 8px;
    font-size: 0.96rem;
    background: #FFFFFF;
    color: #18181B;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:hover {
    border-color: #71717A;
}

.input-group input:focus {
    outline: none;
    border-color: #18181B;
    box-shadow: 0 0 0 3.5px rgba(24, 24, 27, 0.09);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 34px;
    width: 20px;
    cursor: pointer;
    opacity: 0.65;
}

.btn-red {
    background-color: #18181B;
    color: #FAF8F5;
    border: 1.5px solid #18181B;
    padding: 12px;
    font-size: 1rem;
    margin-top: 10px;
}

.btn-red:hover {
    background-color: #27272A;
}

.btn-full {
    width: 100%;
}

/* Teszt adatok doboza */
.test-data-box {
    margin-top: 24px;
    padding: 15px;
    background-color: #FAF8F5;
    border: 1px dashed #CFC9BC;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #52525B;
}

.test-data-box p {
    margin-bottom: 10px;
    font-weight: bold;
}

.test-data-box ul {
    list-style: none;
    line-height: 1.6;
}

/* Lábléc */
.bottom-footer {
    background-color: #18181B;
    color: #A1A1AA;
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    margin-top: auto;
}

.bottom-footer p {
    margin-bottom: 5px;
}

/* --- ADMIN PANEL: Fülek (Tabs) dizájn --- */
.admin-container {
    padding: 28px 24px 48px 24px;
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    flex: 1;
}

.tabs {
    display: flex;
    background-color: #FFFFFF;
    border: 1px solid #E4E0D7;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

.tab-button {
    background-color: inherit;
    color: #52525B;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 24px;
    transition: 0.2s;
    font-size: 0.95rem;
    font-weight: 700;
}

.tab-button:hover {
    background-color: #F3F0EA;
    color: #18181B;
}

.tab-button.active {
    background-color: #18181B;
    color: #FAF8F5;
}

.tab-content {
    display: none;
    padding: 28px;
    background-color: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E4E0D7;
    box-shadow: 0 4px 16px rgba(24, 24, 27, 0.05);
    min-height: 400px;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin-bottom: 16px;
    color: #18181B;
    border-bottom: 1px solid #E4E0D7;
    padding-bottom: 10px;
}

/* --- ADMIN PANEL: Táblázatok és Űrlapok --- */
.add-form-container {
    background-color: #FAF8F5;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    border: 1px solid #E4E0D7;
}

.input-field {
    padding: 10px 14px;
    border: 1.5px solid #CFC9BC;
    border-radius: 8px;
    flex: 1;
    background: #FFFFFF;
    color: #18181B;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:hover {
    border-color: #71717A;
}

.input-field:focus {
    outline: none;
    border-color: #18181B;
    box-shadow: 0 0 0 3.5px rgba(24, 24, 27, 0.09);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    background: #FFFFFF;
    border: 1px solid #E4E0D7;
    border-radius: 10px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid #E4E0D7;
    padding: 13px 16px;
    text-align: left;
}

.data-table th {
    background-color: #F3F0EA;
    color: #18181B;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.data-table tr:hover {
    background-color: #FAF8F5;
}

/* --- BÍRÓI PANEL / EREDMÉNYJELZŐ --- */
.scoreboard-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    padding: 20px;
    height: 80vh;
    gap: 20px;
}

.fighter-card {
    flex: 1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.aka-card {
    background-color: #7F1D1D;
    color: #FAF8F5;
    border: 2px solid #991B1B;
}

.shiro-card {
    background-color: #FFFFFF;
    color: #18181B;
    border: 2px solid #CFC9BC;
}

.fighter-title {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.fighter-name {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.score-display {
    font-size: 8rem;
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1;
}

.point-buttons {
    display: flex;
    gap: 15px;
}

.point-buttons button {
    font-size: 1.2rem;
    padding: 15px 30px;
}

.center-console {
    flex: 0.8;
    background-color: #18181B;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #FAF8F5;
}

.match-info h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #A1A1AA;
}

.timer-display {
    font-size: 6rem;
    font-weight: bold;
    color: #FAF8F5;
    margin-bottom: 30px;
}

.timer-controls {
    display: flex;
    gap: 10px;
}

.timer-controls button {
    font-size: 1.2rem;
    padding: 10px 20px;
}

/* --- BÜNTETÉSEK (CHUI & GENTEN) --- */
.penalty-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
    width: 100%;
}

.penalty-box {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    min-width: 140px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chui-box {
    background-color: #F3F0EA;
    color: #18181B;
    border: 1px solid #CFC9BC;
}

.genten-box {
    background-color: #18181B;
    color: #FAF8F5;
    border: 1px solid #3F3F46;
}

.penalty-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.penalty-buttons button {
    font-size: 1rem;
    padding: 10px 18px;
    font-weight: bold;
}

/* --- DRAG AND DROP SORREND --- */
.draggable-row {
    cursor: grab;
    transition: background-color 0.2s;
}

.draggable-row:active {
    cursor: grabbing;
}

.draggable-row.dragging {
    opacity: 0.5;
    background-color: #ECE8DF !important;
}

.draggable-row.drag-over {
    border-top: 3px solid #18181B;
}

/* --- VIZUÁLIS ÁGRAJZ (BRACKET - MONOKRÓM, BAL OLDALI SZÍNES CSÍK NÉLKÜL) --- */
.bracket-wrapper {
    display: flex;
    gap: 32px;
    overflow-x: auto;
    padding: 20px;
    background: #FAF8F5;
    border: 1px solid #E4E0D7;
    border-radius: 10px;
    margin-top: 20px;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    min-width: 250px;
    gap: 15px;
}

.bracket-round h4 {
    text-align: center;
    background: #F3F0EA;
    color: #18181B;
    border: 1px solid #CFC9BC;
    padding: 9px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.bracket-match {
    background: #FFFFFF;
    border: 1px solid #CFC9BC;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(24, 24, 27, 0.04);
}

.bracket-match.finished {
    border-color: #3F3F46;
}

.bracket-fighter {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.94rem;
    border-bottom: 1px solid #E4E0D7;
    border-left: none !important;
}

.bracket-fighter.aka {
    border-left: none !important;
}

.bracket-fighter.shiro {
    border-left: none !important;
    border-bottom: none;
}

.bracket-fighter.winner {
    background-color: #F3F0EA !important;
    color: #18181B !important;
    font-weight: 700;
}

/* --- KATA ZÁSZLÓK (BÍRÓI PANEL & TV) --- */
.flag-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.flag-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    border: 2px solid #3F3F46;
    transition: transform 0.15s;
}

.flag-btn:hover {
    transform: scale(1.08);
}

.flag-aka {
    background-color: #991B1B;
    color: white;
    border-color: white;
}

.flag-shiro {
    background-color: white;
    color: #18181B;
    border-color: #CFC9BC;
}

.flag-draw {
    background-color: #52525B;
    color: white;
}

/* --- KÖZÖNSÉG PANEL KÁRTYÁK (MONOKRÓM) --- */
.tatami-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tatami-live-card {
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(24, 24, 27, 0.05);
    border: 1px solid #E4E0D7 !important;
}

.live-badge {
    background: #18181B;
    color: #FAF8F5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.prep-badge {
    background: #F3F0EA;
    color: #27272A;
    border: 1px solid #CFC9BC;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* --- KATA PONTOZÁS (5 BÍRÓ + MIN/MAX KIEJTÉS) --- */
.kata-judges-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 10px 0 15px 0;
}

.kata-score-input {
    width: 68px;
    padding: 8px 4px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    border: 1.5px solid #3F3F46;
    border-radius: 6px;
}

.tv-judge-box {
    background: #18181B;
    color: #FAF8F5;
    border: 1.5px solid #52525B;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 65px;
    text-align: center;
}

.tv-judge-box.dropped {
    opacity: 0.45;
    text-decoration: line-through;
    border-color: #3F3F46;
    color: #A1A1AA;
}
