/* Main Container */
.vgscps-container {
    max-width: 1600px;
    margin: 30px auto;
    padding: 25px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Header */
.vgscps-header {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: white;
    text-align: center;
    border: 5px solid rgba(255,255,255,0.1);
}

.vgscps-header h2 {
    margin: 0 0 15px 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.vgscps-subtitle {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}

/* Summary Stats */
.vgscps-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.vgscps-stat-box {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.vgscps-stat-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #636e72;
}

.vgscps-stat-icon {
    font-size: 40px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(135deg, #0984e3 0%, #00cec9 100%);
    color: white;
}

.vgscps-stat-content {
    flex: 1;
}

.vgscps-stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #2d3436;
    line-height: 1.2;
    margin-bottom: 5px;
}

.vgscps-stat-label {
    font-size: 16px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pattern Groups */
.vgscps-patterns-results {
    margin-bottom: 40px;
}

.vgscps-pattern-group {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-left: 8px solid #0984e3;
    transition: transform 0.3s ease;
}

.vgscps-pattern-group:hover {
    transform: translateY(-5px);
}

.vgscps-pattern-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.vgscps-pattern-header h3 {
    margin: 0 0 10px 0;
    color: #2d3436;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

.vgscps-pattern-icon {
    font-size: 28px;
}

.vgscps-pattern-count {
    font-size: 16px;
    color: #6c757d;
    font-weight: 600;
    background: #e9ecef;
    padding: 5px 15px;
    border-radius: 20px;
    margin-left: 10px;
}

.vgscps-pattern-desc {
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    padding-left: 45px;
}

/* Table */
.vgscps-table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.vgscps-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.vgscps-table th {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    padding: 18px 15px;
    text-align: center;
    font-weight: 700;
    color: white;
    border-bottom: 3px solid rgba(255,255,255,0.2);
    font-size: 15px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.vgscps-table td {
    padding: 16px 15px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    text-align: center;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.vgscps-table tbody tr {
    transition: all 0.2s ease;
}

.vgscps-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.002);
}

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

/* Pattern Display */
.vgscps-pattern-display-cell {
    min-width: 250px;
}

.vgscps-pattern-display {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vgscps-pattern-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 2px solid rgba(0,0,0,0.2);
}

.vgscps-pattern-score:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    z-index: 2;
}

/* Score Colors */
.vgscps-score-high,
.vgscps-score-medium,
.vgscps-score-low,
.vgscps-score-na {
    color: white;
    font-weight: 800;
}

.vgscps-score-high {
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
    border-color: #c23616;
}

.vgscps-score-medium {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    color: #333;
    border-color: #e17055;
}

.vgscps-score-low {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    border-color: #00b894;
}

/* Codes Display */
.vgscps-codes-cell {
    min-width: 250px;
    max-width: 250px;
}

.vgscps-codes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
    justify-content: center;
}

.vgscps-code-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.vgscps-code-badge:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
}

.vgscps-codes-count {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    font-style: italic;
}

.vgscps-codes-count-num {
    font-size: 20px;
    font-weight: 800;
    color: #2d3436;
}

/* Stat Cells */
.vgscps-stat-cell {
    font-weight: 700;
    padding: 12px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 80px;
}

/* Avg Colors */
.vgscps-avg-high {
    background-color: #ffeaa7 !important;
    color: #856404 !important;
    border: 2px solid #fdcb6e !important;
}

.vgscps-avg-medium {
    background-color: #d1ecf1 !important;
    color: #0c5460 !important;
    border: 2px solid #bee5eb !important;
}

.vgscps-avg-low {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 2px solid #c3e6cb !important;
}

/* Percent Cells */
.vgscps-percent-cell {
    font-weight: 700;
    padding: 12px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 80px;
}

.vgscps-percent-high {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 2px solid #c3e6cb !important;
}

.vgscps-percent-medium {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border: 2px solid #ffeaa7 !important;
}

.vgscps-percent-low {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 2px solid #f5c6cb !important;
}

/* Interesting Patterns */
.vgscps-interesting-patterns {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-left: 8px solid #00cec9;
}

.vgscps-interesting-patterns h3 {
    margin: 0 0 25px 0;
    color: #2d3436;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.vgscps-interesting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.vgscps-interesting-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.vgscps-interesting-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #0984e3;
}

.vgscps-interesting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.vgscps-interesting-badge {
    background: linear-gradient(135deg, #0984e3 0%, #00cec9 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 700;
}

.vgscps-interesting-count {
    background: #e17055;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 700;
}

.vgscps-interesting-pattern {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.vgscps-interesting-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
}

.vgscps-interesting-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.vgscps-interesting-code {
    background: #6c757d;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.vgscps-interesting-more {
    background: #fdcb6e;
    color: #333;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* Legend */
.vgscps-legend {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-left: 8px solid #fdcb6e;
}

.vgscps-legend h4 {
    margin: 0 0 25px 0;
    color: #2d3436;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.vgscps-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.vgscps-legend-group h5 {
    margin: 0 0 15px 0;
    color: #2d3436;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.vgscps-legend-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vgscps-legend-item {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
}

.vgscps-legend-item::before {
    content: '';
    width: 15px;
    height: 15px;
    border-radius: 3px;
    display: inline-block;
}

.vgscps-score-high::before {
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
}

.vgscps-score-medium::before {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
}

.vgscps-score-low::before {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

.vgscps-avg-high::before {
    background-color: #ffeaa7;
    border: 2px solid #fdcb6e;
}

.vgscps-avg-medium::before {
    background-color: #d1ecf1;
    border: 2px solid #bee5eb;
}

.vgscps-avg-low::before {
    background-color: #d4edda;
    border: 2px solid #c3e6cb;
}

.vgscps-percent-high::before {
    background-color: #d4edda;
    border: 2px solid #c3e6cb;
}

.vgscps-percent-medium::before {
    background-color: #fff3cd;
    border: 2px solid #ffeaa7;
}

.vgscps-percent-low::before {
    background-color: #f8d7da;
    border: 2px solid #f5c6cb;
}

/* Messages */
.vgscps-error,
.vgscps-no-data,
.vgscps-loading {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.vgscps-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 8px solid #d63031;
}

.vgscps-no-data {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 8px solid #fdcb6e;
}

.vgscps-loading {
    border-left: 8px solid #0984e3;
}

.vgscps-error p,
.vgscps-no-data h3,
.vgscps-no-data p,
.vgscps-loading p {
    margin: 0 0 20px 0;
    font-weight: 500;
    color: #721c24;
    font-size: 18px;
}

.vgscps-no-data h3 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 24px;
}

.vgscps-no-data p {
    color: #856404;
}

/* Loading Spinner */
.vgscps-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e9ecef;
    border-top: 6px solid #0984e3;
    border-radius: 50%;
    animation: vgscps-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Responsive Design */
@media (max-width: 1400px) {
    .vgscps-container {
        padding: 20px;
    }
    
    .vgscps-summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vgscps-table th,
    .vgscps-table td {
        padding: 14px 12px;
        font-size: 13px;
    }
    
    .vgscps-pattern-score {
        min-width: 45px;
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 1200px) {
    .vgscps-interesting-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vgscps-legend-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .vgscps-header h2 {
        font-size: 28px;
    }
    
    .vgscps-subtitle {
        font-size: 16px;
    }
    
    .vgscps-stat-box {
        padding: 20px;
    }
    
    .vgscps-stat-icon {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }
    
    .vgscps-stat-number {
        font-size: 30px;
    }
    
    .vgscps-pattern-group {
        padding: 20px;
    }
    
    .vgscps-pattern-header h3 {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .vgscps-container {
        padding: 15px;
        border-radius: 15px;
    }
    
    .vgscps-header {
        padding: 20px;
    }
    
    .vgscps-summary-stats {
        grid-template-columns: 1fr;
    }
    
    .vgscps-pattern-score {
        min-width: 40px;
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .vgscps-interesting-grid {
        grid-template-columns: 1fr;
    }
    
    .vgscps-legend-grid {
        grid-template-columns: 1fr;
    }
    
    .vgscps-code-badge {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .vgscps-codes-count-num {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .vgscps-header h2 {
        font-size: 24px;
    }
    
    .vgscps-subtitle {
        font-size: 14px;
    }
    
    .vgscps-stat-box {
        padding: 15px;
    }
    
    .vgscps-stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .vgscps-stat-number {
        font-size: 24px;
    }
    
    .vgscps-stat-label {
        font-size: 14px;
    }
    
    .vgscps-pattern-header h3 {
        font-size: 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .vgscps-pattern-count {
        margin-left: 0;
    }
    
    .vgscps-pattern-desc {
        padding-left: 0;
        font-size: 14px;
    }
    
    .vgscps-pattern-score {
        min-width: 35px;
        padding: 4px 6px;
        font-size: 11px;
    }
    
    .vgscps-interesting-score {
        min-width: 40px;
        padding: 4px 8px;
        font-size: 12px;
    }
}