/*
 * Styles for the public-facing single event page.
 * Version 3.5 - Fixed Mobile Responsive & Full Width
 */

@keyframes futuristic-background {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

:root {
    --emn-primary-accent-color-default: #38BDF8;
    --emn-light-content-text-color-default: #333;
    --emn-card-bg: linear-gradient(135deg, rgba(45, 52, 71, 0.8), rgba(30, 35, 50, 0.9));
    --emn-container-bg: linear-gradient(135deg, rgba(25, 30, 45, 0.95), rgba(15, 20, 35, 0.98));
}

.emn-event-public-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    overflow-x: hidden;
    width: 100%;
}

.emn-voting-container {
        background: #14181a !important;
    border-radius: 20px !important;
    padding: 1rem;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0;
    padding: 2rem 1rem;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
    box-sizing: border-box;
}

.emn-flip-card {
    background-color: transparent;
    width: 100%;
    height: 400px;
    perspective: 1000px;
    margin-bottom: 0;
    border-radius: 20px; /* Add border radius to the main container */
    overflow: hidden; /* This ensures child elements respect the border radius */
}

.emn-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    border-radius: 20px; /* Add border radius to the inner container */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.emn-flip-card.is-flipped .emn-flip-card-inner {
    transform: rotateY(180deg);
}

.emn-flip-card-front, .emn-flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px; /* Add border radius to both front and back */
    overflow: hidden; /* This ensures content respects the border radius */
    color: var(--emn-light-content-text-color, #333);
}

.emn-flip-card-front {
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.emn-flip-card-back {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--wp--preset--color--foreground, #000);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
}

.emn-flip-card-front::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
    border-radius: 20px; /* Add border radius to the overlay as well */
}


.emn-header-top-bar, .emn-countdown-wrapper-centered, .emn-header-title-area {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.emn-header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 1.5rem;
    max-width: 100%;
    box-sizing: border-box;
}

.emn-flip-card-back .emn-header-top-bar {
    background: var(--wp--preset--color--contrast);
    border-bottom: 1px solid var(--wp--preset--color--contrast);
}

.emn-brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.emn-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.emn-countdown-wrapper { 
    text-align: center; 
}

.emn-countdown-title { 
    margin: 0 0 0.5rem 0; 
    font-size: 1em; 
    font-weight: 500; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: #fff; 
    opacity: 0.9; 
    text-shadow: 0 1px 3px rgba(0,0,0,0.3); 
}



/* Cyber Tech Countdown Styles */
.emn-countdown { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 1.5rem; 
    padding: 0.5rem 1rem;
    border-radius: 15px; 
    border: 2px solid transparent; 
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(20, 20, 40, 0.9)) padding-box,
                linear-gradient(135deg, #00ffff, #ff00ff, #00ff00, #ffff00) border-box; 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    color: #00ffff; 
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3),
                inset 0 0 20px rgba(0, 255, 255, 0.1); 
    animation: slideInLeft 0.8s ease-out,
               cyberGlow 2s ease-in-out infinite alternate; 
    position: relative;
    overflow: hidden;
}

.emn-countdown::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: radial-gradient(
        circle at var(--x, 50%) var(--y, 50%),
        rgba(0, 204, 255, 0.8) 0%,
        rgba(0, 153, 255, 0.4) 30%,
        transparent 70%
    );
    border-radius: 16px;
    z-index: 1;
    animation: randomFlash 0.5s ease-out infinite;
}

@keyframes randomFlash {
    0%, 100% {
        opacity: 0;
        --x: 20%;
        --y: 30%;
    }
    25% {
        opacity: 0.8;
        --x: 80%;
        --y: 20%;
    }
    50% {
        opacity: 0.8;
        --x: 40%;
        --y: 70%;
    }
    75% {
        opacity: 0.8;
        --x: 60%;
        --y: 40%;
    }
}

.emn-countdown-item { 
    text-align: center; 
    position: relative;
    padding: 0.5rem;
    min-width: 80px;
}

.emn-countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    border-radius: 8px;
    z-index: -1;
    opacity: 0.5;
}

.emn-countdown-item span { 
    display: block; 
    font-weight: 800; 
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.emn-countdown-item span:first-child { 
    font-size: 2em; 
    color: #00ffff; 
    line-height: 1; 
    text-shadow: 0 0 15px #00ffff,
                 0 0 30px #00ffff,
                 0 0 45px #00ffff;
    animation: digitPulse 1s ease-in-out infinite;
    background: linear-gradient(135deg, #00ffff, #00ffaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.emn-countdown-item span:last-child { 
    font-size: 0.6em; 
    text-transform: uppercase; 
    color: #ffffff;
    letter-spacing: 3px;
    margin-top: 0.5rem;
    text-shadow: 0 0 10px #ff00ff,
                 0 0 20px #ff00ff;
    font-weight: 600;
}

/* Cyber separator between countdown items */
.emn-countdown-item:not(:last-child)::after {
    content: ':';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #00ff00;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff00,
                 0 0 20px #00ff00;
    animation: blink 1s step-end infinite;
}

/* Cyber tech animations */
@keyframes cyberGlow {
    0% {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.3),
                    inset 0 0 20px rgba(0, 255, 255, 0.1);
    }
    100% {
        box-shadow: 0 0 50px rgba(0, 255, 255, 0.6),
                    0 0 70px rgba(255, 0, 255, 0.3),
                    inset 0 0 30px rgba(0, 255, 255, 0.2);
    }
}

@keyframes digitPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 15px #00ffff,
                     0 0 30px #00ffff;
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 25px #00ffff,
                     0 0 50px #00ffff,
                     0 0 75px #00ffff;
    }
}


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

