/* AI Football Predictor - Enhanced Mobile-Friendly Styles */

/* Reset and Base Styles */
.aifp-predictions-container *, 
.aifp-news-container * {
    box-sizing: border-box;
}

/* Predictions Container */
.aifp-predictions-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.aifp-predictions-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
}

/* Header Styles */
.predictions-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.predictions-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.predictions-title h2 {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-align: center;
    word-break: break-word;
}

.predictions-icon {
    font-size: 2rem;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.predictions-date {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.predictions-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 10px;
    text-align: center;
    line-height: 1.4;
}

/* Stats Section */
.predictions-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(255,255,255,0.15);
    padding: 15px 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    min-width: 90px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin-top: 5px;
}

/* Predictions Grid */
.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Prediction Cards */
.prediction-card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    container-type: inline-size;
}

.prediction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #2196F3, #FF9800);
}

.prediction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Card Header */
.prediction-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.league-info {
    flex: 1;
    min-width: 150px;
}

.league-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 3px;
    word-break: break-word;
}

.match-time {
    color: #666;
    font-size: 0.8rem;
}

/* Confidence Badge */
.confidence-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    min-width: 70px;
    flex-shrink: 0;
}

.confidence-high {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.confidence-medium {
    background: linear-gradient(135deg, #FF9800, #f57c00);
    color: white;
}

.confidence-low {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.confidence-label {
    font-size: 0.7rem;
    opacity: 0.9;
}

.confidence-value {
    font-weight: 700;
    font-size: 0.9rem;
}

/* Teams Section */
.teams-section {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
}

.team {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    overflow: hidden;
}

.away-team {
    justify-content: flex-end;
    text-align: right;
    flex-direction: row-reverse;
}

.team-logo-container {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-logo-placeholder {
    font-size: 1.2rem;
}

.team-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.team-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.team-form {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.form-result {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.form-win { background: #4CAF50; }
.form-draw { background: #FF9800; }
.form-loss { background: #f44336; }

/* VS Section */
.vs-section {
    text-align: center;
    padding: 0 5px;
    min-width: 60px;
    flex-shrink: 0;
}

.vs-text {
    display: block;
    font-weight: 700;
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.predicted-score {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: keep-all;
}

/* Prediction Sections */
.prediction-sections {
    margin-bottom: 20px;
}

.prediction-section {
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    overflow: hidden;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Main Prediction Options */
.prediction-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.prediction-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.prediction-option.recommended {
    border-color: #4CAF50;
    background: #f8fff8;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.option-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 3px;
    word-break: break-word;
}

.option-odds {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

/* Small Grid Predictions */
.prediction-grid-small {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.mini-prediction {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 0;
}

.mini-prediction.recommended {
    border-color: #2196F3;
    background: #f0f8ff;
}

.mini-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 2px;
}

.mini-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
}

/* Special Predictions */
.special-predictions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.special-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    gap: 10px;
}

.special-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
}

.special-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    text-align: right;
}

/* Professional Insight */
.professional-insight {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    overflow: hidden;
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.insight-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.insight-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.insight-text {
    color: #555;
    line-height: 1.5;
    margin: 0;
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Prediction Meta */
.prediction-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #666;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-label {
    font-weight: 500;
}

.status-pending {
    color: #FF9800;
    font-weight: 600;
}

.status-live {
    color: #FF5722 !important;
    font-weight: 700;
    animation: pulse 1.5s infinite;
}

/* Live Score Styles */
.live-score-section {
    background: linear-gradient(135deg, #FF5722, #FF7043);
    color: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    animation: liveUpdate 2s ease-in-out infinite alternate;
    overflow: hidden;
}

.live-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 5px;
}

.live-indicator {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(5px);
    animation: blink 1s infinite;
    white-space: nowrap;
}

.live-time {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 600;
}

.live-score-display {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    word-break: keep-all;
}

.score-events {
    display: flex;
    justify-content: center;
    font-size: 0.8rem;
    margin-top: 10px;
    opacity: 0.9;
}

/* Footer */
.predictions-footer {
    text-align: center;
    position: relative;
    z-index: 1;
}

.disclaimer {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-align: left;
}

.disclaimer-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.disclaimer-content {
    flex: 1;
    min-width: 0;
}

.disclaimer h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1rem;
}

.disclaimer p {
    margin: 0;
    color: #555;
    line-height: 1.5;
    font-size: 0.9rem;
    word-wrap: break-word;
}

.powered-by {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* Error and No Content States */
.prediction-error,
.prediction-no-matches,
.news-error,
.news-no-content {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.prediction-error h3,
.prediction-no-matches h3,
.news-error h3,
.news-no-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* NEWS STYLES */
.aifp-news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.news-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.news-title h2 {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-align: center;
    word-break: break-word;
}

.news-icon {
    font-size: 2rem;
    animation: bounce 2s infinite;
    flex-shrink: 0;
}

.news-timestamp {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.news-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 10px;
    line-height: 1.4;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.news-card.featured {
    grid-column: span 2;
}

.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.news-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.news-card.featured .news-image-container {
    height: 220px;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.news-image-placeholder {
    height: 180px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card.featured .news-image-placeholder {
    height: 220px;
}

.placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.news-text-content {
    padding: 20px;
    overflow: hidden;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.75rem;
    color: #666;
    flex-wrap: wrap;
}

.news-source {
    font-weight: 600;
    color: #2196F3;
}

.news-separator {
    opacity: 0.5;
}

.news-time {
    color: #999;
}

.breaking-indicator {
    background: #ff4444;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    animation: blink 1s infinite;
}

.news-headline {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.news-card.featured .news-headline {
    font-size: 1.3rem;
}

.news-headline a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-headline a:hover {
    color: #2196F3;
}

.news-description {
    color: #555;
    line-height: 1.5;
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    white-space: nowrap;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    color: white;
    text-decoration: none;
}

.btn-icon {
    transition: transform 0.3s ease;
}

.read-more-btn:hover .btn-icon {
    transform: translateX(3px);
}

.article-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.article-tag {
    background: #f8f9fa;
    color: #666;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.news-footer {
    text-align: center;
    position: relative;
    z-index: 1;
}

.news-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.news-powered-by {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes liveUpdate {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(255, 87, 34, 0);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* CRITICAL MOBILE FIXES */
@media (max-width: 768px) {
    .aifp-predictions-container,
    .aifp-news-container {
        margin: 10px;
        padding: 15px;
        border-radius: 15px;
    }
    
    .predictions-title h2,
    .news-title h2 {
        font-size: 1.8rem;
        word-break: break-word;
        hyphens: auto;
        line-height: 1.2;
    }
    
    .predictions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card.featured {
        grid-column: span 1;
    }
    
    .predictions-stats,
    .news-stats {
        gap: 15px;
        margin: 20px 0;
    }
    
    .stat-item {
        min-width: 70px;
        padding: 12px 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* MOBILE TEAMS LAYOUT FIX */
    .teams-section {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .team {
        justify-content: center;
        flex-direction: row;
    }
    
    .away-team {
        justify-content: center;
        text-align: center;
        flex-direction: row;
    }
    
    .vs-section {
        order: -1;
        margin: 10px 0;
    }
    
    .predicted-score {
        font-size: 1.6rem;
    }
    
    /* MOBILE PREDICTIONS LAYOUT */
    .prediction-options {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .prediction-grid-small {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .prediction-meta {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 5px;
    }
    
    .disclaimer {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .news-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .article-tags {
        justify-content: center;
    }
    
    .live-score-display {
        font-size: 1.5rem;
    }
    
    .score-events {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    /* MOBILE TEXT WRAPPING FIXES */
    .team-name {
        font-size: 0.9rem;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }
    
    .league-name {
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .insight-text {
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

@media (max-width: 480px) {
    .aifp-predictions-container,
    .aifp-news-container {
        margin: 5px;
        padding: 12px;
        border-radius: 12px;
    }
    
    .predictions-title,
    .news-title {
        flex-direction: column;
        gap: 10px;
    }
    
    .predictions-title h2,
    .news-title h2 {
        font-size: 1.5rem;
        word-break: break-word;
        hyphens: auto;
    }
    
    .prediction-card {
        padding: 15px;
        border-radius: 15px;
    }
    
    .prediction-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .confidence-badge {
        align-self: flex-end;
        padding: 6px 10px;
    }
    
    .team-name {
        font-size: 0.85rem;
        text-align: center;
    }
    
    .predicted-score {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 0.85rem;
    }
    
    .prediction-section {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .option-label,
    .mini-label {
        font-size: 0.75rem;
    }
    
    .option-odds,
    .mini-value {
        font-size: 0.9rem;
    }
    
    .special-item {
        padding: 6px 10px;
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .special-label,
    .special-value {
        font-size: 0.75rem;
    }
    
    .professional-insight {
        padding: 12px;
    }
    
    .insight-text {
        font-size: 0.85rem;
    }
    
    .news-headline {
        font-size: 1rem;
    }
    
    .news-card.featured .news-headline {
        font-size: 1.1rem;
    }
    
    .news-text-content {
        padding: 15px;
    }
    
    .read-more-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        justify-content: center;
        width: 100%;
    }
    
    .live-score-section {
        padding: 12px;
    }
    
    .live-score-display {
        font-size: 1.3rem;
    }
    
    .live-indicator {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .live-time {
        font-size: 0.8rem;
    }
    
    /* Force proper text wrapping */
    * {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .prediction-card,
    .news-card {
        overflow: hidden !important;
    }
    
    .team-info {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .predictions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-card.featured {
        grid-column: span 2;
    }
    
    .prediction-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .prediction-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .predictions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .news-card.featured {
        grid-column: span 2;
    }
}

/* Enhanced Color Support for Mobile Browsers */
@supports (-webkit-background-clip: text) {
    .predicted-score {
        background: linear-gradient(135deg, #667eea, #764ba2);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

@supports not (-webkit-background-clip: text) {
    .predicted-score {
        color: #667eea !important;
    }
}

/* Ensure gradients work on all devices */
.confidence-high,
.confidence-medium,
.confidence-low {
    background-attachment: fixed;
}

.live-score-section {
    background-attachment: fixed;
}

.read-more-btn {
    background-attachment: fixed;
}

/* Print styles */
@media print {
    .aifp-predictions-container,
    .aifp-news-container {
        background: white !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .prediction-card,
    .news-card {
        break-inside: avoid;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
        margin-bottom: 20px;
    }
    
    .read-more-btn {
        display: none;
    }
    
    .live-score-section {
        background: #f5f5f5 !important;
        color: #333 !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .prediction-card,
    .news-card {
        border: 2px solid #333;
    }
    
    .confidence-badge {
        border: 1px solid #000;
    }
    
    .read-more-btn {
        border: 2px solid #000;
    }
    
    .prediction-option,
    .mini-prediction {
        border-width: 3px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .prediction-card,
    .news-card {
        background: rgba(255,255,255,0.95);
    }
    
    .disclaimer {
        background: rgba(255,255,255,0.95);
    }
    
    .prediction-section,
    .professional-insight {
        background: rgba(248,249,250,0.95);
    }
}

/* Container overflow fixes */
.aifp-predictions-container,
.aifp-news-container {
    contain: layout style;
    isolation: isolate;
}

.prediction-card,
.news-card {
    contain: layout style;
    isolation: isolate;
    position: relative;
}

/* Text overflow safety */
.team-name,
.league-name,
.news-headline,
.insight-text {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}