/* Super Ace Alert Custom Styling */
#superAceAlertModal {
    z-index: 1080 !important; /* Higher than navbar */
}

.modal-backdrop {
    z-index: 1070 !important;
}

.super-ace-alert-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f23 100%);
    border: 2px solid #ffd700;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
}

.super-ace-alert-header {
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    background-size: 200% 100%;
    animation: gold-shimmer 3s ease-in-out infinite;
    border-bottom: 2px solid #ffd700;
    padding: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Close button styling for better visibility */
.super-ace-alert-header .btn-close {
    background-color: rgba(26, 26, 46, 0.5);
    border-radius: 50%;
    opacity: 1;
    padding: 0.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.super-ace-alert-header .btn-close:hover {
    background-color: rgba(26, 26, 46, 0.7);
    transform: rotate(90deg);
    transition: all 0.3s ease;
}

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

.super-ace-alert-title {
    color: #1a1a2e;
    font-weight: 900;
    font-size: 2rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    padding-right: 1rem;
}

.super-ace-icon {
    font-size: 2.5rem;
    color: #1a1a2e;
    animation: trophy-pulse 2s ease-in-out infinite;
}

@keyframes trophy-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.super-ace-alert-body {
    padding: 2rem;
    color: #fff;
}

.super-ace-winner-section {
    margin-bottom: 2rem;
}

.winner-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.winner-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffd700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.winner-info {
    flex: 1;
}

.super-ace-winner-name {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.winner-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.winner-stat {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.winner-stat i {
    color: #ffd700;
    margin-right: 0.25rem;
}

.super-ace-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.super-ace-detail {
    text-align: center;
    padding: 0.5rem;
}

.detail-label {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.detail-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.detail-value.amount-won {
    color: #4ade80;
    font-size: 1.75rem;
    font-weight: 700;
}

.detail-value.current-pot {
    color: #ffd700;
    font-size: 1.5rem;
}

.super-ace-media-container {
    margin: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.super-ace-media-wrapper {
    margin: 1.5rem 0;
}

.media-caption {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-align: center;
}

.super-ace-video,
.super-ace-image {
    width: 100%;
    height: auto;
    display: block;
}

.super-ace-video {
    max-height: 500px;
    max-width: 100%;
    width: auto;
    margin: 0 auto;
    display: block;
    object-fit: contain;
    background: #000;
}

/* Portrait video container */
.super-ace-media-container.video-container {
    display: flex;
    justify-content: center;
    background: #000;
}

.super-ace-achievement {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.achievement-header {
    color: #ffd700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.achievement-header i {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.achievement-name {
    color: #ffd700;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.achievement-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.super-ace-flippy-comment {
    background: rgba(255, 215, 0, 0.1);
    border-left: 4px solid #ffd700;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 0.5rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.super-ace-flippy-comment p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.super-ace-alert-footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.super-ace-alert-footer .btn {
    min-width: 150px;
}

.super-ace-alert-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.super-ace-alert-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.super-ace-alert-footer .btn-primary {
    background: #ffd700;
    border: 2px solid #1a1a2e;
    color: #1a1a2e;
    font-weight: 700;
    text-shadow: none;
}

.super-ace-alert-footer .btn-primary:hover {
    background: #ffed4e;
    border-color: #0f0f23;
    color: #0f0f23;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.super-ace-alert-footer .btn-info {
    background: rgba(23, 162, 184, 0.2);
    border: 1px solid #17a2b8;
    color: #17a2b8;
}

.super-ace-alert-footer .btn-info:hover {
    background: rgba(23, 162, 184, 0.3);
    border-color: #17a2b8;
    transform: translateY(-1px);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .btn-close-white {
        filter: none;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .super-ace-alert-title {
        font-size: 1.5rem;
    }
    
    .super-ace-icon {
        font-size: 2rem;
    }
    
    .winner-profile {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .winner-photo {
        width: 80px;
        height: 80px;
    }
    
    .super-ace-winner-name {
        font-size: 1.5rem;
    }
    
    .winner-stats {
        justify-content: center;
        gap: 1rem;
    }
    
    .super-ace-details {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .detail-value.amount-won {
        font-size: 1.5rem;
    }
    
    .detail-value.current-pot {
        font-size: 1.25rem;
    }
    
    .achievement-name {
        font-size: 1.25rem;
    }
    
    .super-ace-alert-footer {
        flex-direction: column;
    }
    
    .super-ace-alert-footer .btn {
        width: 100%;
    }
    
    .super-ace-video {
        max-height: 400px;
    }
}

/* Entrance animation */
.super-ace-alert-content {
    animation: super-ace-entrance 0.5s ease-out;
}

@keyframes super-ace-entrance {
    0% {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}