/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 25%, #e63946 50%, #dc1c13 75%, #000000 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    overflow-x: hidden;
}

/* Header styles */
.header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #ffd700;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    width: 300px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.linkWeb {
    text-decoration: none;
    transition: transform 0.3s ease;
}

.linkWeb:hover {
    transform: scale(1.1);
}

.linkGif {
    width: 200px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* Main content */
.main-content {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Loading states */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    color: #ffd700;
    text-align: center;
    font-weight: 500;
}

/* Error states */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.error-message {
    text-align: center;
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid #dc3545;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
}

.error-message h2 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 24px;
}

.error-message p {
    margin-bottom: 20px;
    color: #ccc;
    line-height: 1.6;
}

.retry-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* Stats container */
.stats-container {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
    font-size: 16px;
    color: #ccc;
}

.stat-item strong {
    color: #ffd700;
    font-size: 20px;
    display: block;
    margin-bottom: 5px;
}

/* Provider sections */
.provider-section {
    margin-bottom: 50px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(10px);
}

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.provider-title {
    font-size: 28px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.provider-stats {
    background: rgba(255, 215, 0, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    font-size: 14px;
    color: #ffd700;
    font-weight: 500;
}

/* Image grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 0 auto;
    align-items: start;
}

/* Card styles */
.card {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #333;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
}

/* RTP-based card styling */
.card.high-rtp {
    border-color: #28a745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

.card.high-rtp:hover {
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.5);
}

.card.medium-rtp {
    border-color: #ffc107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}

.card.medium-rtp:hover {
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.5);
}

.card.low-rtp {
    border-color: #dc3545;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.3);
}

.card.low-rtp:hover {
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.5);
}

/* Card image container */
.card-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 10px;
}

.card-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px 15px 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .card-overlay {
    opacity: 1;
}

.game-name {
    color: #ffd700;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Card content */
.card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.description {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Meter styles */
.meter {
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 10px;
    transition: width 1.2s ease-out;
    position: relative;
    overflow: hidden;
    display: block;
    min-width: 0%;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.meter-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* High RTP meter colors */
.high-rtp .meter-fill {
    background: linear-gradient(90deg, #28a745, #20c997, #28a745);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.6);
}

.medium-rtp .meter-fill {
    background: linear-gradient(90deg, #ffc107, #ffca2c, #ffc107);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
}

.low-rtp .meter-fill {
    background: linear-gradient(90deg, #dc3545, #e74c3c, #dc3545);
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.6);
}

/* Debug styles - ensure meter bars are visible */
.meter-fill {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    margin-top: 50px;
}

.footer p {
    color: #ccc;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container-title {
        padding: 15px;
    }
    
    .logo {
        width: 250px;
    }
    
    .linkGif {
        width: 150px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .provider-section {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .provider-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .provider-title {
        font-size: 24px;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        font-size: 14px;
    }
    
    .stat-item strong {
        font-size: 18px;
    }
    
    .description {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card {
        max-width: 100%;
    }
    
    .logo {
        width: 200px;
    }
    
    .linkGif {
        width: 120px;
    }
    
    .provider-title {
        font-size: 20px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.card:focus-within {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

.retry-btn:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .loading-container,
    .error-container,
    .stats-container,
    .footer {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        border: 1px solid #000;
        background: white;
        color: black;
    }
}