body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #e6f0ff;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Top Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.tab {
    padding: 12px 40px;
    border-radius: 30px;
    border: 2px solid #ccc;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f0f0f0;
    color: #666;
}

.tab[data-tab="ward"] {
    background: #e0e0e0;
    border-color: #bdbdbd;
}

.tab[data-tab="block"] {
    background: #ffd1dc;
    border-color: #ffb6c1;
    color: #a52a5a;
}

.tab[data-tab="district"].active {
    background: #4a90e2;
    border-color: #3a7bc8;
    color: white;
}

/* Ballot Layout */
.ballot {
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    background: #f8f9ff;
    border-radius: 25px;
    padding: 25px 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #d0d9ff;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 15px;
    background: #e6f0ff;
    border-radius: 10px;
    font-size: 16px;
    color: #2c3e50;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.status .dot {
    width: 12px;
    height: 12px;
    background: #4caf50;
    border-radius: 50%;
    display: inline-block;
    background: #41d46a;
    border-radius: 50%;
    margin-left: 6px;
}

/* Ballot Rows */
.row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 5px 0;
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e6ff;
    gap: 15px;
    transition: all 0.2s ease;
}

/* .row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
} */

.number {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    min-width: 30px;
    text-align: center;
}

.name-container {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 10px;
}

.name {
    font-size: 16px;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.symbol {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

.light {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff3b30;
    margin: 0 auto;
    opacity: 0.3;
    transition: opacity 0.2s ease;
    margin: initial;
}

.light.on {
    background-color: #ff3b30;
    box-shadow: 0 0 10px #ff3b30;
    opacity: 1;
}

.light.processing {
    background-color: #ff3b30;
    box-shadow: 0 0 10px #ff3b30;
    opacity: 1;
    /* animation: pulse 1s infinite alternate; */
}

@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.vote-btn {
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 80px;
    text-align: center;
    margin-right: 5px;
}

/* .vote-btn:hover {
    background: #1e2b38;
    transform: translateY(-1px);
} */

/* .vote-btn:active {
    transform: translateY(0);
} */

/* Success Screen */
.success-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.success-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #e8f5e9;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
}

.success-message {
    text-align: center;
    color: #2e7d32;
    font-family: Arial, sans-serif;
    background: none;
    padding: 0;
    border-radius: 0;
}

.checkmark {
    font-size: 100px;
    color: #2e7d32;
    line-height: 1;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.success-text {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2e7d32;
}

.malayalam-text {
    font-size: 18px;
    color: #2e7d32;
    margin-top: 5px;
    font-family: 'Noto Sans Malayalam', Arial, sans-serif;
}

.success-screen.visible {
    opacity: 1;
    visibility: visible;
}

/* Voted Screen */
.voted-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #fff 0% 50%, #6f7271);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
        flex-direction: column;
}

.voted-screen.visible {
    opacity: 1;
    visibility: visible;
}

.voted-container {
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.candidate-photo {
    position: relative;
    width: 100%;
    height: 300px;
    background: #FFD700;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.candidate-photo .photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.voted-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: #2E8B57;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.voted-badge svg {
    width: 16px;
    height: 16px;
}

.candidate-info {
    padding: 25px 20px;
    text-align: left;
    background: white;
}

.candidate-name {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    font-family: 'Noto Sans Malayalam', Arial, sans-serif;
}

.candidate-english-name {
    font-size: 20px;
    color: #555;
    margin-bottom: 15px;
    font-weight: 600;
}

.ward-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #666;
    margin-top: 10px;
}

.ward-info .ladder-icon {
    width: 40px;
    height: 40px;
    margin-left: 10px;
    object-fit: contain;
}

/* Vote Again Button */
.vote-again-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    padding: 12px 20px;
    margin-top: 25px;
    background: #ffffff;
    color: #333;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vote-again-btn:hover {
    background: #f5f5f5;
    /* border-color: #ccc; */
}

.vote-again-btn:active {
    transform: translateY(1px);
}

.vote-again-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 15px;
    padding: 0 20px;
}

.tab {
    padding: 9px 24px;
    border: none;
    background: white;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    /* box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); */
    position: relative;
    overflow: hidden;
}

.tab.active {
    background: #1a73e8;
    color: white;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

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

/* Animation for showing screens */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Checkmark animation */
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tabs {
        flex-direction: row;
        gap: 18px;
    }
    
    .tab {
        width: 80%;
        margin-bottom: 10px;
    }
    
    .ballot {
        width: 95%;
        padding: 15px;
    }
    
    .row {
        grid-template-columns: 30px 1fr 30px 80px;
        padding: 10px;
    }
    
    .name {
        font-size: 14px;
        padding: 0;
    }
    
    .vote-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 54px;
    }
}
    /* align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #c8d3e1;
    position: relative; */
/* } */

.number {
    font-size: 18px;
}

.symbol {
    width: 30px;
    /* position: absolute; */
    left: 90px;
}

/* .light {
    width: 16px;
    height: 16px;
    background: #7d0f14;
    border-radius: 50%;
} */

.light.on {
    background: #ff3b30 !important;
}

.vote-btn {
    width: 55px;
    height: 30px;
    background: #0b3c72;
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .tabs {
        margin: 10px;
    }
    
    .tab {
        padding: 8px 20px;
        font-size: 14px;
    }
    
    .ballot {
        width: 95%;
        padding: 15px;
        margin: 10px auto;
    }
    
    .header {
        font-size: 16px;
    }
    
    .row {
        grid-template-columns: 35px 1fr 35px 50px;
        padding: 10px 0;
    }
    
    .number {
        font-size: 16px;
    }
    
    .symbol {
        width: 25px;
        left: 75px;
    }
    
    .light {
        width: 14px;
        height: 14px;
    }
    
    .vote-btn {
        width: 45px;
        height: 25px;
        margin-right: 5px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }
    
    .tabs {
        margin: 5px;
        flex-direction: row;
        gap: 18px;
    }
    
    .tab {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    .ballot {
        width: auto;
        padding: 10px;
        margin: 5px auto;
    }
    
    .header {
        font-size: 14px;
        /* flex-direction: column; */
        gap: 5px;
        text-align: center;
        margin-top: 6px;
    }
    
    .row {
        grid-template-columns: 30px 1fr 30px 45px;
        padding: 8px 0;
    }
    
    .number {
        font-size: 14px;
    }
    
    .symbol {
        width: 20px;
        left: 65px;
    }
    
    .light {
        width: 12px;
        height: 12px;
    }
    
    .vote-btn {
        width: 40px;
        height: 22px;
    }
}
