/* ------------------------------------------------------------ */
/* TÉRKÉPES STÍLUSOK */
/* ------------------------------------------------------------ */

.main-container {
    background-color: #2b3040;
    border-radius: 8px;
    padding: 16px;
    color: #ffffff;
}

.map-container {
    position: relative;
    background-color: #2b3040;
    overflow: hidden;
    min-height: 350px;
    height: 60vh;
    border-radius: 8px;
}

@media (min-width: 768px) {
    .map-container {
        height: calc(85vh - 150px);
    }
}

.sidebar {
    overflow-y: auto;
    max-height: 60vh;
    border-radius: 8px;
    padding: 12px;
    background-color: #007770;
}

@media (min-width: 768px) {
    .sidebar {
        max-height: calc(85vh - 150px);
        border-top: none;
    }
}

/* Custom scrollbar styling - mint az offcanvas menü */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1f2937;
}

/* Régiós lista stílusok */
.regions-container {
    max-height: 300px;
    overflow-y: auto;
}

.region-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.region-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.region-item .region-number {
    display: inline-block;
    background: rgba(255, 255, 255, 0.8);
    color: #2b3040;
    font-weight: bold;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 12px;
    margin-right: 8px;
    min-width: 20px;
    text-align: center;
}

.region-item .region-name {
    font-weight: 600;
    color: #ffffff;
    display: block;
    margin-bottom: 2px;
}

.region-item .region-seat {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-style: italic;
}

.regions-container::-webkit-scrollbar {
    width: 4px;
}

.regions-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.regions-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.regions-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--kozter-yellow);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--kozter-yellow-dark);
}

.controls {
    background-color: #2b3040;
    border-bottom: 1px solid #1f2937;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    color: #ffffff;
}

.btn-custom {
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background-color: var(--kozter-yellow);
    border-color: var(--kozter-yellow);
    color: #0f172a;
}

.btn-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background-color: var(--kozter-yellow-dark);
    border-color: var(--kozter-yellow-dark);
}

.speed-control {
    min-width: 150px;
}

.speed-control input {
    width: 100%;
}

#svgMap {
    width: 100%;
    height: 100%;
    background-color: #2b3040;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    border-radius: 6px;
}

.district-polygon {
    stroke: #ffffff;
    stroke-width: 0.3;
    fill: #EDEDED;
    cursor: pointer;
    transition: all 0.2s ease;
}

.district-polygon:hover {
    stroke-width: 0.6;
    opacity: 0.8;
}

.county-polygon {
    stroke: #8b4513;
    stroke-width: 0.8;
    fill: #EDEDED;
    cursor: pointer;
    transition: all 0.3s ease;
}

.county-polygon:hover {
    fill: #d4c5a9;
    stroke-width: 1.2;
}