/* Responsive cyber countdown */
@media (max-width: 768px) {
    .emn-countdown {
        gap: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .emn-countdown-item {
        min-width: 60px;
    }
    
    .emn-countdown-item span:first-child {
        font-size: 2em;
    }
    
    .emn-countdown-item span:last-child {
        font-size: 0.7em;
        letter-spacing: 2px;
    }
    
    .emn-countdown-item:not(:last-child)::after {
        right: -0.8rem;
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .emn-countdown {
        gap: 0.8rem;
        padding: 0.8rem 1.2rem;
        flex-wrap: wrap;
    }
    
    .emn-countdown-item {
        min-width: 50px;
    }
    
    .emn-countdown-item span:first-child {
        font-size: 1.8em;
    }
    
    .emn-countdown-item span:last-child {
        font-size: 0.6em;
        letter-spacing: 1px;
    }
}

.emn-header-title-area { 
    text-align: left; 
}

.emn-event-title-main { 
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: bold; 
    margin: 0; 
    color: #fff; 
    animation: fadeInUp 0.8s ease-out 0.2s both;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.emn-header-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    flex-wrap: wrap;
    gap: 10px;
}

.emn-organizer-rank-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.emn-organizer-rank-badge i {
    color: var(--emn-primary-accent-color, #38BDF8);
}

.emn-complaint-btn-wrapper {
    flex-shrink: 0;
}

.emn-event-type-badge { 
    display: inline-block; 
    background: linear-gradient(135deg, var(--emn-primary-accent-color, #38BDF8), #4F46E5); 
    color: white; 
    padding: 0.3rem 0.8rem; 
    border-radius: 15px; 
    font-size: 0.8rem; 
    margin-top: 0.5rem; 
    font-weight: bold; 
    animation: fadeInUp 0.8s ease-out 0.4s both; 
}

.emn-about-content { 
    padding: 1.5rem; 
    text-align: left; 
    overflow-y: auto; 
    flex-grow: 1; 
    max-width: 100%; 
    margin: 0 auto; 
    width: 100%; 
    box-sizing: border-box;
}

.emn-about-content h3 { 
    margin-top: 0; 
    font-size: 1.5em; 
    padding-bottom: 0.5rem; 
    border-bottom: 2px solid var(--emn-primary-accent-color, #38BDF8); 
    margin-bottom: 1rem; 
}

.emn-event-body {
    padding: 2rem 0rem;
    background: transparent;
    width: 100%;
    color: #eee;
    box-sizing: border-box;
}

.emn-ticket-purchase-section,
.emn-contest-wrapper,
.emn-award-wrapper,
.emn-public-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    margin: 0 auto 2.5rem auto;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    max-width: 100%;
    animation: fadeInUp 0.8s ease-out;
    box-sizing: border-box;
}

.emn-contest-header,
.emn-award-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
    gap: 1.5rem;
}

.emn-contest-header-left,
.emn-award-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
    min-width: 0;
}

.emn-contest-header-right,
.emn-award-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.emn-contestant-search-container,
.emn-award-search-container {
    position: relative;
}

.emn-search-icon {
    cursor: pointer;
}

.emn-contestant-search-input,
.emn-award-search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: #fff;
    font-size: 1em;
}

.emn-contestant-search-container.search-active .emn-contestant-search-input,
.emn-award-search-container.search-active .emn-award-search-input {
    width: 200px;
    opacity: 1;
    visibility: visible;
}

.emn-cost-per-vote {
    cursor: pointer;
    position: relative;
}

.emn-cost-per-vote .cost-amount {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
}

.emn-contestant-search-input {
    width: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: #fff;
    font-size: 1em;
}

.search-active .emn-contestant-search-input {
    width: 200px;
    opacity: 1;
    visibility: visible;
}

.emn-countdown-title.event-closed {
    color: #ff4d4d;
    font-weight: bold;
    font-size: 1.2em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.emn-loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 40px;
    height: 40px;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

.emn-cost-per-vote.show-cost .cost-amount {
    display: block;
}

.emn-action-button {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(79, 70, 229, 0.2));
    color: var(--emn-primary-accent-color, #38BDF8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    border: 1px solid rgba(56, 189, 248, 0.3);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.emn-cost-per-vote {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(79, 70, 229, 0.2));
    color: var(--emn-primary-accent-color, #38BDF8);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    border: 1px solid rgba(56, 189, 248, 0.3);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.emn-public-toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 2rem auto;
    background: linear-gradient(135deg, rgba(45, 52, 71, 0.9), rgba(30, 35, 50, 0.95));
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideInLeft 0.8s ease-out;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.emn-public-toolbar::-webkit-scrollbar {
    display: none;
}

.emn-toolbar-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: max-content;
}

.emn-live-search {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

#emn-participant-search {
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#emn-participant-search:focus {
    outline: none;
    border-color: var(--emn-primary-accent-color, #38BDF8);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

#emn-participant-search::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.emn-coin-icon {
    position: relative;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(79, 70, 229, 0.2));
    color: var(--emn-primary-accent-color, #38BDF8);
    padding: 12px 16px;
    border-radius: 20px;
    font-weight: bold;
    border: 1px solid rgba(56, 189, 248, 0.4);
    white-space: nowrap;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.emn-coin-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.3);
}

.emn-coin-icon .icon-coin {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #FBBF24;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor' class='w-6 h-6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 11.21 12.77 10.5 12 10.5c-.77 0-1.536.71-2.121 1.259-.586.545-.879 1.341-.879 2.121z' /%3E%3C/svg%3E%0A") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor' class='w-6 h-6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 6v12m-3-2.818l.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 11.21 12.77 10.5 12 10.5c-.77 0-1.536.71-2.121 1.259-.586.545-.879 1.341-.879 2.121z' /%3E%3C/svg%3E%0A") no-repeat center;
}

.emn-tooltip {
    display: none;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 10;
    font-size: 0.8em;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.emn-coin-icon.active .emn-tooltip {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.emn-toolbar-button {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(79, 70, 229, 0.2));
    color: var(--emn-primary-accent-color, #38BDF8) !important;
    padding: 12px 20px;
    border-radius: 20px;
    font-weight: bold;
    border: 1px solid rgba(56, 189, 248, 0.4);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 14px;
}

.emn-toolbar-button:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(79, 70, 229, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.3);
}

.emn-toolbar-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.emn-toolbar-button:hover::before {
    left: 100%;
}

.emn-contestants-grid-container {
    width: 100%;
    box-sizing: border-box;
}

.emn-nominees-grid,
.emn-contestants-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Make cards more compact on mobile */
@media (max-width: 767px) {
    .emn-contestant-card, .emn-nominee-card {
        padding: 0.7rem;
        border-radius: 12px;
    }
    
    .emn-contestant-photo img, .emn-nominee-photo-wrapper img {
        margin-bottom: 0.7rem;
        border-radius: 8px;
    }
    
    .emn-contestant-name, .emn-nominee-name {
        font-size: 0.9em;
        margin-bottom: 0.7rem;
    }
    
    .emn-progress-bar-container {
        height: 8px;
        margin-bottom: 0.8rem;
    }
    
    .emn-vote-button {
        padding: 0.5rem 0.7rem;
        font-size: 0.8em;
        border-radius: 8px;
    }
    
    .emn-contestant-photo .emn-share-button {
        width: 30px;
        height: 30px;
        top: 6px;
        left: 6px;
    }
}

/* --- New CSS for Uniform Card Heights --- */

/* 1. Make the card a flex container */
.emn-contestant-card,
.emn-nominee-card {
    display: flex;
    flex-direction: column;
}

/* 2. Allow the name element to grow and fill available space */
.emn-contestant-name,
.emn-nominee-name {
    flex-grow: 1;
}



.emn-contestant-photo {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.emn-contestant-card, .emn-nominee-card { 
    background: var(--emn-card-bg); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 15px; 
    padding: 1rem; 
    text-align: center; 
    transition: all 0.4s ease; 
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.emn-contestant-card::before, .emn-nominee-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--emn-primary-accent-color, #38BDF8), #4F46E5);
}

.emn-contestant-card:hover, .emn-nominee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(56, 189, 248, 0.4);
}

.emn-contestant-photo img, .emn-nominee-photo-wrapper img { 
    border-radius: 12px; 
    object-fit: cover; 
    width: 100%; 
    height: auto; 
    aspect-ratio: 1 / 1; 
    margin-bottom: 1rem; 
    border: 2px solid rgba(255, 255, 255, 0.2); 
    transition: all 0.3s ease;
}

.emn-contestant-card:hover .emn-contestant-photo img,
.emn-nominee-card:hover .emn-nominee-photo-wrapper img {
    transform: scale(1.05);
    border-color: rgba(56, 189, 248, 0.6);
}

.emn-contestant-name, .emn-nominee-name { 
    font-size: 1.1em; 
    font-weight: 700; 
    color: #fff; 
    margin: 0 0 1rem 0; 
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.emn-progress-bar-container { 
    position: relative; 
    height: 10px; 
    background: rgba(0, 0, 0, 0.4); 
    border-radius: 8px; 
    margin-bottom: 1rem; 
    overflow: hidden; 
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.emn-progress-bar-foreground { 
    background: linear-gradient(135deg, var(--emn-primary-accent-color, #38BDF8), #4F46E5); 
    height: 100%; 
    border-radius: 8px; 
    transition: width 0.8s ease-in-out;
    position: relative;
    overflow: hidden;
}

.emn-progress-bar-foreground::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.emn-progress-bar-text { 
    position: absolute; 
    top: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    height: 100%; 
    display: flex; 
    align-items: center; 
    font-size: 0.7em; 
    color: white; 
    font-weight: bold; 
    text-shadow: 0 0 2px rgba(0,0,0,0.5); 
}

.emn-card-actions { 
    display: flex; 
    gap: 0.5rem; 
}

.emn-vote-button { 
    flex-grow: 1; 
    background: linear-gradient(135deg, var(--emn-primary-accent-color, #38BDF8), #4F46E5); 
    color: white !important; 
    border: none; 
    padding: 0.7rem 1rem; 
    font-size: 0.9em; 
    border-radius: 10px; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 0.8px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    text-decoration: none; 
    text-align: center; 
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
    position: relative;
    overflow: hidden;
}

.emn-vote-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
    filter: brightness(1.1);
}

.emn-vote-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.emn-vote-button:hover::before {
    left: 100%;
}

.emn-contestant-photo .emn-share-button {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    opacity: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.emn-share-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.emn-share-button .fa-check {
    display: none;
}

.emn-share-button.copied .fa-share-alt {
    display: none;
}

.emn-share-button.copied .fa-check {
    display: inline-block;
    color: #4ade80;
    animation: pulse 0.6s ease-in-out;
}

.emn-purchase-button, .emn-submit-button { 
    display: inline-block; 
    width: 100%; 
    background: linear-gradient(135deg, var(--emn-primary-accent-color, #38BDF8), #4F46E5); 
    color: white !important; 
    border: none; 
    padding: 1rem 1.5rem; 
    border-radius: 12px; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    text-decoration: none; 
    text-align: center; 
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4); 
}

.emn-vote-button:hover, .emn-purchase-button:hover, .emn-submit-button:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.6); 
    filter: brightness(1.1); 
}

.emn-award-title-bar { 
    background: rgba(255, 255, 255, 0.1); 
    padding: 1rem 1.5rem; 
    border-radius: 8px; 
    margin-bottom: 1rem; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: background-color 0.3s ease; 
}

.emn-award-title { 
    margin: 0; 
    color: #fff; 
    font-size: 1.2em; 
}

.emn-category-toggle { 
    transition: transform 0.3s ease; 
    color: #fff; 
}

.emn-award-category.open .emn-category-toggle { 
    transform: rotate(180deg); 
}

.emn-nominees-grid-wrapper { 
    display: none; 
}

.emn-award-category.open .emn-nominees-grid-wrapper { 
    display: block; 
}

.emn-form-row { 
    margin-bottom: 1.5rem; 
}

.emn-form-row label { 
    display: block; 
    margin-bottom: 0.5rem; 
    font-weight: 500; 
    color: rgba(255, 255, 255, 0.8); 
}

.emn-form-row input[type="text"], .emn-form-row input[type="email"], .emn-form-row textarea, .emn-form-row select { 
    width: 100%; 
    padding: 0.8rem 1rem; 
    background: rgba(0, 0, 0, 0.2); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 8px; 
    color: #fff; 
    font-size: 1em; 
    transition: all 0.3s ease; 
}

.emn-form-row input:focus, .emn-form-row textarea:focus, .emn-form-row select:focus { 
    outline: none; 
    border-color: var(--emn-primary-accent-color, #38BDF8); 
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5); 
}

.emn-contestant-search-container, .emn-award-search-container { 
    position: relative; 
    width: 100%; 
    max-width: 300px; 
}

.emn-search-icon { 
    position: absolute; 
    top: 50%; 
    left: 1rem; 
    transform: translateY(-50%); 
    color: rgba(255, 255, 255, 0.5); 
    pointer-events: none; 
}

.emn-contestant-search-input, .emn-award-search-input { 
    width: 100%; 
    padding: 0.8rem 1rem 0.8rem 3rem; 
    background: rgba(0, 0, 0, 0.2); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 50px; 
    color: #fff; 
    font-size: 1em; 
    transition: all 0.3s ease; 
}

.emn-contestant-search-input:focus, .emn-award-search-input:focus { 
    outline: none; 
    border-color: var(--emn-primary-accent-color, #38BDF8); 
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5); 
}

.emn-file-upload-container { 
    display: flex; 
    align-items: center; 
}

input[data-file-upload] { 
    width: 0.1px; 
    height: 0.1px; 
    opacity: 0; 
    overflow: hidden; 
    position: absolute; 
    z-index: -1; 
}

.emn-file-upload-label { 
    display: inline-block; 
    padding: 0.8rem 1.2rem; 
    background: #555; 
    color: #fff; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    font-weight: 500; 
}

.emn-file-upload-label:hover { 
    background: #666; 
    transform: translateY(-2px); 
}

.emn-file-name { 
    margin-left: 1rem; 
    font-style: italic; 
    color: rgba(255, 255, 255, 0.6); 
}

.emn-ticket-list { 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
    margin-bottom: 2rem; 
}

.emn-ticket-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem; 
    background: rgba(0, 0, 0, 0.2); 
    border-radius: 8px; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
}

.emn-ticket-title { 
    font-weight: 600; 
    font-size: 1.1em; 
}

.emn-ticket-cost { 
    font-weight: bold; 
    color: var(--emn-primary-accent-color, #38BDF8); 
}

.emn-ticket-quantity input { 
    width: 60px; 
    text-align: center; 
    padding: 0.5rem; 
    background: rgba(0, 0, 0, 0.3); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 5px; 
    color: #fff; 
}

.emn-coupon-section { 
    margin: 2rem 0; 
}

.emn-coupon-input-wrapper { 
    display: flex; 
    gap: 0.5rem; 
}

.emn-coupon-code-input { 
    flex-grow: 1; 
    padding: 0.8rem 1rem; 
    background: rgba(0, 0, 0, 0.2); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 8px; 
    color: #fff; 
}

.emn-apply-coupon-button { 
    background: #555; 
    color: #fff; 
    border: none; 
    padding: 0.8rem 1.2rem; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: background-color 0.3s; 
}

.emn-apply-coupon-button:hover { 
    background: #666; 
}

.emn-total-price-container { 
    border-top: 1px solid rgba(255, 255, 255, 0.15); 
    padding-top: 1.5rem; 
    margin-top: 1.5rem; 
    font-size: 1.1em; 
}

.emn-price-row { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 0.5rem; 
}

.emn-total-row { 
    font-weight: bold; 
    font-size: 1.3em; 
    color: #fff; 
}

.emn-total-price-container .emn-total-row span:last-child, .emn-ticket-purchase-section .emn-submit-button { 
    font-size: 1.2em; 
}

.emn-modal-backdrop { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.5); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
    z-index: 1000; 
}

.emn-modal-content { 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    background: rgba(30, 35, 50, 0.8); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 16px; 
    padding: 2rem; 
    width: 90%; 
    max-width: 500px; 
    z-index: 1001; 
    color: #eee; 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); 
}

.emn-modal-hidden { 
    display: none; 
}

.emn-modal-close-button { 
    position: absolute; 
    top: 1rem; 
    right: 1rem; 
    background: rgba(255, 255, 255, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    color: white; 
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    cursor: pointer; 
    font-size: 1.2em; 
    line-height: 28px; 
    text-align: center; 
    transition: all 0.3s ease; 
}

.emn-modal-close-button:hover { 
    background: rgba(255, 255, 255, 0.2); 
    transform: rotate(90deg); 
}

.emn-modal-content h3 { 
    color: #fff; 
    text-align: center; 
    margin-top: 0; 
    margin-bottom: 1rem; 
    font-size: 1.8em; 
}

.emn-modal-content p { 
    text-align: center; 
    margin-bottom: 2rem; 
    color: rgba(255, 255, 255, 0.8); 
}

.emn-modal-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.emn-modal-form input[type="email"],
.emn-modal-form input[type="number"],
.emn-modal-form input[type="text"] {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.emn-modal-form input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.6);
}

.emn-modal-form #emn-modal-proceed-button,
.emn-modal-form .emn-submit-button {
    width: 100%;
    margin-top: 0.5rem;
    padding: 1rem;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#emn-modal-cooldown-timer {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

#emn-modal-cooldown-timer .emn-timer-time {
    display: block;
    font-size: 1.8em;
    color: var(--emn-primary-accent-color, #38BDF8);
    margin-top: 0.5rem;
}

.emn-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.emn-nominee-card.hidden-by-search,
.emn-contestant-card.hidden-by-search {
    display: none;
}

.emn-category-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    flex-wrap: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}

.emn-category-tabs::-webkit-scrollbar {
    display: none;
}

.emn-category-tab {
    padding: 0.8rem 1rem;
    cursor: pointer;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 1em;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.emn-category-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.emn-category-tab.active {
    color: var(--emn-primary-accent-color, #38BDF8);
    border-bottom-color: var(--emn-primary-accent-color, #38BDF8);
}

.emn-category-section {
    display: none;
    animation: fadeInUp 0.5s;
}

.emn-category-section.active {
    display: block;
}

#emn-vote-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--emn-primary-accent-color, #38BDF8), #4F46E5);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    font-weight: bold;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s, visibility 0.5s, transform 0.5s;
}

#emn-vote-notification.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.emn-vote-notification-hidden {
    display: none;
}

/* --- Direct Single Contestant Page Styles --- */
.emn-direct-vote-container {
    max-width: 600px;
    margin: 40px auto;
    background: #1a1a1a;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: #fff;
}

.emn-direct-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

.emn-direct-contestant {
    text-align: center;
    margin-bottom: 30px;
}

.emn-direct-contestant-image-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
}

.emn-direct-contestant-image-wrapper.has-votes::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    padding: 4px;
    background: conic-gradient(from 0deg, #38BDF8, #20afcc var(--emn-vote-percentage, 0%), transparent 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background 0.5s ease;
}

.emn-direct-contestant img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    margin-bottom: 0;
}

.emn-direct-contestant h3 {
    font-size: 24px;
    margin: 0;
    color: #fff;
}

.emn-form-group {
    margin-bottom: 20px;
}

.emn-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ccc;
}

.emn-form-group input, .emn-form-group select {
    width: 100%;
    padding: 12px;
    background: #222;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
}

.emn-vote-submit {
    width: 100%;
    padding: 15px;
    background: #20afcc;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.emn-vote-submit:hover {
    background: #1a8ea6;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(32, 175, 204, 0.4);
}

.emn-direct-calculation {
    margin-bottom: 20px;
    padding: 15px;
    background: #222;
    border-radius: 8px;
    border: 1px solid #333;
}

/* Connecting Modal */
#emn-connecting-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}

.emn-connecting-modal-content {
    background: #1a1717;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid #20afcc;
    box-shadow: 0 0 20px rgba(32, 175, 204, 0.3);
}

.emn-connecting-loader {
    border: 4px solid #333;
    border-top: 4px solid #20afcc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: emn-spin 2s linear infinite;
    margin: 0 auto 20px;
}

@keyframes emn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .emn-voting-container {
        padding: 0.2rem;
        margin: 0;
    }
    
    .emn-public-toolbar {
        padding: 15px;
        gap: 10px;
        margin-bottom: 1.5rem;
    }
    
    .emn-toolbar-item {
        flex-shrink: 0;
    }
    
    .emn-live-search {
        min-width: 150px;
        max-width: 200px;
    }
    
    #emn-participant-search {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .emn-coin-icon {
        padding: 10px 14px;
        font-size: 0.9em;
    }
    
    .emn-toolbar-button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .emn-nominees-grid,
    .emn-contestants-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .emn-flip-card { 
        height: 300px; 
    }
    
    .emn-event-title-main { 
        font-size: 1.8rem; 
    }
    
    .emn-event-body { 
        padding: 1.5rem 1rem; 
    }
    
    .emn-ticket-purchase-section, .emn-contest-wrapper, .emn-award-wrapper, .emn-public-form { 
        padding: 1.5rem; 
        margin-bottom: 2rem;
    }
    
    .emn-contestant-card, .emn-nominee-card {
        padding: 0.8rem;
    }
    
    .emn-contestant-name, .emn-nominee-name {
        font-size: 1em;
    }
    
    .emn-vote-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.8em;
    }
}

/* --- Cybertech Style for Vote Count Display --- */
.emn-vote-count-display {
    font-size: 1.3em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 1px;

    /* Subtle light blue gradient */
    background: linear-gradient(90deg,
            #a5f3fc 0%,
            #38BDF8 50%,
            #0ea5e9 100%);
    background-size: 200% auto;

    /* Gradient text effect */
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;

    /* Subtle glow effect */
    text-shadow:
        0 0 8px rgba(56, 189, 248, 0.3),
        0 0 15px rgba(56, 189, 248, 0.1);

    /* Smooth animations */
    animation: subtleGlow 4s ease-in-out infinite,
        gentleFlow 6s linear infinite;

    /* Compact styling */
    display: inline-block;
    padding: 6px 12px;
    position: relative;
}

/* Minimal border effect */
.emn-vote-count-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 3px;
    pointer-events: none;
    animation: borderFade 3s ease-in-out infinite;
}

/* Subtle glowing pulse */
@keyframes subtleGlow {

    0%,
    100% {
        text-shadow:
            0 0 8px rgba(56, 189, 248, 0.3),
            0 0 15px rgba(56, 189, 248, 0.1);
        filter: brightness(1);
    }

    50% {
        text-shadow:
            0 0 10px rgba(56, 189, 248, 0.4),
            0 0 18px rgba(56, 189, 248, 0.15),
            0 0 25px rgba(56, 189, 248, 0.05);
        filter: brightness(1.05);
    }
}

/* Gentle gradient flow */
@keyframes gentleFlow {
    0% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }

    100% {
        background-position: 0% center;
    }
}

/* Subtle border animation */
@keyframes borderFade {

    0%,
    100% {
        opacity: 0.3;
        border-color: rgba(56, 189, 248, 0.3);
    }

    50% {
        opacity: 0.6;
        border-color: rgba(56, 189, 248, 0.5);
    }
}

/* Optional: Subtle highlight for numbers */
.emn-vote-count-display span {
    font-weight: 800;
    color: #38BDF8;
    animation: numberGlow 3s ease-in-out infinite;
}

@keyframes numberGlow {

    0%,
    100% {
        text-shadow: 0 0 5px rgba(56, 189, 248, 0.5);
    }

    50% {
        text-shadow:
            0 0 8px rgba(56, 189, 248, 0.7),
            0 0 12px rgba(56, 189, 248, 0.3);
    }
}

/* Hover effect */
.emn-vote-count-display:hover {
    animation: subtleGlow 2s ease-in-out infinite,
        gentleFlow 3s linear infinite;
}


/*Free voting vote count styling ends here*/

@media (max-width: 480px) {
    .emn-countdown { 
        gap: 0.5rem; 
        padding: 0.8rem 1rem; 
    }
    
    .emn-countdown-item span:first-child { 
        font-size: 1.5em; 
    }
    
    .emn-countdown-item span:last-child { 
        font-size: 0.6em; 
    }
    
    .emn-contest-header, .emn-award-header {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .emn-public-toolbar {
        padding: 12px;
        gap: 8px;
    }
    
    .emn-live-search {
        min-width: 120px;
        max-width: 150px;
    }
    
    #emn-participant-search {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .emn-coin-icon {
        padding: 8px 12px;
        font-size: 0.8em;
    }
    
    .emn-toolbar-button {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .emn-nominees-grid,
    .emn-contestants-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .emn-contestant-card, .emn-nominee-card {
        padding: 0.7rem;
    }
    
    .emn-event-title-main {
        font-size: 1.5rem;
    }
    
    .emn-flip-card {
        height: 250px;
    }
}


/* --- Enhanced Category Dropdown Styles --- */
.emn-category-dropdown {
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 300px;
}

.emn-category-dropdown-toggle {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(79, 70, 229, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--emn-primary-accent-color, #38BDF8);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.emn-category-dropdown-toggle:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(79, 70, 229, 0.3));
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.2);
}

.emn-category-dropdown-toggle::after {
    content: '▼';
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.emn-category-dropdown.open .emn-category-dropdown-toggle::after {
    transform: rotate(180deg);
}

.emn-category-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--emn-container-bg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    margin-top: 5px;
    padding: 0;
    backdrop-filter: blur(20px);
    z-index: 100;
    max-height: 400px;
    overflow: hidden;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.emn-category-dropdown.open .emn-category-dropdown-menu {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.emn-category-search-container {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.emn-category-search {
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.emn-category-search:focus {
    outline: none;
    border-color: var(--emn-primary-accent-color, #38BDF8);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.emn-category-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.emn-category-dropdown-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
}

.emn-category-dropdown-items::-webkit-scrollbar {
    width: 6px;
}

.emn-category-dropdown-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.emn-category-dropdown-items::-webkit-scrollbar-thumb {
    background: var(--emn-primary-accent-color, #38BDF8);
    border-radius: 3px;
}

.emn-category-dropdown-items::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.8);
}

.emn-category-dropdown-item {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 0.95em;
    display: block;
}

.emn-category-dropdown-item:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--emn-primary-accent-color, #38BDF8);
}

.emn-category-dropdown-item.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(79, 70, 229, 0.2));
    color: var(--emn-primary-accent-color, #38BDF8);
    font-weight: 600;
}

/* Hide the old tabs and category titles */
.emn-category-tabs {
    display: none;
}

.emn-category-title {
    display: none;
}

/* Category section styles */
.emn-category-section {
    display: none;
    animation: fadeInUp 0.5s;
}

.emn-category-section.active {
    display: block;
}

/* Mobile responsive for dropdown */
@media (max-width: 768px) {
    .emn-category-dropdown {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .emn-category-dropdown-toggle {
        padding: 10px 14px;
        font-size: 0.9em;
    }
    
    .emn-category-dropdown-item {
        padding: 8px 14px;
        font-size: 0.9em;
    }
    
    .emn-category-search-container {
        padding: 10px;
    }
    
    .emn-category-search {
        padding: 6px 10px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .emn-category-dropdown-toggle {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .emn-category-dropdown-item {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    .emn-category-search-container {
        padding: 8px;
    }
    
    .emn-category-search {
        padding: 5px 8px;
        font-size: 0.8em;
    }
}

/* Futuristic Event Closed Styling with Animating Effects */
.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title {
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: inline-block;
    padding: 12px 28px;
    background: rgba(255, 42, 109, 0.08);
    border: 1px solid #ff2a6d;
    border-radius: 2px;
    position: relative;
    text-shadow: 0 0 10px #ff2a6d;
    box-shadow: 
        0 0 20px rgba(255, 42, 109, 0.3),
        inset 0 0 20px rgba(255, 42, 109, 0.1);
    animation: textFloat 3s ease-in-out infinite;
    overflow: hidden;
}

@keyframes textFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        text-shadow: 0 0 10px #ff2a6d;
    }
    25% {
        transform: translateY(-4px) scale(1.02);
        text-shadow: 0 0 15px #ff2a6d, 0 0 25px #ff2a6d;
    }
    50% {
        transform: translateY(0) scale(1);
        text-shadow: 0 0 10px #ff2a6d;
    }
    75% {
        transform: translateY(2px) scale(0.98);
        text-shadow: 0 0 8px #ff2a6d;
    }
}

/* Pulsing outer glow */
.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: #ff2a6d;
    border-radius: 4px;
    z-index: -1;
    animation: pulseOuter 2s ease-in-out infinite;
    opacity: 0;
    filter: blur(12px);
}

@keyframes pulseOuter {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.1);
    }
}

/* Digital shimmer effect */
.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: digitalShine 3s ease-in-out infinite;
}

@keyframes digitalShine {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        left: 200%;
        opacity: 0;
    }
}

/* Corner boxes - Top Left */
.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title {
    position: relative;
}

.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title::before {
    /* This is already used for outer glow, so we need another way */
}

/* Create corner boxes using additional pseudo-elements */
.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title .corner-tl,
.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title .corner-tr,
.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title .corner-bl,
.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title .corner-br {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ff2a6d;
    box-shadow: 0 0 10px #ff2a6d;
    animation: cornerPulse 1.5s ease-in-out infinite;
}

.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title .corner-tl {
    top: -2px;
    left: -2px;
}

.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title .corner-tr {
    top: -2px;
    right: -2px;
    animation-delay: 0.5s;
}

.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title .corner-bl {
    bottom: -2px;
    left: -2px;
    animation-delay: 1s;
}

.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title .corner-br {
    bottom: -2px;
    right: -2px;
    animation-delay: 1.5s;
}

@keyframes cornerPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
        box-shadow: 0 0 8px #ff2a6d;
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
        box-shadow: 0 0 15px #ff2a6d, 0 0 20px #ff2a6d;
    }
}

/* Hover explosion effect */
.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title:hover {
    animation: textFloat 3s ease-in-out infinite, hoverExplode 0.5s forwards;
}

@keyframes hoverExplode {
    0% {
        transform: scale(1);
        text-shadow: 0 0 10px #ff2a6d;
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 25px #ff2a6d, 0 0 40px #ff2a6d, 0 0 60px #ff2a6d;
    }
    100% {
        transform: scale(1.05);
        text-shadow: 0 0 20px #ff2a6d, 0 0 35px #ff2a6d;
    }
}

/* Background color pulse */
.emn-event-public-wrapper[data-event-closed="true"] .emn-countdown-title {
    background: linear-gradient(45deg, rgba(255, 42, 109, 0.1), rgba(255, 42, 109, 0.05), rgba(255, 42, 109, 0.1));
    background-size: 200% 200%;
    animation: textFloat 3s ease-in-out infinite, bgPulse 4s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes redGlow {
    0% {
        text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000, 0 0 20px #ff0000;
    }
    50% {
        text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000, 0 0 40px #ff0000, 0 0 60px #ff0000;
    }
    100% {
        text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000, 0 0 20px #ff0000;
    }
}

.emn-event-closed-glow {
    color: #ff0000 !important;
    font-weight: 800 !important;
    text-align: center !important;
    animation: redGlow 1.5s ease-in-out infinite !important;
    text-transform: uppercase;
    display: block !important;
    margin: 1rem auto !important;
    font-size: 1.5rem !important;
    letter-spacing: 2px !important;
}

.emn-button-closed,
.emn-button-closed:disabled {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #333 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 1 !important;
    background-image: none !important;
}


/* Ticket Purchase Success Banner */
.emn-purchase-success-banner {
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
    animation: fadeInUp 0.5s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.emn-purchase-success-banner i {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Ticket verification styles */
.emn-ticket-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.emn-ticket-header-row h3 {
    margin: 0;
    font-size: 1.5rem;
}

.emn-verify-ticket-button {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    white-space: nowrap;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.emn-verify-ticket-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
    filter: brightness(1.1);
}

@media (max-width: 480px) {
    .emn-ticket-header-row {
        flex-direction: row; /* Keep on same row */
        align-items: center;
    }

    .emn-ticket-header-row h3 {
        font-size: 1.1rem;
    }

    .emn-verify-ticket-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Scanning Animation */
.emn-scanning-wrapper {
    text-align: center;
    padding: 2rem;
}

.emn-scanning-line {
    width: 100%;
    height: 2px;
    background-color: #0ea5e9;
    box-shadow: 0 0 15px #0ea5e9;
    position: relative;
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100px; }
    100% { top: 0; }
}

.emn-verification-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 10px;
}

.emn-verification-row:last-child {
    border-bottom: none;
}

.emn-verification-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.emn-verification-value {
    font-weight: 600;
    color: #fff;
    text-align: right;
    word-break: break-all;
    overflow-wrap: break-word;
}

@media (max-width: 480px) {
    .emn-verification-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .emn-verification-value {
        text-align: left;
        width: 100%;
        font-size: 0.95rem;
    }
}
/* News Headline Ticker Styles */
.emn-news-ticker-container {
    display: flex;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--emn-primary-accent-color, #38BDF8);
    border-radius: 50px;
    margin-bottom: 2rem;
    overflow: hidden;
    height: 44px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

.emn-news-ticker-label {
    background: var(--emn-primary-accent-color, #38BDF8);
    color: #fff;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.emn-news-ticker-label::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
    border-left: 10px solid var(--emn-primary-accent-color, #38BDF8);
}

.emn-news-ticker-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 1rem 0 1.5rem;
}

.emn-news-ticker-scroll {
    display: flex;
    white-space: nowrap;
}

.emn-news-ticker-item {
    padding-right: 3rem;
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.emn-news-ticker-item::after {
    content: '•';
    margin-left: 1.5rem;
    color: var(--emn-primary-accent-color, #38BDF8);
    font-size: 1.5rem;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Half because we'll double the content for seamless loop */
}

@media (max-width: 768px) {
    .emn-news-ticker-container {
        height: 38px;
        margin-bottom: 1.5rem;
    }
    .emn-news-ticker-label {
        padding: 0 1rem;
        font-size: 0.7rem;
    }
    .emn-news-ticker-label::after {
        border-top-width: 19px;
        border-bottom-width: 19px;
    }
    .emn-news-ticker-item {
        font-size: 0.85rem;
        padding-right: 2rem;
    }
    .emn-news-ticker-item::after {
        margin-left: 1rem;
    }
}
