/* ELECTION RESULTS - MODERN STYLING */
.eu-results-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
    transition: all 0.3s ease;
}

/* Theme Variations */
.eu-theme-light {
    background: #ffffff;
    color: #333333;
}

.eu-theme-dark {
    background: #1a1a2e;
    color: #ffffff;
}

.eu-theme-dark .eu-header,
.eu-theme-dark .eu-footer {
    background: #0f3460 !important;
}

.eu-theme-dark .eu-candidates-table {
    background: #16213e;
    color: #ffffff;
}

.eu-theme-dark .eu-table-row {
    border-bottom: 1px solid #2d4263;
}

.eu-theme-dark .eu-table-row:hover {
    background: #2d4263;
}

/* HEADER STYLES */
.eu-header {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
    color: white;
    padding: 25px 30px;
    position: relative;
    overflow: hidden;
}

.eu-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
    transform: rotate(15deg);
}

.eu-header-content {
    position: relative;
    z-index: 2;
}

.eu-title {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.eu-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    font-size: 14px;
}

.eu-live-badge {
    background: #e74c3c;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.eu-live-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.eu-total-votes,
.eu-last-update {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

/* WINNERS PODIUM */
.eu-winners-podium {
    background: #f8f9fa;
    padding: 30px;
    border-bottom: 1px solid #eaeaea;
}

.eu-podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 30px;
}

.eu-podium-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease;
}

.eu-podium-item:hover {
    transform: translateY(-5px);
}

.eu-first-place {
    width: 280px;
    padding-top: 40px;
    margin-bottom: -20px;
    z-index: 3;
    border-top: 5px solid #ffd700;
}

.eu-second-place {
    width: 240px;
    padding-top: 20px;
    border-top: 5px solid #c0c0c0;
    z-index: 2;
}

.eu-third-place {
    width: 240px;
    padding-top: 10px;
    border-top: 5px solid #cd7f32;
    z-index: 1;
}

.eu-podium-rank {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.eu-first-place .eu-podium-rank {
    background: #ffd700;
    color: #333;
    width: 60px;
    height: 60px;
    font-size: 28px;
}

.eu-crown {
    font-size: 32px;
    margin-bottom: 10px;
}

.eu-podium-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #eaeaea;
}

.eu-first-place .eu-podium-image {
    border-color: #ffd700;
    width: 120px;
    height: 120px;
}

.eu-podium-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eu-podium-name {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.eu-first-place .eu-podium-name {
    font-size: 24px;
    color: #2c3e50;
}

.eu-podium-party {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.eu-party-flag-small {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 2px;
}

.eu-podium-votes {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.eu-podium-votes strong {
    font-size: 18px;
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.eu-percentage {
    background: #3498db;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ALL CANDIDATES TABLE */
.eu-all-candidates {
    padding: 30px;
}

.eu-section-title {
    margin: 0 0 25px 0;
    font-size: 22px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    display: inline-block;
}

.eu-candidates-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.eu-table-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.eu-table-row {
    display: grid;
    grid-template-columns: 80px 2fr 1.5fr 120px 100px 1fr;
    gap: 15px;
    padding: 18px 25px;
    align-items: center;
    border-bottom: 1px solid #eaeaea;
    transition: background 0.2s ease;
}

.eu-table-header .eu-table-row {
    padding: 15px 25px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eu-table-body .eu-table-row:hover {
    background: #f8fafc;
}

/* Special row styling based on rank */
.eu-first {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 215, 0, 0.02) 100%);
    border-left: 4px solid #ffd700;
}

.eu-second {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.05) 0%, rgba(192, 192, 192, 0.02) 100%);
    border-left: 4px solid #c0c0c0;
}

.eu-third {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.05) 0%, rgba(205, 127, 50, 0.02) 100%);
    border-left: 4px solid #cd7f32;
}

.eu-top-ten {
    background: #fafafa;
}