.tip-backdrop {
    fill: #ffffff !important;
    fill-opacity: 1 !important;
    opacity: 1 !important;
    stroke: none;
    pointer-events: none;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.map-btn {
    background-color: white;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.map-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1001;
    display: none;
}

.district-label {
    fill: #333333;
    font-size: 3.5px; /* Alapértelmezett méret, JavaScript-ben felülírva */
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: none; /* Eltávolítjuk a text-shadow-t, mert most háttér van */
}

.district-number-background {
    pointer-events: none;
    transition: all 0.2s ease;
}

.district-label-small {
    fill: #333333;
    font-size: 2px;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.labels-hidden {
    display: none;
}

.party-stats h3,
.simulation-stats h3 {
    color: var(--kozter-yellow);
    font-size: 1.1rem;
    border-bottom: 2px solid var(--kozter-yellow);
    padding-bottom: 8px;
}

.party {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    background-color: #374151;
    transition: background-color 0.2s;
    flex-wrap: wrap;
    color: #ffffff;
}

.party:hover {
    background-color: #4b5563;
}

.party-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.party-name {
    font-weight: 600;
    flex: 1;
    font-size: 0.875rem;
    color: #ffffff;
}

.party-seats {
    font-weight: bold;
    font-size: 1rem;
    min-width: 35px;
    text-align: center;
    color: #ffffff;
}

.party-percentage {
    font-size: 0.75rem;
    color: #cbd5e1;
    margin-left: 8px;
    min-width: 45px;
    text-align: right;
}

.party-progress {
    width: 100%;
    height: 6px;
    background-color: #1f2937;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
    margin-left: 32px;
    margin-right: 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.stat-value {
    font-weight: bold;
    color: #ffffff;
}

.progress-container {
    margin: 15px 0;
}

.progress-bar-custom {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.winner-banner {
    background: linear-gradient(135deg, #ffc82e, #ffd96d);
    color: white;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgb(255 200 46 / 27%);
}

.winner-banner h4 {
    color: #2b3040;
    margin: 0;
    font-size: 1.1rem;
}

.simulation-running {
    background: linear-gradient(45deg, #007bff, #6f42c1);
    color: white;
    border-radius: 6px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.batch-status {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.party-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Mobil optimalizációk */
@media (max-width: 576px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.875rem;
    }

    .map-container {
        height: 65vh;
        min-height: 350px;
    }

    .sidebar {
        max-height: 65vh;
    }

    .party-name {
        font-size: 0.8rem;
    }

    .party-seats {
        font-size: 0.9rem;
        min-width: 30px;
    }

    .party-percentage {
        font-size: 0.7rem;
        min-width: 40px;
    }

    .map-controls {
        top: 5px;
        right: 5px;
    }

    .map-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    /* map-megye-controls mobilon 0 border-radius */
    #map-megye-controls {
        border-radius: 0;
    }
}

/* Tablet optimalizációk */
@media (min-width: 577px) and (max-width: 991px) {
    .map-container {
        height: 70vh;
    }

    .sidebar {
        max-height: 70vh;
    }
}

/* Egyéb javítások */
.btn-group-vertical .btn {
    margin-bottom: 0.25rem;
}

.btn-group-vertical .btn:last-child {
    margin-bottom: 0;
}

/* Kézi tippelés popup háttér overlay */
.party-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
}

/* Kézi tippelés popup */
.party-selector-popup {
    position: fixed;
    background: #2b3040;
    border: 2px solid var(--kozter-yellow);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: none;
    min-width: 200px;
    max-width: 360px;
    color: #ffffff;
    /* Középre igazítás */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.party-selector-popup h6 {
    margin: 0 0 12px 0;
    color: var(--kozter-yellow);
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #374151;
    padding-bottom: 8px;
}

.chance-selector-popup {
    max-width: 360px;
}

.chance-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.chance-option-btn {
    width: 100%;
    border: 1px solid #4b5563;
    background: #374151;
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chance-option-btn:hover {
    background: #4b5563;
    border-color: var(--kozter-yellow);
}

.chance-option-muted {
    opacity: 0.75;
}

.chance-hint {
    font-size: 0.75rem;
    color: #cbd5e1;
    text-align: center;
}

.party-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.party-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #374151;
    color: #ffffff;
}

.party-option:hover {
    background-color: #4b5563;
    transform: translateY(-2px);
}

.party-option-color {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-bottom: 4px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.party-option-name {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.1;
    color: #ffffff;
}

.manual-tipping-active .district-polygon,
.manual-tipping-active .county-polygon {
    cursor: crosshair !important;
}

.manual-tipping-active .district-polygon:hover,
.manual-tipping-active .county-polygon:hover {
    stroke-width: 1.5 !important;
    stroke: #007bff !important;
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    font-size: 30px;
    cursor: pointer;
    font-weight: 300;
    color: #000;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    background: #EDEDED;
}

.popup-close:hover {
    color: #dc3545;
}

/* Mobilos optimalizációk a popup-hoz */
@media (max-width: 576px) {
    .party-selector-popup {
        min-width: 280px;
        max-width: 90vw;
        padding: 12px;
        margin: 0 10px;
        /* Biztosítjuk, hogy ne menjen ki a képernyőből */
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .party-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .party-option {
        padding: 10px 6px;
    }
    
    .party-option-color {
        width: 36px;
        height: 36px;
    }
    
    .party-option-name {
        font-size: 0.75rem;
    }
    
    .party-selector-popup h6 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
}

/* ------------------------------------------------------------ */
/* MEGOSZTÁS MODAL STÍLUSOK */
/* ------------------------------------------------------------ */

#shareModalPopup {
    max-width: 500px;
    min-width: 400px;
}

.share-modal-content {
    min-width: 320px;
}

.share-preview-wrapper {
    border: 2px solid var(--kozter-yellow);
    border-radius: 8px;
    overflow: hidden;
    background: #374151;
}

.share-preview-img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    display: block;
    max-width: 100%;
}

.input-group .form-control {
    background-color: #374151;
    border-color: #4b5563;
    color: #ffffff;
}

.input-group .form-control:focus {
    background-color: #374151;
    border-color: var(--kozter-yellow);
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.btn-outline-warning {
    border-color: var(--kozter-yellow);
    color: var(--kozter-yellow);
}

.btn-outline-warning:hover {
    background-color: var(--kozter-yellow);
    border-color: var(--kozter-yellow);
    color: #000;
}

@media (max-width: 576px) {
    #shareModalPopup {
        max-width: 95vw;
        min-width: 320px;
    }
    
    .share-modal-content {
        min-width: 280px;
    }
    
    .share-preview-img {
        max-height: 150px;
    }
}

/* ------------------------------------------------------------ */
/* PATKÓ STÍLUSOK */
/* ------------------------------------------------------------ */


/* Popup stílusok */
.part-popup {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.part-popup.show {
    opacity: 1;
    transform: translateY(0);
}

/* Aktív elemek - eredeti állapot megőrzése */
#patko_holder .path-highlighted {
    /* Az aktív elemek eredeti állapotukban maradnak */
    transition: all 0.15s ease-out;
}

/* Inaktív elemek elsötétítése */
#patko_holder .path-inactive {
    opacity: 0.3;
    transition: all 0.15s ease-out;
}

/* SVG container */
#patko_holder svg {
    display: block;
}

#patko_holder path {
    transition: all 0.15s ease-out;
    stroke-width: 0px;
}

.chart-card {
    background-color: #2b3040;
    border-radius: 8px;
    padding: 16px;
    color: #ffffff;
}

.chart-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--kozter-yellow-dark) !important;
}

.chart-legend {
    display: flex;
    gap: 4px 10px;
    flex-wrap: wrap;
    font-size: 12px;
    margin-bottom: 8px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.parliament-legend .legend-dot {
    width: 24px;
    height: 24px;
    border-radius: 0;
    margin-right: 5px;
}

.note {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 6px;
}

.charts-right .chart-card+.chart-card {
    margin-top: 16px;
}

.parliament-legend .legend-item {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}

/* (Eltávolítva) Parlament csúszkák stílusai - már nem szükséges */

/* Parlament párt popup stílus */
.part-popup {
    position: fixed;
    background: rgba(43, 48, 64, 0.95);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.part-popup.show {
    opacity: 1;
}

/* ------------------------------------------------------------ */
/* MANDÁTUMSZÁMOLÓ STÍLUSOK */
/* ------------------------------------------------------------ */

.mandate-sliders {
    margin-top: 8px;
}

.mandate-slider-item {
    margin-bottom: 8px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-container {
    flex: 1;
    position: relative;
    height: 17px;
    display: flex;
    align-items: center;
}

.slider-track-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 10px;
    background: #1f2937;
    border-radius: 5px;
    z-index: 1;
    transform: translateY(-50%);
}

.slider-track-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 17px;
    width: 0%;
    border-radius: 0 8px 8px 0;
    z-index: 2;
}

.slider-value {
    font-weight: bold;
    color: #ffffff;
    font-size: 14px;
    min-width: 25px;
    text-align: right;
    flex-shrink: 0;
}

.mandate-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 17px;
    background: transparent;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    z-index: 3;
}

.mandate-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--party-color, #cbd5e1);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    position: relative;
    z-index: 4;
}

