/* Extension Info Plugin Styles */

.extension-info-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Description Section */
.extension-info-description {
    background: #f8f9fa;
    border-left: 4px solid #1351af;
    padding: 15px 20px;
    margin: 15px 0 25px;
    border-radius: 0 8px 8px 0;
}

.extension-info-description p {
    margin: 0 0 8px;
    color: #555;
    line-height: 1.6;
}

.extension-info-description p:last-child {
    margin-bottom: 0;
}

/* Tab Navigation */
.extension-info-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #ddd;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #1351af;
    background: rgba(19, 81, 175, 0.05);
}

.tab-button.active {
    color: #1351af;
    border-bottom-color: #1351af;
}

.tab-button .tab-short {
    display: none;
}

/* Responsive tab labels */
@media (max-width: 768px) {
    .tab-button .tab-full {
        display: none;
    }
    .tab-button .tab-short {
        display: inline;
    }
    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Tab Content */
.extension-info-content {
    position: relative;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Overview Tab */
.overview-links {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-block;
}

.btn-primary {
    background: #1351af;
    color: white;
}

.btn-primary:hover {
    background: #0f4190;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 81, 175, 0.3);
}

.btn-secondary {
    background: #118501;
    color: white;
}

.btn-secondary:hover {
    background: #0d6801;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 133, 1, 0.3);
}

.btn-info {
    background: #ff8203;
    color: white;
}

.btn-info:hover {
    background: #e07302;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 130, 3, 0.3);
}

.btn-outline {
    background: white;
    color: #1351af;
    border: 2px solid #1351af;
}

.btn-outline:hover {
    background: #1351af;
    color: white;
}

.divider {
    margin: 40px 0;
    border: none;
    border-top: 2px solid #ddd;
}

.quick-nav-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Table of Contents - Book Style */
.toc-heading {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 40px;
    color: #333;
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 700px;
}

.toc-chapter {
    margin-bottom: 20px;
}

.toc-chapter-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    padding: 8px 0;
    border-bottom: 1px dotted #999;
    display: flex;
    justify-content: space-between;
}

.toc-numbered .toc-chapter-title {
    margin-left: 0;
}

.toc-subsections {
    margin-left: 40px;
    margin-top: 5px;
}

.toc-subsection {
    font-size: 14px;
    color: #555;
    padding: 4px 0;
    border-bottom: 1px dotted #ccc;
}

/* Technical Info */
.tech-intro {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.tech-section {
    margin-bottom: 30px;
}

.tech-section h3 {
    color: #1351af;
    margin-bottom: 15px;
    font-size: 20px;
}

.tech-list {
    list-style: none;
    padding: 0;
}

.tech-list li {
    padding: 10px 0 10px 30px;
    position: relative;
    line-height: 1.6;
    color: #555;
}

.tech-list li:before {
    content: "▸";
    position: absolute;
    left: 10px;
    color: #1351af;
    font-weight: bold;
}

/* Statistics */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #1351af 0%, #1351fa 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(19, 81, 175, 0.2);
}

.stat-value {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Statistics Chart */
.stats-chart {
    margin-top: 30px;
}

.chart-row {
    display: grid;
    grid-template-columns: 200px 1fr 80px;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.chart-label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-bar-container {
    background: #e9ecef;
    border-radius: 4px;
    height: 30px;
    position: relative;
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: 500;
    font-size: 12px;
    transition: width 0.5s ease;
    min-width: 40px;
}

.chart-bar.questions {
    background: linear-gradient(90deg, #1351af 0%, #1351fa 100%);
}

.chart-bar.answers {
    background: linear-gradient(90deg, #118501 0%, #16a802 100%);
}

.bar-value {
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.chart-percentage {
    text-align: right;
    font-weight: 600;
    color: #1351af;
}

/* Unified Bar Chart */
.stats-chart-unified {
    position: relative;
    margin: 30px 0 20px;
    padding-left: 0;
}

.chart-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    min-height: 200px;
    border-left: 2px solid #333;
    border-bottom: 2px solid #333;
    padding: 10px 10px 0 10px;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 80px;
    cursor: pointer;
}

.chart-bars-side {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    width: 100%;
}

.chart-bar-vertical {
    width: 20px;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 15px;
    transition: all 0.3s ease;
}

/* Blue bar for questions */
.chart-bar-vertical.bar-questions {
    background: linear-gradient(180deg, #1351af 0%, #1351fa 100%);
}

.chart-bar-group:hover .bar-questions {
    background: linear-gradient(180deg, #0f4190 0%, #1040c0 100%);
}

/* Stacked bar for answers (green correct on top, red wrong on bottom) */
.chart-bar-stacked {
    width: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bar-correct {
    background: linear-gradient(180deg, #118501 0%, #16a802 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px 4px 0 0;
    min-height: 10px;
}

.bar-wrong {
    background: linear-gradient(180deg, #af1703 0%, #d41f05 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 10px;
}

.chart-bar-group:hover .bar-correct {
    background: linear-gradient(180deg, #0d6801 0%, #128a02 100%);
}

.chart-bar-group:hover .bar-wrong {
    background: linear-gradient(180deg, #8a1202 0%, #b01a04 100%);
}

.bar-count {
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding-top: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.chart-bar-label {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    text-align: center;
    font-weight: 500;
}

.chart-y-axis {
    position: absolute;
    left: 0;
    top: 0;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
    padding-right: 10px;
    text-align: right;
    width: 45px;
}

/* Legend */
.stats-legend {
    display: flex;
    gap: 30px;
    margin: 20px 0 30px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.legend-color {
    width: 30px;
    height: 15px;
    border-radius: 3px;
}

.legend-color.bar-questions {
    background: linear-gradient(90deg, #1351af 0%, #1351fa 100%);
}

.legend-color.bar-correct {
    background: linear-gradient(90deg, #118501 0%, #16a802 100%);
}

.legend-color.bar-wrong {
    background: linear-gradient(90deg, #af1703 0%, #d41f05 100%);
}

/* Statistics Table */
.stats-table {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.stats-table-header {
    display: grid;
    grid-template-columns: 1fr 120px 120px;
    background: #e9ecef;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.stats-table-header > div {
    padding: 12px 15px;
}

.stats-table-row {
    display: grid;
    grid-template-columns: 1fr 120px 120px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.stats-table-row:last-child {
    border-bottom: none;
}

.stats-table-row:hover {
    background: #f8f9fa;
}

.stats-table-row > div {
    padding: 12px 15px;
    font-size: 14px;
}

.stats-col-chapter {
    color: #333;
}

.stats-col-questions,
.stats-col-answers {
    text-align: center;
    color: #555;
}

@media (max-width: 768px) {
    .stats-table-header,
    .stats-table-row {
        grid-template-columns: 1fr 100px 100px;
    }

    .stats-table-header > div,
    .stats-table-row > div {
        padding: 10px 8px;
        font-size: 12px;
    }

    .chart-container {
        height: 150px;
    }

    .chart-bar-label {
        font-size: 9px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .extension-info-container {
        padding: 15px;
    }

    .overview-links {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .quick-nav-buttons {
        flex-direction: column;
    }

    .chart-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .chart-label {
        margin-bottom: 5px;
    }

    .chart-percentage {
        text-align: left;
    }

    .stat-value {
        font-size: 36px;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
