body {
    background-color: #f0f0f0;
    background-image: url('assets/background.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

.overlay {
    background-color: rgba(255, 255, 255, 0.85);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}


.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
}

.tooltip-wrapper:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.sidebar {
    width: 250px;
    padding: 1rem;
    background: #fff;
    border-right: 1px solid #eee;
    font-family: sans-serif;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}


.sidebar,
.legend,
.legend-item {
    overflow: visible;
}

.grid-cell {
    width: 40px;
    height: 40px;
    border: 10px solid rgb(135, 135, 135);
    background-color: lightgray;
    cursor: pointer;
}

.grid-cell.selected {
    outline: 2px solid red;
}

.grid-table {
    border-collapse: collapse;
    margin: 20px;
}

.title {
    text-align: center;
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6365aa;
    -webkit-text-stroke: 3px #ffffff;
    text-shadow:
        2px 2px 0 #000000,
        4px 4px 0 rgba(0, 0, 0, 0.3);
    margin: 0.1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.info-button {
    font-size: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #fffefe;
    padding: 0;
}

.info-button:hover {
    color: #9c9c9c;
    text-decoration: underline;
}



.sidebar {
    width: 250px;
    padding: 1rem;
    background: #fff;
    border-right: 1px solid #eee;
    font-family: sans-serif;
}

.sidebar-title {
    margin-top: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.tutorial-message {
    text-align: center;
    margin-top: 0;
    font-size: 0.8 rem;
    font-weight: 600;
    color: #ff0000;
    font-family: sans-serif;
}

.legend,
.policies,
.mandatory,
.city-stats {
    margin-top: 0.5rem;
}

.legend-item,
.policy-item,
.mandatory-item,
.stats-item {
    display: flex;
    align-items: left;
    margin-bottom: 0.5rem;
}

.public-item {
    font-weight: 300;
}

.legend-label,
.policy-label,
.mandatory-label,
.stats-label .public-label {
    flex: 1;
}

.tips {
    font-weight: 300;
    font-size: 0.8rem;
    color: gray;
    margin: 0
}

.legend-buy,
.policy-enact {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #3c7;
    cursor: pointer;
    font-weight: 600;
}

.legend-buy:hover,
.policy-enact:hover {
    text-decoration: underline;
}

.section-box {
    margin-top: 1.5rem;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

.section-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.slider-container {
    display: flex;
    align-items: center;
}

.tax-slider {
    width: 100%;
}

.mandatory-cost {
    margin-left: auto;
    color: #555;
}

.swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}

.public-opinion {
    height: 800px;
    overflow-y: auto;
}

.happiness-bar-container {
    width: 80px;
    height: 14px;
    background: #eee;
    border-radius: 7px;
    overflow: hidden;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
}

.happiness-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #b9e937, #4ecb4e 85%);
    border-radius: 7px 0 0 7px;
    transition: width 0.4s cubic-bezier(.44, 2, .61, -0.6);
}


.button {
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: #3c7;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, transform 0.1s ease;
    width: 150px;
}

.reward-button {
    padding: 0.1rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    background-color: #3c7;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, transform 0.1s ease;
    width: auto;
}

.button:hover,
.reward-button {
    background-color: #36b36e;
    transform: translateY(-1px);
}

.button:active,
.reward-button {
    background-color: #2e9d5e;
    transform: scale(0.98);
}

.policy-enacted {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #e63946;
    cursor: default;
    font-weight: 600;
}

.policy-enacted:hover {
    text-decoration: none;
    cursor: default;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: 'Impact', 'Arial Black', sans-serif;
    color: #333;
}

.modal h2 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #f94144;
    text-transform: uppercase;
    text-shadow:
        1px 1px 0 #000000,
        2px 2px 0 rgba(0, 0, 0, 0.3);
}

.modal p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-family: sans-serif;
    color: #333;
}

.modal-close {
    margin-top: 1.5rem;
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: #e63946;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, transform 0.1s ease;
    width: 150px;
}

.modal-close:hover {
    background-color: #d62839;
    transform: translateY(-1px);
}

.modal-close:active {
    background-color: #b81c2b;
    transform: scale(0.98);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    padding: 1rem;
    z-index: 1000;
}

.modal {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-family: 'Impact', 'Arial Black', sans-serif;
    color: #333;
    text-align: center;
}

.fire-icon {
    width: 40px;
    height: 40px;
}