/* Contest Cards Layout */

/* Container for contest games */
.lobby-contests {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

/* Individual contest card */
.contest-game {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    margin-bottom: 0 !important;
}

.contest-game:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.contest-game.locked,
.contest-game.in-progress {
    opacity: 0.7;
    background: #ffffff;
}

.contest-game a {
    display: flex !important;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    padding: 0 !important;
}

/* Card Header with Logo */
.contest-game .contest-left {
    background: #f890e7;
    padding: 5px;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    width: 100%;
    border-radius: 12px;
}

.contest-begins {
    background-color: #0bd3d3;
}

.contest-game .contest-left img {
    max-width: 80px;
    max-height: 80px;
    min-height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    margin-top: 10px;
}

.contest-game .contest-type {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Card Body */
.contest-game .contest-right {
    padding: 20px 0 0 0;
    display: flex !important;
    flex-direction: column;
    flex-grow: 1;
    background: #ffffff;
}

.contest-game .contest-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.contest-game .contest-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contest-game .contest-date:before {
    content: '📅';
    margin-right: 8px;
}

/* Status Badge */
.contest-game .contest-begins {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    margin-top: auto;
}

.contest-game .contest-begins strong {
    color: white;
    font-weight: 600;
}

.contest-game.locked .contest-begins,
.contest-game.in-progress .contest-begins {
    background: #f0f0f0;
    color: #999;
}

.contest-game.locked .contest-begins i,
.contest-game.in-progress .contest-begins i {
    margin-left: 5px;
}


.contest-game.contest-ncaaf .contest-left {
    background: linear-gradient(135deg, #990000 0%, #FF6B6B 100%);
}

.contest-game.contest-pga .contest-left {
    background: linear-gradient(135deg, #006747 0%, #FF6B6B 100%);
}

.contest-game.contest-mls .contest-left {
    background: linear-gradient(135deg, #C40C0C 0%, #002F65 100%);
}

.contest-game.contest-nascar .contest-left {
    background: linear-gradient(135deg, #FFD659 0%, #E4002B 100%);
}

/* Contest Type specific styling */
.contest-game.contest-status-Mixed .contest-type {
    background: linear-gradient(90deg, #FF6B6B 0%, #4ECDC4 100%);
}

.contest-game.contest-status-OverUnder .contest-type {
    background: rgba(255, 165, 0, 0.3);
}

.contest-game.contest-status-Spread .contest-type {
    background: rgba(0, 123, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .lobby-contests {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .lobby-contests {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
    
    .contest-game .contest-left {
        min-height: 100px;
        padding: 15px;
    }
    
    .contest-game .contest-left img {
        max-width: 60px;
        max-height: 60px;
    }
    
    .contest-game .contest-right {
        padding: 15px;
    }
    
    .contest-game .contest-title {
        font-size: 15px;
        min-height: auto;
    }
}

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

.contest-game {
    animation: slideIn 0.3s ease-out;
}

/* Hover effects for interactive elements */
.contest-game:not(.locked):not(.in-progress) a:hover .contest-left {
    filter: brightness(1.1);
}

.contest-game:not(.locked):not(.in-progress) a:hover .contest-title {
    color: #667eea;
}

/* Coming Soon Badge */
.contest-game.coming-soon {
    position: relative;
}

.contest-game.coming-soon::before {
    content: 'COMING SOON';
    position: absolute;
    top: 10px;
    right: -30px;
    background: #FF6B6B;
    color: white;
    padding: 5px 40px;
    font-size: 11px;
    font-weight: 600;
    transform: rotate(45deg);
    z-index: 1;
}

/* Loading state */
.contest-game.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
