/* Βασικά στυλ RNG Analyzer */
.rng-analysis-container,
.rng-code-types-container,
.rng-patterns-container,
.rng-sequence-analysis,
.rng-code-details {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.rng-title {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
    font-size: 1.8em;
}

.rng-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.rng-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
}

.rng-summary-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.rng-label {
    display: block;
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.rng-value {
    display: block;
    font-size: 1.6em;
    color: #2980b9;
    font-weight: 700;
}

.rng-section {
    background: #ffffff;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #f1f3f4;
}

.rng-section h3 {
    color: #2c3e50;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rng-section h3:before {
    content: "▸";
    color: #3498db;
}

.rng-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.rng-table th {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-weight: 600;
    padding: 14px 18px;
    text-align: left;
    border: none;
    font-size: 0.95em;
}

.rng-table td {
    padding: 12px 18px;
    border-bottom: 1px solid #f1f3f4;
    background: white;
}

.rng-table tbody tr:hover {
    background-color: #f8f9fa;
}

.rng-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.rng-table tbody tr:nth-child(even):hover {
    background-color: #f1f3f4;
}

/* Στυλ για τύπους κωδικών */
.code-types-table th {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.code-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-type-badge.ουδέτερος {
    background: #3498db;
    color: white;
}

.code-type-badge.ελαφρώς-προκατειλημμένος {
    background: #f39c12;
    color: white;
}

.code-type-badge.προτίμηση-γηπεδούχου {
    background: #2ecc71;
    color: white;
}

.code-type-badge.προτίμηση-ισοπαλίας {
    background: #e74c3c;
    color: white;
}

.code-type-badge.προτίμηση-φιλοξενούμενου {
    background: #9b59b6;
    color: white;
}

/* Μπάρες ποσοστών */
.percentage-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.percentage-value {
    min-width: 50px;
    font-weight: 600;
    color: #2c3e50;
}

.percentage-bar {
    flex: 1;
    height: 10px;
    background: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
    min-width: 80px;
}

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

.bar-fill.home-win {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.bar-fill.draw {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.bar-fill.away-win {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

/* Στατιστικά πλαίσια */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-top: 4px solid #3498db;
    transition: transform 0.2s;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #2980b9;
    margin-bottom: 5px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.stat-details {
    color: #95a5a6;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.stat-percentage {
    font-size: 1.1em;
    font-weight: 600;
    color: #2ecc71;
}

/* Compact table για σκορ */
.compact-table {
    display: grid;
    gap: 8px;
    margin: 20px 0;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.score-value {
    font-weight: 700;
    color: #2c3e50;
    min-width: 40px;
}

.score-count {
    color: #7f8c8d;
    min-width: 50px;
}

.score-bar {
    flex: 1;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.score-percentage {
    color: #2980b9;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

/* Ακολουθίες */
.streaks-container {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.streak-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    flex: 1;
    max-width: 200px;
}

.streak-label {
    display: block;
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.streak-value {
    font-size: 2.5em;
    font-weight: 700;
    color: #e74c3c;
}

/* Μενου */
.rng-menu {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
}

.rng-menu h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 20px;
    border: none;
}

.rng-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.rng-menu-link {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s;
    font-weight: 600;
}

.rng-menu-link:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

/* Shortcodes info */
.rng-shortcodes-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
}

.shortcode-list {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.shortcode-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #2ecc71;
}

.shortcode-item code {
    background: #2c3e50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    min-width: 250px;
}

.shortcode-item span {
    color: #7f8c8d;
    font-size: 0.95em;
}

/* Ανάλυση τύπων */
.code-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-weight: 600;
    color: #495057;
}

.filter-select {
    padding: 8px 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    color: #495057;
    font-weight: 600;
    cursor: pointer;
}

.filter-select:focus {
    border-color: #3498db;
    outline: none;
}

/* Summary cards */
.code-summary {
    margin-top: 30px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 1em;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.card-value {
    font-size: 2.2em;
    font-weight: 700;
    color: #2980b9;
    margin-bottom: 5px;
}

.card-percentage {
    font-size: 1.1em;
    color: #2ecc71;
    font-weight: 600;
}

.full-list-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

.full-list-link a {
    display: inline-block;
    padding: 12px 30px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.full-list-link a:hover {
    background: #2980b9;
    transform: scale(1.05);
}

/* Μοτίβα */
.predictability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.predictable-code {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #3498db;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.code-number {
    font-weight: 700;
    color: #2c3e50;
}

.predictability-score {
    background: #e74c3c;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #ecf0f1;
}

.stat-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.prediction-type {
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

.prediction-1 {
    background: #d5f4e6;
    color: #27ae60;
}

.prediction-X {
    background: #fadbd8;
    color: #c0392b;
}

.prediction-2 {
    background: #e8daef;
    color: #8e44ad;
}

/* Ωριαία μοτίβα */
.hourly-patterns th {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.hourly-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-bar {
    flex: 1;
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    overflow: hidden;
    min-width: 50px;
}

.mini-fill {
    height: 100%;
}

.popular-type {
    display: inline-block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    text-align: center;
    line-height: 25px;
    font-weight: 700;
    color: white;
}

.type-1 {
    background: #2ecc71;
}

.type-X {
    background: #e74c3c;
}

.type-2 {
    background: #9b59b6;
}

/* Στρατηγικές */
.strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.strategy-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-top: 4px solid #3498db;
    transition: transform 0.3s;
}

.strategy-card:hover {
    transform: translateY(-5px);
}

.strategy-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.strategy-card h4 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
}

.strategy-card p {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
}

.strategy-codes {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    font-size: 0.9em;
    color: #495057;
}

/* Λεπτομέρειες κωδικού */
.code-header-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.header-stat {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-top: 4px solid #2ecc71;
}

.header-stat .stat-label {
    display: block;
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.header-stat .stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: 700;
    color: #2980b9;
}

.code-details-table th {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Αποτελέσματα */
.outcome-cell {
    font-weight: 700;
    text-align: center;
    font-size: 1.2em;
    border-radius: 4px;
}

.outcome-1 .outcome-cell {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.outcome-X .outcome-cell {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.outcome-2 .outcome-cell {
    background: rgba(155, 89, 182, 0.15);
    color: #8e44ad;
}

/* Σφάλματα */
.rng-error {
    background: #ffebee;
    color: #c62828;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #f44336;
    text-align: center;
    margin: 20px 0;
}

.rng-error h3 {
    margin-top: 0;
    color: #c62828;
}

/* Responsive */
@media (max-width: 768px) {
    .rng-analysis-container,
    .rng-code-types-container,
    .rng-patterns-container,
    .rng-sequence-analysis,
    .rng-code-details {
        padding: 15px;
    }
    
    .rng-summary {
        grid-template-columns: 1fr;
    }
    
    .rng-menu ul {
        flex-direction: column;
    }
    
    .rng-table {
        font-size: 0.9em;
        display: block;
        overflow-x: auto;
    }
    
    .stats-grid,
    .summary-cards,
    .predictability-grid,
    .strategies-grid {
        grid-template-columns: 1fr;
    }
    
    .streaks-container {
        flex-direction: column;
        align-items: center;
    }
    
    .streak-item {
        max-width: 100%;
    }
    
    .code-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .shortcode-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .shortcode-item code {
        min-width: auto;
        width: 100%;
        overflow-x: auto;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.rng-section,
.rng-summary,
.rng-table {
    animation: fadeIn 0.5s ease-out;
}

/* Tooltips */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* Loading states */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
}

.loading:before {
    content: "⏳";
    margin-right: 10px;
}

/* Markov Chain Analysis Styles */

.rng-markov-container,
.rng-markov-simple {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.markov-section {
    background: #ffffff;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #f1f3f4;
}

.markov-section h3 {
    color: #2c3e50;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.markov-section h3:before {
    content: "▸";
    color: #3498db;
}

.section-description {
    color: #7f8c8d;
    font-size: 0.95em;
    margin-bottom: 20px;
    font-style: italic;
}

/* Transition Matrix */
.transition-matrix {
    overflow-x: auto;
    margin: 20px 0;
}

.markov-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.markov-table th {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.markov-table .from-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: left;
    padding-left: 20px;
}

.transition-cell {
    text-align: center;
    padding: 15px;
    border: 1px solid #ecf0f1;
    background: #f8f9fa;
}

.total-cell {
    text-align: center;
    padding: 15px;
    background: #2c3e50;
    color: white;
    font-weight: 600;
}

.transition-value {
    font-size: 1.2em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.transition-bar {
    height: 10px;
    background: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.transition-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 5px;
}

.transition-count {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.transition-arrow {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    color: white;
}

.transition-same { background: #3498db; }
.transition-1x { background: #e74c3c; }
.transition-12 { background: #9b59b6; }
.transition-x1 { background: #2ecc71; }
.transition-x2 { background: #f39c12; }
.transition-21 { background: #1abc9c; }
.transition-2x { background: #d35400; }
.transition-default { background: #7f8c8d; }

/* Key Insights */
.key-insights {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #3498db;
}

.key-insights h4 {
    margin-top: 0;
    color: #2c3e50;
}

.key-insights ul {
    margin: 0;
    padding-left: 20px;
}

.key-insights li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Streaks Analysis */
.streaks-analysis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.streak-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-top: 4px solid #3498db;
}

.streak-card h4 {
    margin-top: 0;
    color: #2c3e50;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.streak-stats {
    display: grid;
    gap: 10px;
    margin: 15px 0;
}

.streak-stats .stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #ecf0f1;
}

.streak-stats .stat:last-child {
    border-bottom: none;
}

.streak-stats .label {
    color: #7f8c8d;
}

.streak-stats .value {
    font-weight: 600;
    color: #2980b9;
}

.streak-distribution {
    margin-top: 20px;
}

.streak-distribution h5 {
    margin-top: 0;
    color: #7f8c8d;
    font-size: 0.95em;
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.distribution-item .length {
    min-width: 120px;
    font-weight: 600;
    color: #2c3e50;
}

.distribution-bar {
    flex: 1;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.distribution-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
}

.distribution-item .count {
    min-width: 100px;
    text-align: right;
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Probability Table */
.probability-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.probability-table th {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.probability-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ecf0f1;
}

.probability-cell {
    font-weight: 600;
    font-size: 1.1em;
    position: relative;
}

.probability-higher {
    background: rgba(46, 204, 113, 0.1);
    color: #27ae60;
}

.probability-lower {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

.probability-same {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
}

.trend {
    display: inline-block;
    margin-left: 5px;
    font-weight: bold;
}

.trend.up { color: #27ae60; }
.trend.down { color: #c0392b; }

.difference-cell {
    background: #f8f9fa;
}

.difference-value {
    font-size: 0.9em;
    color: #7f8c8d;
}

/* Probability Legend */
.probability-legend {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.probability-legend h5 {
    margin-top: 0;
    color: #2c3e50;
}

.probability-legend ul {
    margin: 0;
    padding-left: 20px;
}

.legend-high { color: #27ae60; font-weight: 600; }
.legend-low { color: #c0392b; font-weight: 600; }
.legend-same { color: #2980b9; font-weight: 600; }

/* Predictable Codes Grid */
.predictable-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.predictable-code-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #2ecc71;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.code-title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1em;
}

.predictability-score {
    background: #e74c3c;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.code-transitions {
    margin: 15px 0;
}

.code-transitions h5 {
    margin-top: 0;
    color: #7f8c8d;
    font-size: 0.95em;
    margin-bottom: 10px;
}

.transition-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.transition-from {
    font-weight: 700;
    color: #2c3e50;
    min-width: 40px;
}

.transition-to {
    font-weight: 700;
    color: #3498db;
    min-width: 20px;
}

.transition-percent {
    flex: 1;
    text-align: right;
    font-weight: 600;
    color: #27ae60;
}

.code-summary {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.markov-index {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85em;
}

.markov-index.high { background: #d5f4e6; color: #27ae60; }
.markov-index.medium { background: #fff3cd; color: #856404; }
.markov-index.low { background: #f8d7da; color: #721c24; }

/* Strategy Cards */
.strategy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.strategy-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-top: 4px solid #3498db;
}

.strategy-card h4 {
    margin-top: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strategy-card ul {
    margin: 15px 0 0 0;
    padding-left: 20px;
}

.strategy-card li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #7f8c8d;
}

/* Markov Summary */
.markov-summary {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    padding: 30px;
    border-radius: 8px;
    color: white;
    margin-top: 30px;
}

.markov-summary h3 {
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.summary-content p {
    line-height: 1.6;
    margin-bottom: 20px;
}

.conclusion-points {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.point {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.point-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.point-text {
    line-height: 1.5;
}

.final-note {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-style: italic;
    opacity: 0.9;
}

/* Simple Markov View */
.rng-markov-simple .simple-matrix {
    margin: 30px 0;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.matrix-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.matrix-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
}

.matrix-body {
    padding: 15px;
}

.matrix-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    background: #f8f9fa;
}

.matrix-row.most-likely {
    background: #d5f4e6;
    border-left: 4px solid #27ae60;
}

.matrix-row .outcome {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1em;
}

.matrix-row .probability {
    font-weight: 600;
    color: #2980b9;
}

.best-badge {
    color: #f39c12;
    font-size: 1.2em;
}

.matrix-footer {
    background: #2c3e50;
    color: white;
    padding: 10px 15px;
    text-align: center;
    font-size: 0.9em;
}

/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.insight-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-top: 4px solid #3498db;
    text-align: center;
}

.insight-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.insight-card h4 {
    margin-top: 0;
    color: #2c3e50;
    margin-bottom: 15px;
}

.insight-card p {
    margin: 10px 0;
    line-height: 1.5;
    color: #7f8c8d;
}

.insight-card .higher {
    color: #27ae60;
    font-weight: 600;
}

.insight-card .lower {
    color: #c0392b;
    font-weight: 600;
}

.predictability-bar {
    margin-top: 15px;
    position: relative;
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
}

.predictability-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 15px;
}

.bar-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}

.best-prediction {
    font-size: 1.3em;
    font-weight: 700;
    color: #27ae60;
    margin: 10px 0;
}

.strategy-tip {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #f39c12;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .markov-table {
        font-size: 0.9em;
    }
    
    .streaks-analysis,
    .predictable-codes-grid,
    .strategy-cards,
    .matrix-grid,
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .probability-table {
        display: block;
        overflow-x: auto;
    }
    
    .transition-cell {
        padding: 10px;
    }
}