.gov-calc {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background: linear-gradient(135deg, #74ebd5 0%, #ACB6E5 100%);
    margin: 20px 0;
    padding: 20px;
    min-height: 80vh;
    color: #2c3e50;
    border-radius: 20px;
}

.gov-calc .container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.gov-calc h1,
.gov-calc h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.gov-calc h1 {
    font-size: 2.5em;
}

.gov-calc h2 {
    font-size: 1.8em;
    margin-top: 40px;
}

.gov-calc .input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.gov-calc label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.gov-calc select,
.gov-calc input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.gov-calc select:focus,
.gov-calc input:focus {
    border-color: #74ebd5;
    outline: none;
}

.gov-calc button {
    background: #00b894;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    width: 100%;
    margin-top: 10px;
}

.gov-calc button:hover {
    background: #00a884;
    transform: translateY(-2px);
}

.gov-calc .results {
    margin-top: 30px;
    display: none;
}

.gov-calc .total-days {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    color: #2d3436;
}

.gov-calc .gov-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gov-calc .gov-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.gov-calc .gov-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 5px;
    background: var(--bar-color, #00b894);
    width: var(--percentage);
    transition: width 1s ease-out;
}

.gov-calc .gov-header,
.gov-calc .party-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gov-calc .gov-name,
.gov-calc .party-name {
    font-weight: bold;
    font-size: 1.1em;
}

.gov-calc .gov-percent,
.gov-calc .party-percent {
    font-weight: bold;
    color: var(--bar-color, #00b894);
    font-size: 1.2em;
}

.gov-calc .gov-details {
    font-size: 0.9em;
    color: #636e72;
}

.gov-calc .party-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    color: white;
    background-color: #b2bec3;
    margin-left: 8px;
    vertical-align: middle;
}

/* Pie Chart Styles */
.party-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.pie-chart {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: conic-gradient(var(--chart-gradient));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), inset 0 0 0 2px rgba(255, 255, 255, 0.2);
    position: relative;
    transition: all 1s ease;
}

/* Optional: Donut Hole */
.pie-chart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    padding: 5px 10px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #eee;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Octagon Warning Styles */
.warnings-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.octagon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    background-color: black;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    color: white;
    text-align: center;
    border: 4px solid white;
    box-shadow: 0 0 0 4px black;
    /* Double border effect simulated */
    position: relative;
}

/* Simulate the white internal border with an inner element */
.octagon-border {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 2px solid white;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    pointer-events: none;
}

.octagon-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
    /* Industrial look */
    text-transform: uppercase;
}

.octagon-label {
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 5px;
}

.octagon-party {
    font-size: 1.1em;
    font-weight: 900;
    /* Extra bold */
    line-height: 1.1;
    margin-bottom: 5px;
    border-top: 2px solid white;
    border-bottom: 2px solid white;
    padding: 5px 0;
    width: 90%;
}

.octagon-value {
    font-size: 1.3em;
    font-weight: bold;
}

@media (min-width: 600px) {
    .gov-calc .input-group {
        flex-direction: row;
        align-items: flex-end;
    }

    .gov-calc .input-field {
        flex: 1;
    }

    .gov-calc button {
        width: auto;
        min-width: 200px;
        margin: 0 auto;
        display: block;
    }

    .party-container {
        flex-direction: row;
        justify-content: space-around;
    }

    .legend {
        flex-direction: column;
        width: auto;
        align-items: flex-start;
    }
}