/* Table Cells */
.eu-cell-rank {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eu-rank-number {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    min-width: 30px;
}

.eu-first .eu-rank-number { color: #ffd700; }
.eu-second .eu-rank-number { color: #c0c0c0; }
.eu-third .eu-rank-number { color: #cd7f32; }

.eu-medal {
    font-size: 20px;
}

.eu-candidate-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.eu-candidate-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid #eaeaea;
}

.eu-first .eu-candidate-avatar { border-color: #ffd700; }
.eu-second .eu-candidate-avatar { border-color: #c0c0c0; }
.eu-third .eu-candidate-avatar { border-color: #cd7f32; }

.eu-candidate-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eu-no-image {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.eu-candidate-details {
    flex: 1;
}

.eu-candidate-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.eu-candidate-party {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.eu-party-flag-tiny {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 2px;
}

.eu-party-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eu-party-flag {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.eu-votes-count {
    text-align: center;
}

.eu-votes-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.eu-votes-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eu-percentage-display {
    text-align: center;
}

.eu-percentage-value {
    background: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
}

.eu-first .eu-percentage-value { background: #ffd700; color: #333; }
.eu-second .eu-percentage-value { background: #c0c0c0; color: #333; }
.eu-third .eu-percentage-value { background: #cd7f32; color: white; }

/* Progress Bar */
.eu-progress-bar {
    height: 24px;
    background: #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.eu-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
    border-radius: 12px;
    transition: width 1s ease;
    position: relative;
}

.eu-first .eu-progress-fill { background: linear-gradient(90deg, #ffd700 0%, #ffcc00 100%); }
.eu-second .eu-progress-fill { background: linear-gradient(90deg, #c0c0c0 0%, #a0a0a0 100%); }
.eu-third .eu-progress-fill { background: linear-gradient(90deg, #cd7f32 0%, #b56a1e 100%); }

.eu-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: #333;
    z-index: 1;
}

.eu-progress-fill .eu-progress-text {
    color: white;
    left: auto;
    right: 10px;
    transform: translateY(-50%);
}

/* FOOTER */
.eu-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 25px 30px;
}

.eu-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.eu-footer-stats {
    display: flex;
    gap: 30px;
}

.eu-stat {
    text-align: center;
}

.eu-stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #3498db;
}

.eu-stat-label {
    font-size: 14px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.eu-disclaimer {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* NO RESULTS */
.eu-no-results {
    text-align: center;
    padding: 60px 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #ddd;
}

.eu-no-results .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #95a5a6;
    margin-bottom: 20px;
}

.eu-no-results p {
    font-size: 18px;
    color: #7f8c8d;
    margin: 0;
}

/* CLASSIC STYLE */
.eu-style-classic {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.eu-classic-header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px 10px 0 0;
}

.eu-classic-header h2 {
    margin: 0;
    font-size: 24px;
}

.eu-classic-results {
    padding: 20px;
}

.eu-classic-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    border-left: 5px solid #3498db;
    transition: transform 0.2s ease;
}

.eu-classic-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.eu-classic-card.eu-top-1 {
    border-left-color: #ffd700;
    background: linear-gradient(90deg, #fff9e6 0%, #ffffff 100%);
}

.eu-classic-card.eu-top-2 {
    border-left-color: #c0c0c0;
    background: linear-gradient(90deg, #f9f9f9 0%, #ffffff 100%);
}

.eu-classic-card.eu-top-3 {
    border-left-color: #cd7f32;
    background: linear-gradient(90deg, #fef6eb 0%, #ffffff 100%);
}

.eu-classic-rank {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-right: 25px;
    min-width: 60px;
    text-align: center;
}

.eu-classic-card.eu-top-1 .eu-classic-rank { color: #ffd700; }
.eu-classic-card.eu-top-2 .eu-classic-rank { color: #c0c0c0; }
.eu-classic-card.eu-top-3 .eu-classic-rank { color: #cd7f32; }

.eu-classic-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eu-classic-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.eu-classic-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #eaeaea;
}

.eu-classic-card.eu-top-1 .eu-classic-photo { border-color: #ffd700; }
.eu-classic-card.eu-top-2 .eu-classic-photo { border-color: #c0c0c0; }
.eu-classic-card.eu-top-3 .eu-classic-photo { border-color: #cd7f32; }

.eu-classic-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.eu-classic-party {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.eu-classic-party img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
}

.eu-classic-right {
    text-align: right;
}

.eu-classic-votes {
    margin-bottom: 10px;
}

.eu-classic-votes strong {
    display: block;
    font-size: 24px;
    color: #2c3e50;
}

.eu-classic-votes span {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.eu-classic-percentage {
    background: #3498db;
    color: white;
    padding: 6px 15px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
}

.eu-classic-card.eu-top-1 .eu-classic-percentage { background: #ffd700; color: #333; }
.eu-classic-card.eu-top-2 .eu-classic-percentage { background: #c0c0c0; color: #333; }
.eu-classic-card.eu-top-3 .eu-classic-percentage { background: #cd7f32; }

/* MINIMAL STYLE */
.eu-style-minimal {
    background: white;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
}

.eu-minimal-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.eu-minimal-empty {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 40px 20px;
}

.eu-minimal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eu-minimal-item {
    display: grid;
    grid-template-columns: 40px 2fr 1fr 100px;
    gap: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    align-items: center;
    transition: background 0.2s ease;
}

.eu-minimal-item:hover {
    background: #e9ecef;
}

.eu-minimal-item:nth-child(1) {
    background: linear-gradient(90deg, #fff9e6 0%, #ffffff 100%);
    border-left: 3px solid #ffd700;
}

.eu-minimal-item:nth-child(2) {
    background: linear-gradient(90deg, #f9f9f9 0%, #ffffff 100%);
    border-left: 3px solid #c0c0c0;
}

.eu-minimal-item:nth-child(3) {
    background: linear-gradient(90deg, #fef6eb 0%, #ffffff 100%);
    border-left: 3px solid #cd7f32;
}

.eu-minimal-rank {
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    font-size: 18px;
}

.eu-minimal-item:nth-child(1) .eu-minimal-rank { color: #ffd700; }
.eu-minimal-item:nth-child(2) .eu-minimal-rank { color: #c0c0c0; }
.eu-minimal-item:nth-child(3) .eu-minimal-rank { color: #cd7f32; }

.eu-minimal-name {
    font-weight: 600;
}

.eu-minimal-party {
    color: #666;
    font-size: 14px;
}

.eu-minimal-votes {
    text-align: right;
    font-weight: 600;
    color: #2c3e50;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .eu-podium-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .eu-podium-item {
        width: 100% !important;
        max-width: 400px;
        margin-bottom: 0 !important;
    }
    
    .eu-table-row {
        grid-template-columns: 60px 1fr 100px 100px 80px 1fr;
        gap: 10px;
        padding: 15px;
        font-size: 14px;
    }
    
    .eu-rank-number {
        font-size: 20px;
    }
    
    .eu-candidate-avatar {
        width: 40px;
        height: 40px;
    }
    
    .eu-candidate-name {
        font-size: 14px;
    }
    
    .eu-votes-number {
        font-size: 16px;
    }
    
    .eu-percentage-value {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .eu-header {
        padding: 20px;
    }
    
    .eu-title {
        font-size: 24px;
    }
    
    .eu-header-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .eu-table-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
        position: relative;
    }
    
    .eu-cell-rank {
        position: absolute;
        top: 15px;
        left: 15px;
    }
    
    .eu-cell-candidate {
        padding-left: 50px;
    }
    
    .eu-footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .eu-footer-stats {
        justify-content: center;
        gap: 20px;
    }
    
    .eu-classic-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .eu-classic-right {
        text-align: left;
        width: 100%;
    }
    
    .eu-minimal-item {
        grid-template-columns: 1fr;
        gap: 5px;
        text-align: center;
    }
    
    .eu-minimal-rank {
        font-size: 24px;
        grid-row: 1;
    }
}

@media (max-width: 480px) {
    .eu-header,
    .eu-all-candidates,
    .eu-footer {
        padding: 15px;
    }
    
    .eu-title {
        font-size: 20px;
    }
    
    .eu-podium-image {
        width: 80px;
        height: 80px;
    }
    
    .eu-first-place .eu-podium-image {
        width: 100px;
        height: 100px;
    }
    
    .eu-podium-name {
        font-size: 18px;
    }
    
    .eu-section-title {
        font-size: 18px;
    }
    
    .eu-candidate-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .eu-cell-candidate {
        padding-left: 0;
    }
    
    .eu-candidate-avatar {
        margin: 0 auto;
    }
    
    .eu-progress-bar {
        height: 20px;
    }
    
    .eu-progress-text {
        font-size: 10px;
    }
}

/* ANIMATIONS */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eu-table-row {
    animation: slideIn 0.3s ease forwards;
    animation-delay: calc(var(--row-index, 0) * 0.05s);
    opacity: 0;
}

/* PRINT STYLES */
@media print {
    .eu-results-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .eu-live-badge,
    .eu-footer,
    .eu-progress-bar {
        display: none;
    }
}

.eu-all-candidates, .eu-table-body, .eu-winners-podium{
font-family: "Mukta", sans-serif;
  font-weight: 500;
  font-style: normal;
}
/* Table Header for 4 columns */
.eu-table-header .eu-table-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 1fr;
    gap: 15px;
    padding: 0 20px;
    align-items: center;
}

/* Table Body cells alignment */
.eu-table-body .eu-table-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 1fr;
    gap: 15px;
    padding: 0 20px;
    align-items: center;
}

/* Party info moved under votes for mobile display */
.eu-party-display-mobile {
    display: none;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    align-items: center;
    gap: 5px;
}

.eu-party-display-mobile img {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .eu-table-header .eu-table-row,
    .eu-table-body .eu-table-row {
        grid-template-columns: 60px 1fr 90px 80px;
        gap: 10px;
        padding: 0 15px;
    }
    
    .eu-party-display-mobile {
        display: flex;
    }
}

@media (max-width: 480px) {
    .eu-table-header .eu-table-row,
    .eu-table-body .eu-table-row {
        grid-template-columns: 50px 1fr 70px 60px;
        gap: 8px;
        padding: 0 10px;
    }
    
    .eu-table-cell.eu-cell-progress .eu-progress-text {
        font-size: 11px;
    }
}
