/* Plugin Detail Page Styles */

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs i.fa-chevron-right {
    font-size: 0.75rem;
}

/* Plugin Hero Section */
.plugin-hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-top: 108px;
}

.hero-content {
    display: flex;
    flex-direction: column;
}

.hero-main {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.plugin-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.plugin-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(20px);
    opacity: 0.7;
}

.plugin-icon i {
    font-size: 2.5rem;
    color: white;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.plugin-info {
    flex: 1;
    min-width: 0;
}

.plugin-info h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.plugin-author {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.plugin-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.stat-item i {
    color: var(--primary);
    font-size: 0.85rem;
}

.stat-item .fa-star {
    color: #fbbf24;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Library Button & Dropdown */
.library-btn-wrapper {
    position: relative;
}

.library-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.library-btn i.fa-chevron-down {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.library-btn-wrapper.active .library-btn i.fa-chevron-down {
    transform: rotate(180deg);
}

.library-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.library-btn-wrapper.active .library-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.library-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.library-option:hover {
    background: var(--bg-primary);
    color: var(--primary);
}

.library-option i {
    width: 1.25rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.library-option:hover i {
    color: var(--primary);
}

.library-option.library-remove {
    color: #ef4444;
}

.library-option.library-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.library-option.library-remove i {
    color: #ef4444;
}

.library-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* Screenshots Carousel */
.screenshots-section {
    padding: 3rem 0;
    background: var(--bg-primary);
}

.screenshots-section h2 {
    margin-bottom: 1.5rem;
}

.screenshots-carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

.screenshots-carousel {
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.screenshot-item {
    flex: 0 0 calc(33.333% - 0.667rem);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.screenshot-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.screenshot-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    background: var(--bg-secondary);
}

.screenshot-caption {
    padding: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    text-align: center;
    border-top: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background 0.3s, transform 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.3s;
}

.carousel-dot:hover {
    background: var(--text-secondary);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* Tabs Section */
.plugin-tabs-section {
    padding: 3rem 0;
    background: var(--bg-primary);
}

.tabs-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    touch-action: pan-x;
}

.tabs-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    transform: scaleX(1);
}

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

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

/* Tab Grid Layout */
.tab-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.tab-main h2 {
    margin-bottom: 1.5rem;
}

.tab-main h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.description {
    line-height: 1.8;
    color: var(--text-primary);
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Sidebar Cards */
.sidebar-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-card h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-item .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-item .value {
    color: var(--text-primary);
}

/* Installation Guide */
.installation-guide {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    line-height: 1.8;
}

.installation-guide ol {
    margin-left: 1.5rem;
}

.installation-guide li {
    margin-bottom: 0.75rem;
}

/* Reviews Section */
.reviews-section {
    max-width: 1000px;
}

.reviews-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.rating-overview {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.rating-score {
    text-align: center;
}

.rating-score .score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.rating-score .stars {
    color: #fbbf24;
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

.rating-score p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.star-label {
    min-width: 50px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.star-label i {
    color: #fbbf24;
}

.bar {
    flex: 1;
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #fbbf24;
    transition: width 0.3s ease;
}

.rating-bar .count {
    min-width: 40px;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.reviewer-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reviewer-info h4 {
    margin-bottom: 0.25rem;
}

.review-stars {
    color: #fbbf24;
    font-size: 0.875rem;
}

.review-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.review-card h5 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.review-card p {
    line-height: 1.6;
    color: var(--text-secondary);
}

.review-helpful {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.review-helpful i {
    color: var(--primary);
}

/* Changelog */
.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.changelog-entry {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.changelog-header h3 {
    margin: 0;
    color: var(--primary);
}

.release-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.changelog-content {
    line-height: 1.8;
    color: var(--text-primary);
}

/* FAQ Section */
.faq-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.support-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10000;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 0.7;
}

#lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.25rem;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tab-grid {
        grid-template-columns: 1fr;
    }

    .tab-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .plugin-hero {
        padding: 1rem 0;
    }

    .breadcrumbs {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }

    .hero-main {
        gap: 1rem;
    }

    .plugin-icon {
        width: 80px;
        height: 80px;
    }

    .plugin-icon i {
        font-size: 2rem;
    }

    .plugin-info h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .plugin-author {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .plugin-stats {
        gap: 0.75rem;
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .stat-item {
        gap: 0.3rem;
    }

    .hero-actions {
        gap: 0.5rem;
    }

    .hero-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .hero-actions .btn-icon {
        padding: 0.5rem 0.75rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .carousel-prev {
        left: 0.5rem;
    }

    .carousel-next {
        right: 0.5rem;
    }

    .screenshots-carousel-wrapper {
        padding: 0 50px;
    }

    .screenshot-item {
        flex: 0 0 calc(50% - 0.5rem);
    }

    .screenshot-item img {
        height: 220px;
    }

    .rating-overview {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tab-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        flex-shrink: 0;
    }

    .tabs-nav {
        position: relative;
        padding: 0 0.5rem;
    }

    /* Add scroll indicator shadows on mobile */
    .tabs-nav::before,
    .tabs-nav::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 2px;
        width: 20px;
        pointer-events: none;
        z-index: 1;
    }

    .tabs-nav::before {
        left: 0;
        background: linear-gradient(to right, var(--bg-primary), transparent);
    }

    .tabs-nav::after {
        right: 0;
        background: linear-gradient(to left, var(--bg-primary), transparent);
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

/* Medium mobile devices */
@media (max-width: 600px) {
    .plugin-hero {
        padding: 1rem 0;
    }

    .hero-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
    }

    .plugin-icon {
        width: 90px;
        height: 90px;
        margin-bottom: 0.5rem;
    }

    .plugin-icon i {
        font-size: 2.25rem;
    }

    .plugin-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .plugin-info h1 {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }

    .plugin-author {
        font-size: 0.875rem;
        margin-bottom: 1rem;
        order: 1;
    }

    .plugin-stats {
        gap: 1rem;
        margin-bottom: 1rem;
        justify-content: center;
        order: 2;
        font-size: 0.875rem;
    }

    .hero-actions {
        gap: 0.75rem;
        justify-content: center;
        order: 3;
    }

    .breadcrumbs {
        font-size: 0.7rem;
        margin-bottom: 1rem;
        justify-content: center;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .plugin-hero {
        padding: 1rem 0;
    }

    .hero-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        padding: 0.5rem;
    }

    .plugin-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 0.25rem;
    }

    .plugin-icon i {
        font-size: 2rem;
    }

    .plugin-info h1 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }

    .plugin-author {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .plugin-stats {
        gap: 0.75rem;
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-item {
        gap: 0.25rem;
    }

    .stat-item i {
        font-size: 0.75rem;
    }

    .hero-actions {
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    .hero-actions .btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.875rem;
        flex: 0 1 auto;
    }

    .hero-actions .btn-icon {
        padding: 0.6rem 0.875rem;
    }

    .breadcrumbs {
        font-size: 0.65rem;
        margin-bottom: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem;
    }

    .breadcrumbs i.fa-chevron-right {
        font-size: 0.65rem;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }

    .carousel-prev {
        left: 0.25rem;
    }

    .carousel-next {
        right: 0.25rem;
    }

    .screenshots-carousel-wrapper {
        padding: 0 45px;
    }

    .screenshot-item {
        flex: 0 0 100%;
    }

    .screenshot-item img {
        height: 200px;
    }

    .screenshot-caption {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .plugin-info h1 {
        font-size: 1.1rem;
    }

    .plugin-author {
        font-size: 0.75rem;
    }

    .plugin-stats {
        font-size: 0.7rem;
        gap: 0.5rem;
    }

    .plugin-icon {
        width: 70px;
        height: 70px;
    }

    .plugin-icon i {
        font-size: 1.75rem;
    }

    .hero-actions .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}
