/* Cricket Widget Styles */
.cricket-widget-section {
    margin: 25px 0 35px 0;
    background: linear-gradient(to right, #1a2980, #26d0ce);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    color: white;
    position: relative;
    overflow: hidden;
}

.cricket-widget-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
    z-index: 1;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.widget-title i {
    color: #FFD700;
    animation: pulse 2s infinite;
}

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

.widget-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Cricket Widget Grid */
.cricket-widgets-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    position: relative;
    z-index: 2;
}

.cricket-widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.cricket-widget:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.cricket-widget.has-scoreboard {
    border-left: 5px solid #FFD700;
}

.cricket-widget.has-scoreboard::after {
    content: '📊 Scoreboard';
    position: absolute;
    top: 10px;
    right: 100px;
    background: #FFD700;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 15px;
    animation: blink 2s infinite;
}

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

.match-info {
    margin-bottom: 15px;
}

.match-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.match-type {
    display: inline-block;
    /* background: rgba(255, 255, 255, 0.2); */
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0px;
}

.match-status {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Teams Section */
.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
}

.team {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.team-2 {
    justify-content: flex-end;
}

.team-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* background: white; */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1a2980;
    /* border: 2px solid rgba(255, 255, 255, 0.5); */
}

.team-name {
    font-size: 1rem;
    font-weight: 600;
}

.vs {
    padding: 0 15px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
}

/* Scores Section */
.match-score {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.inning {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.inning:last-child {
    margin-bottom: 0;
}

.score-value {
    font-weight: 700;
    color: #FFD700;
}

/* Widget Footer */
.widget-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.8rem;
    opacity: 0.8;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
}

/* No Matches State */
.no-matches {
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

.no-matches i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.5);
}

.no-matches h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Loading Animation */
.loading-widget {
    text-align: center;
    padding: 30px;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .cricket-widgets-container {
        grid-template-columns: 1fr;
    }
    
    .widget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .match-teams {
        flex-direction: column;
        gap: 15px;
    }
    
    .team {
        width: 100%;
    }
    
    .team-2 {
        justify-content: flex-start;
    }
    
    .vs {
        padding: 0;
    }
}

/* Notification */
.cricket-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
    display: none;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
/* Add this to your existing CSS */
.cricket-widgets-container {
    max-height: 250px; /* Adjust this value as needed */
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar styling */
.cricket-widgets-container::-webkit-scrollbar {
    width: 8px;
}

.cricket-widgets-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.cricket-widgets-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.cricket-widgets-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}
/* Add this to reduce the overall section height */
.cricket-widget-section {
    margin: -40px 0 20px 0; /* Reduced from 25px 0 35px 0 */
    padding: 15px; /* Reduced from 20px */
}

.cricket-widget {
    padding: 15px; /* Reduced from 20px */
}

.match-info {
    margin-bottom: 10px; /* Reduced from 15px */
}

.match-teams {
    margin: 15px 0; /* Reduced from 20px 0 */
}

.match-score {
    padding: 12px; /* Reduced from 15px */
    margin-top: 12px; /* Reduced from 15px */
}

.widget-footer {
    margin-top: 12px; /* Reduced from 15px */
    padding-top: 8px; /* Reduced from 10px */
}
/* Add to your CSS */
.cricket-widget-section.collapsed {
    max-height: 100px !important;
    transition: all 0.3s ease;
}

.cricket-widget-section.expanded {
    transition: all 0.3s ease;
}

.widgets-hidden {
    display: none !important;
}
/* Add these styles to your existing CSS */

/* Enhanced single widget layout */
.cricket-widget.detailed {
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

/* Enhanced match info */
.match-info.detailed {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.match-title-section {
    flex: 1;
}

.match-meta-section {
    text-align: justify;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.match-series {
    font-size: 0.85rem;
    opacity: 0.9;
    color: #FFD700;
    font-weight: 600;
}

.match-number {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 5px;
}

/* Enhanced teams section */
.match-teams.detailed {
    margin: -15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.team.detailed {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.team-logo.detailed {
    width: 50px;
    height: 50px;
    font-size: 1rem;
}

.team-name.detailed {
    font-size: 1.1rem;
}

.team-captain {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 2px;
}

/* Enhanced score section */
.match-score.detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.inning-detailed {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 10px;
}

.inning-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #FFD700;
}

.batsmen, .bowlers {
    margin-top: 8px;
}

.player {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.player-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-stats {
    color: #FFD700;
    font-weight: 600;
}

/* Match details section */
.match-details {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
}

.detail-label {
    opacity: 0.8;
}

.detail-value {
    font-weight: 600;
    color: #FFD700;
}

/* Umpires and match officials */
.match-officials {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 10px;
}

/* Win probability indicator */
.win-probability {
    margin-top: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
}

.probability-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
}

.probability-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Live indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ff4757;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulseLive 1.5s infinite;
}
.live-dot {
    font-size: 0.6rem;
}

@keyframes pulseLive {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}