/* Monthly Winners Frontend Styles - Enhanced with Navigation */
.monthly-winners-display { 
    margin: 2rem 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #1d1e1f;
    border-radius: 20px;
    padding: 2rem;
    color: white;
    border: 1px solid #333;
}

/* Navigation Controls */
.winners-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.winners-navigation select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 120px;
}

.winners-navigation select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.winners-navigation select option {
    background: #1d1e1f;
    color: white;
}

.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.view-toggle button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.view-toggle button.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.view-toggle button:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.winners-title { 
    text-align: center; 
    font-size: 2.5rem; 
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.winners-category { 
    margin-bottom: 3rem; 
}

.category-title { 
    text-align: center; 
    font-size: 1.8rem; 
    margin-bottom: 2rem;
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Grid View (Default) */
.winners-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 1.5rem; 
    max-width: 1400px; 
    margin: 0 auto; 
    justify-items: center;
    transition: all 0.3s ease;
}

/* List View */
.winners-list {
    display: none;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.list-view .winners-grid {
    display: none !important;
}

.list-view .winners-list {
    display: flex !important;
}

.list-view .winner-entry {
    display: flex;
    align-items: center;
    text-align: left;
    max-width: none;
    width: 100%;
    padding: 1rem 1.5rem;
    gap: 1.5rem;
}

.list-view .winner-image,
.list-view .winner-avatar {
    width: 80px;
    height: 120px;
    margin: 0;
    flex-shrink: 0;
}

.list-view .winner-badge {
    position: static;
    margin-right: 1rem;
    flex-shrink: 0;
}

.list-view .winner-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-view .winner-name {
    margin: 0;
    font-size: 1.2rem;
}

.list-view .winner-score {
    margin: 0;
    display: inline-block;
    align-self: flex-start;
}

.winner-entry { 
    position: relative; 
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px; 
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    width: 100%;
    max-width: 320px;
    overflow: hidden;
}

.winner-entry::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 16px;
    z-index: 1;
}

.winner-entry:hover::before {
    opacity: 1;
}

.winner-entry:hover { 
    transform: translateY(-12px) scale(1.03); 
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
}

.winner-entry > * {
    position: relative;
    z-index: 2;
}

.winner-image, .winner-avatar { 
    width: 200px; 
    height: 300px; 
    border-radius: 12px; 
    object-fit: cover; 
    margin: 0 auto 1.5rem; 
    display: block; 
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.4s ease;
}

.winner-entry:hover .winner-image,
.winner-entry:hover .winner-avatar {
    transform: scale(1.05) rotateY(5deg);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

.winner-badge { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 700; 
    font-size: 16px; 
    color: white; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.3); 
    z-index: 10;
    border: 3px solid white;
    transition: all 0.3s ease;
}

.winner-entry:hover .winner-badge {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.winner-badge.first-place { 
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
}

.winner-badge.second-place { 
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8); 
    color: #333; 
}

.winner-badge.third-place { 
    background: linear-gradient(135deg, #CD7F32, #B8860B); 
    color: white;
}

.winner-badge.other-place { 
    background: linear-gradient(135deg, #6366f1, #8b5cf6); 
    color: white;
}

.winner-name { 
    margin: 0 0 0.5rem 0; 
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.winner-name a { 
    color: white; 
    text-decoration: none; 
    transition: all 0.3s ease;
    position: relative;
}

.winner-name a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.winner-entry:hover .winner-name a::after {
    width: 100%;
}

.winner-name a:hover { 
    color: #667eea;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.winner-score { 
    color: #667eea;
    font-size: 0.9rem; 
    margin: 0.5rem 0 0; 
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.3);
    display: inline-block;
    transition: all 0.3s ease;
}

.winner-entry:hover .winner-score {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* Loading State */
.winners-loading {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.winners-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ONLY apply full width styles to individual monthly winner pages, NOT shortcode pages */
.single-monthly-winners .monthly-winners-display {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    max-width: none !important;
    border-radius: 0 !important;
}

@media (max-width: 768px) { 
    .monthly-winners-display {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 16px;
    }
    
    .winners-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .winners-navigation select {
        min-width: 200px;
    }
    
    /* Remove the full width on mobile for both pages */
    .single-monthly-winners .monthly-winners-display {
        width: 100% !important;
        margin-left: 0 !important;
        border-radius: 16px !important;
    }
    
    .winners-grid { 
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
        gap: 1rem; 
    } 
    
    .winner-entry {
        padding: 1rem;
        max-width: 250px;
    }
    
    .winner-image, .winner-avatar { 
        width: 160px; 
        height: 240px; 
    } 
    
    .winner-badge { 
        width: 40px; 
        height: 40px; 
        font-size: 14px; 
        top: 10px; 
        right: 10px; 
    }
    
    .winners-title {
        font-size: 2rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .winner-name {
        font-size: 1.1rem;
    }
    
    .winner-score {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* List view mobile adjustments */
    .list-view .winner-entry {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .list-view .winner-badge {
        position: absolute;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .winners-grid { 
        grid-template-columns: 1fr; 
    }
    
    .winner-entry {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .winner-image, .winner-avatar { 
        width: 140px; 
        height: 210px; 
    }
}