.mandate-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.mandate-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--party-color, #cbd5e1);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    -moz-appearance: none;
}

.mandate-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.mandate-slider::-webkit-slider-track {
    height: 17px;
    background: transparent;
    border-radius: 3px;
}

.mandate-slider::-moz-range-track {
    height: 17px;
    background: transparent;
    border-radius: 3px;
    border: none;
}

.mandate-summary {
    margin-top: 16px;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #ffffff;
}

.summary-item span:first-child {
    color: #e2e8f0;
}

.summary-item span:nth-child(2) {
    color: var(--kozter-yellow);
    font-weight: bold;
    font-size: 18px;
}

.summary-item span:last-child {
    color: #cbd5e1;
}


/* ------------------------------------------------------------ */
/* ORSZÁGOS TÉRKÉP STÍLUSOK */
/* ------------------------------------------------------------ */

.national-district-polygon {
    transition: fill 0.3s ease, opacity 0.3s ease;
}

.national-district-polygon:hover {
    opacity: 0.9 !important;
    stroke-width: 0.2;
}

.national-district-label {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    fill: #333;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.national-district-label.labels-hidden {
    opacity: 0;
}

#tooltipNational {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    white-space: nowrap;
}

.party-result.final-result {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px;
    background: #f8f9fa;
}

