
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        background: #0d1421;
        color: #ffff;
        line-height: 1.6;
    }
    
    .container {
        max-width: 1600px;
        margin: 0 auto;
        padding: 20px;
    }
    

    .btn.loading {
    position: relative;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn.loading .btn-text {
    visibility: hidden;
}



.loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid #0d1421;
    border-top: 3px solid #ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn.loading .loader {
    display: block;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
    .header {
        text-align: center;
        margin-bottom: 40px;
        padding: 20px;
        background: linear-gradient(135deg, rgba(30, 35, 41, 0.8) 0%, rgba(43, 49, 57, 0.8) 100%);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        border: 1px solid rgba(43, 49, 57, 0.5);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        animation: slideDown 0.5s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .header h1 {
        font-size: 28px;
        font-weight: 600;
        color: #1cd7c0;
        margin-bottom: 8px;
    }

        
    .header h4 {
        font-size: 16px;
        font-weight: 400;
        color: #fff;
        margin-bottom: 8px;
    }
    
    .header p {
        color: #848e9c;
        font-size: 16px;
    }
    
    .input-section {
        background: rgba(30, 35, 41, 0.8);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        border: 1px solid rgba(43, 49, 57, 0.5);
        margin-bottom: 30px;
        overflow: hidden;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        animation: fadeIn 0.6s ease-out 0.2s backwards;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    .section-header {
        padding: 20px 24px;
        border-bottom: 1px solid #2b3139;
        background: #181a20;
    }
    
    .section-title {
        font-size: 18px;
        font-weight: 600;
        color: #ffff;
        margin-bottom: 4px;
    }
    
    .section-subtitle {
        color: #848e9c;
        text-align: justify;
        font-size: 12px;
    }

    .section-subtitle-two {
        color: #fff;
        text-align: left;
 
        font-size: 14px;
    }
    
    .input-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1px;
        background: #2b3139;
    }
    
    .party-row {
        background: #1e2329;
        padding: 16px 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: all 0.3s ease;
    }
    
    .party-row:hover {
        background: #2b3139;
        transform: translateX(5px);
    }
    
    .party-info {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
    }
    
    .party-color {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        flex-shrink: 0;
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.2); }
    }
    
    .party-name {
        font-weight: 500;
        color: #ffff;
        font-size: 14px;
    }
    
    .input-group {
        display: flex;
        gap: 16px;
        align-items: center;
    }
    
    .input-field {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .input-label {
        font-size: 12px;
        color: #848e9c;
        font-weight: 500;
    }
    
    .input-box {
        background: #0d1421;
        border: 1px solid #2b3139;
        border-radius: 6px;
        padding: 8px 12px;
        color: #ffff;
        font-size: 14px;
        width: 80px;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .input-box:focus {
        outline: none;
        border-color: #1cd7c0;
        box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.1);
    }
    
    .input-box.error {
        border-color: #f6465d;
        animation: shake 0.3s;
    }
    
    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-5px); }
        75% { transform: translateX(5px); }
    }
    
    .validation-info {
        background: #181a20;
        padding: 16px 24px;
        border-top: 1px solid #2b3139;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .validation-item {
        display: flex;
        align-items: center;
        font-weight: bold;
        gap: 8px;
        font-size: 14px;
    }
    
    .validation-status {
        width: 20px;
        height: 20px;
        border-radius: 100%;
        background: #ff0022;
        transition: all 0.3s ease;
    }
    
    .validation-status.valid {
        width: 20px;
        height: 20px;
        border-radius: 100%;
        background: #00ff9d;


        animation: checkmark 0.5s ease;
    }
    
    @keyframes checkmark {
        0% { transform: scale(0); }
        50% { transform: scale(1.2); }
        100% { transform: scale(1); }
    }
    
    .controls {
        display: flex;
        gap: 12px;
        justify-content: center;
        margin: 24px 0;
        flex-wrap: wrap;
    }
    
    .btn {
        background: #1cd7c0;
        color: #0d1421;
        border: none;
        padding: 12px 24px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }
    
    .btn:hover::before {
        width: 300px;
        height: 300px;
    }
    
    .btn:hover {
        background: #0e6c60;
        color:#fff;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    .btn:active {
        transform: translateY(0);
    }
    
    .btn-secondary {
        background: #2b3139;
        color: #ffff;
    }
    
    .btn-secondary:hover {
        background: #3c4043;
    }

        .btn-third {
        background: #fff;
        color: #2b3139;
        font-size:12px;
        padding:8px;
    }
    
    .btn-third:hover {
        background: #3c4043;
    }
    
    .results {
        display: none;
        animation: slideUp 0.5s ease-out;
    }
    
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .result-card {
        background: rgba(30, 35, 41, 0.8);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        border: 1px solid rgba(43, 49, 57, 0.5);
        margin-bottom: 24px;
        overflow: hidden;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        transition: transform 0.3s ease;
    }
    
    .result-card:hover {
        transform: translateY(-5px);
    }
    
    .card-header {
        padding: 20px 24px;
        border-bottom: 1px solid #2b3139;
        background: #181a20;
    }
    
    .card-title {
        font-size: 18px;
        font-weight: 600;
        color: #ffff;
    }
    
    .card-content {
        padding: 24px;
    }
    
    .results-table {
        width: 100%;
        border-collapse: collapse;
        background: #1e2329;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .results-table th {
        background: #181a20;
        padding: 16px;
        text-align: left;
        font-weight: 600;
        font-size: 12px;
        color: #848e9c;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 1px solid #2b3139;
    }
    
    .results-table td {
        padding: 16px;
        border-bottom: 1px solid #2b3139;
        font-size: 14px;
    }
    
    .results-table tr {
        transition: background-color 0.2s ease;
    }
    
    .results-table tr:hover {
        background: #2b3139;
    }
    
    .party-cell {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .seat-number {
        font-weight: 600;
        color: #ffff;
    }
    
    .percentage-bar {
        background: #0d1421;
        height: 6px;
        border-radius: 3px;
        overflow: hidden;
        margin-top: 4px;
    }
    
    .percentage-fill {
        height: 100%;
        border-radius: 3px;
        transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
        animation: fillAnimation 1.2s ease-out;
    }
    
    @keyframes fillAnimation {
        0% { width: 0% !important; }
    }
    
    .parliament-visual {
        display: grid;
        grid-template-columns: repeat(20, 1fr);
        gap: 2px;
        padding: 10px;
        background: #0d1421;
        border-radius: 8px;
        margin: 10px 0;
    }
    
    .seat {
        aspect-ratio: 1;

        border-radius: 2px;

    }
    

    
    .government-status {
        padding: 16px;
        border-radius: 8px;
        margin: 16px 0;
        font-weight: 500;
    }
    
    .status-majority {
        background: rgba(2, 192, 118, 0.1);
        border: 1px solid #02c076;
        color: #02c076;
    }
    
    .status-supermajority {
        background: rgba(240, 185, 11, 0.1);
        border: 1px solid #1cd7c0;
        color: #1cd7c0;
    }
    
    .status-coalition {
        background: rgba(246, 70, 93, 0.1);
        border: 1px solid #f6465d;
        color: #f6465d;
    }
    
    .coalition-list {
        background: #0d1421;
        border-radius: 8px;
        padding: 16px;
        margin-top: 16px;
    }
    
    .coalition-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #2b3139;
    }
    
    .coalition-item:last-child {
        border-bottom: none;
    }
    
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
        margin: 20px 0;
    }
    
    .stat-item {
        background: #0d1421;
        padding: 16px;
        border-radius: 8px;
        text-align: center;
        transition: transform 0.3s ease;
    }
    
    .stat-item:hover {
        transform: scale(1.05);
    }
    
    .stat-value {
        font-size: 24px;
        font-weight: 600;
        color: #1cd7c0;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 12px;
        color: #848e9c;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .error-message {
        background: rgba(246, 70, 93, 0.1);
        border: 1px solid #f6465d;
        color: #f6465d;
        padding: 12px 16px;
        border-radius: 6px;
        margin: 16px 0;
        font-size: 14px;
        animation: slideDown 0.3s ease;
    }
    
    .download-section {
        margin-top: 30px;
        padding: 20px;
        background: rgba(30, 35, 41, 0.8);
        border-radius: 12px;
        text-align: center;
    }

    /* Mobile responsive adjustments */
    @media (max-width: 768px) {
        .container {
            padding: 10px;
        }
        .input-grid {
            grid-template-columns: 1fr;
        }
        .card-content {
            overflow-x: auto;
            padding: 16px;
        }
        .results-table {
            min-width: 600px;
        }
        .parliament-visual {
            grid-template-columns: repeat(10, 1fr);
        }
        .controls {
            flex-direction: column;
        }
        .btn {
            width: 100%;
        }
    }

    /* Desktop wider layout */
    @media (min-width: 769px) {
        .container {
            max-width: 1600px;
        }
        .input-grid {
            grid-template-columns: repeat(2, 1fr);
        }
        .parliament-visual {
            grid-template-columns: repeat(20, 1fr);
        }
    }