:root {
    --orange: rgba(255, 140, 0, 1);
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    transition: background-color 0.5s ease;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

h1 {
    font-size: 4em;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    height: 1.2em;
    color: #e0e0e0;
    white-space: nowrap;
    -webkit-text-stroke: 1px #e0e0e0;

}

h1 .demokr,
h1 .ist {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

h1.animated .demokr,
h1.animated .ist {
    opacity: 1;
    transform: translateY(0);
}

h1.animated .demokr {
    animation: hollowOut 1s ease-out 0.5s forwards;
}

h1 .ist {
    font-style: normal;
    animation: skew-animation 1s 0.5s ease-in-out forwards;
}

@keyframes skew-animation {
    from {
        transform: skewX(0deg);
    }

    to {
        transform: skewX(-20deg);
    }
}

@keyframes hollowOut {
    0% {
        color: #e0e0e0;
    }

    100% {
        color: transparent;
    }
}


h1 .ist {
    padding-right: 10px;
}


a {
    color: var(--orange);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #d17f04;
}

#map-container {
    width: 100%;
    max-width: 940px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
}

#map-container svg {
    width: 100%;
    height: auto;
}


.district {
    fill: #444;
    stroke: #eaeaea;
    stroke-width: 1px;
    transition: all 0.3s ease-in-out;
}

.district:hover {
    filter: drop-shadow(0 0 10px rgba(26, 26, 26, 0.4));
    cursor: pointer;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(60, 0, 0, 0);
    pointer-events: none;
    transition: background-color 0.5s ease;
    z-index: -5;
}

.overlay.active {
    background-color: rgba(255, 0, 0, 0.2);
}

/* Tooltip Stilleri */
#tooltip {
    position: absolute;
    background-color: #2b2b2b;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    border: 1px solid #555;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#tooltip.visible {
    opacity: 1;
}

#tooltip .district-name {
    font-weight: bold;
    font-size: 1.2em;
}

#tooltip .party {
    font-style: italic;
    color: #ccc;
}

#tooltip .detained-status {
    font-weight: bold;
    color: #ffcccc;
    background-color: #3b0000;
    padding: 2px 5px;
    border-radius: 3px;
    margin-top: 5px;
    display: inline-block;
}

#info-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 940px;
}

#permanent-info,
#stats-box {
    background-color: #2b2b2b;
    color: #e0e0e0;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #555;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    text-align: center;
    box-sizing: border-box;
}

#permanent-info {
    max-width: 300px;
    font-size: 1.1rem;
}

#stats-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: 400px;
    padding: 10px 20px;
    gap: 20px;
}

#permanent-info .district-name {
    font-weight: bold;
    font-size: 1.5em;
    margin-bottom: 5px;
}

#permanent-info .party {
    font-style: italic;
    color: #ccc;
}

#permanent-info .detained-status {
    font-weight: bold;
    color: #ffcccc;
    background-color: #3b0000;
    padding: 4px 8px;
    border-radius: 5px;
    margin-top: 10px;
    display: inline-block;
    font-size: 1.1em;
}

#stats-text {
    text-align: left;
}

#stats-text #small-text {
    font-size: 0.9em;
    color: #ccc;
}

#stats-text #percentage-text {
    font-size: 1.5em;
    font-weight: bold;
    color: #e0e0e0;
}

#pie-chart-container {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

#detained-mayors-list {
    background-color: #2b2b2b;
    color: #e0e0e0;
    border-radius: 8px;
    border: 1px solid #555;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    margin-top: 20px;
    padding: 15px 20px;
    width: 100%;
    max-width: 654px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detained-mayor-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #444;
}

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

.detained-mayor-item .info {
    font-size: 1.1em;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.detained-mayor-item .district-name-list {
    font-size: 0.8em;
    color: #888;
    font-weight: normal;
    text-transform: uppercase;
}

.detained-mayor-item .info .party {
    font-style: italic;
    color: #ccc;
}

.detained-mayor-item .duration {
    font-weight: bold;
    color: #ffcccc;
    background-color: #3b0000;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.9em;
    text-align: right;
    max-width: 30%;
}

/* Released (TAHLİYE EDİLDİ) list item tint */
.detained-mayor-item.released {
    border-bottom: 1px solid #444;
}

.detained-mayor-item.released .duration {
    background-color: rgba(190, 48, 48, 0.18);
    color: #fff;
}


@media (min-width: 768px) {
    #info-container {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
}

.footer-text {
    font-size: 0.85rem;
    color: #777;
    text-align: center;
    margin-top: auto;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}