.party-result.final-result:first-child {
    border-color: #ffd700;
    background: #fffbf0;
}

#nationalWinnerBanner {
    border-radius: 8px;
    text-align: center;
    border: none!important;
}

#nationalDemoStatus {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    color: #1976d2;
}

#svgMapNational {
    background: transparent;
    display: block;
    width: 100%;
    height: 100%;
}

/* Slide animációk az eredmények rendezéséhez */
.party-result {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.3s ease;
    transform: translateY(0);
    position: relative;
}

.party-result.animating {
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), 
                opacity 0.3s ease;
}

/* Egyszerű animációs stílus - háttér nélkül */
.party-result.animating {
    /* Nem használunk hátteret vagy shadow-t az animáció során */
    border-radius: 4px;
}

/* ------------------------------------------------------------ */
/* BUDAPEST MINI TÉRKÉP STÍLUSOK */
/* ------------------------------------------------------------ */

.budapest-mini-map {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 200px;
    height: 160px;
    background-color: rgba(43, 48, 64, 0.95);
    border: 2px solid var(--kozter-yellow);
    border-radius: 8px;
    z-index: 1002;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    display: none; /* Alapértelmezetten rejtett, csak országos nézetnél jelenik meg */
    transition: all 0.3s ease;
}

.budapest-mini-map:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: scale(1.02);
}

.budapest-mini-map.show {
    display: block;
}

.budapest-mini-tooltip {
    z-index: 1004;
}

.budapest-mini-title {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    color: var(--kozter-yellow);
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 4px;
    border-radius: 0 0 6px 6px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#svgMapBudapest {
    width: 100%;
    height: 100%;
    background: transparent;
    display: block;
}

.budapest-district-polygon {
    transition: fill 0.3s ease, opacity 0.3s ease, stroke-width 0.2s ease;
    cursor: pointer;
}

.budapest-district-polygon:hover {
    opacity: 0.9 !important;
    stroke-width: 0.3 !important;
    stroke: #ffffff !important;
}

.budapest-district-label {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    fill: #ffffff;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    font-size: 2.4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#tooltipBudapest {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    pointer-events: none;
    z-index: 1003;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: none;
    white-space: nowrap;
    border: 1px solid var(--kozter-yellow);
}

/* Mobil reszponzív stílusok */
@media (max-width: 768px) {
    .budapest-mini-map {
        width: 160px;
        height: 130px;
        top: 5px;
        left: 5px;
    }
    
    .budapest-mini-title {
        font-size: 9px;
    }
    
    .budapest-district-label {
        font-size: 1.8px;
    }
}

@media (max-width: 576px) {
    .budapest-mini-map {
        width: 140px;
        height: 110px;
        top: 3px;
        left: 3px;
    }
    
    .budapest-mini-title {
        font-size: 8px;
    }
    
    .budapest-district-label {
        font-size: 1.5px;
    }
}

/* ------------------------------------------------------------ */
/* CONTROLS TAB STÍLUSOK */
/* ------------------------------------------------------------ */

.controls-tabs .nav-tabs {
    border-bottom: 1px solid #374151;
    margin-bottom: 0;
}

.controls-tabs .nav-link {
    background: #00000036;
    color: #FFF;
    border: solid 1px #000000;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 4px;
    padding: 8px 16px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
}

.controls-tabs .nav-link:hover {
    background: #00000050;
    color: #FFF;
    border-color: #000000;
}

.controls-tabs .nav-link.active {
    background-color: var(--kozter-yellow) !important;
    color: #111827 !important;
    border-color: var(--kozter-yellow) !important;
    border-bottom: 1px solid var(--kozter-yellow) !important;
    z-index: 1;
}

.controls-tabs .tab-content {
    background-color: #374151;
    border: 1px solid #374151;
    border-radius: 0 6px 6px 6px;
    min-height: 80px;
}

.controls-tabs .tab-pane {
    border-radius: 0 6px 6px 6px;
}

/* Mobil optimalizáció a tab-okhoz */
@media (max-width: 576px) {
    .controls-tabs .nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin-right: 2px;
    }
    
    .controls-tabs .tab-content {
        min-height: 60px;
    }
}