/**
 * Single Tool Page Styles
 */

/* Tool Hero Section */
.tool-hero {
    background: linear-gradient(135deg, #6b4ac5 0%, #8b6ae0 100%);
    color: white;
    padding: 60px 0;
}

.tool-hero-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: space-between;
}

.tool-hero-left {
    flex: 1;
    display: flex;
    gap: 30px;
}

.tool-logo {
    flex-shrink: 0;
    position: relative;
}

.tool-logo-clickable {
    cursor: pointer;
}

.tool-logo img {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    background: white;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.tool-logo-clickable:hover img {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.tool-logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    background: rgba(107, 74, 197, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.tool-logo-clickable:hover .tool-logo-overlay {
    opacity: 1;
}

.tool-logo-overlay svg {
    color: white;
}

.tool-header-info {
    flex: 1;
}

.tool-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.tool-tagline {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.95;
    line-height: 1.5;
}

.tool-meta-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Tool Badges Row - Categories and Pricing on same line */
.tool-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tool-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.category-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.tool-pricing-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: capitalize;
}

.tool-pricing-badge.free {
    background: rgba(52, 211, 153, 0.3);
    color: #10b981;
    border: 1px solid rgba(52, 211, 153, 0.5);
}

.tool-pricing-badge.freemium {
    background: rgba(96, 165, 250, 0.3);
    color: #3b82f6;
    border: 1px solid rgba(96, 165, 250, 0.5);
}

.tool-pricing-badge.paid {
    background: rgba(251, 191, 36, 0.3);
    color: #f59e0b;
    border: 1px solid rgba(251, 191, 36, 0.5);
}

.tool-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 5px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.stat-item svg {
    flex-shrink: 0;
}

.tool-hero-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    min-width: 200px;
}

.btn-visit-tool {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-like-tool {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-like-tool.liked svg {
    fill: currentColor;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Tool Content Section */
.tool-content-section {
    padding: 60px 0;
}

.tool-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.tool-main-content {
    min-width: 0;
}

.content-block {
    margin-bottom: 50px;
}

.content-block:last-child {
    margin-bottom: 0;
}

.content-block h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-text);
}

.tool-description,
.tool-features,
.tool-use-cases {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-text-light);
}

.tool-description p,
.tool-features p,
.tool-use-cases p {
    margin-bottom: 16px;
}

.tool-features ul,
.tool-use-cases ul {
    list-style: none;
    padding: 0;
}

.tool-features li,
.tool-use-cases li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 12px;
}

.tool-features li:before,
.tool-use-cases li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Video */
.tool-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: var(--color-background);
}

.tool-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Screenshots Gallery */
.tool-screenshots-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.screenshot-item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    padding-bottom: 60%;
    background: var(--color-background);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.screenshot-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.screenshot-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

.screenshot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(107, 74, 197, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screenshot-item:hover .screenshot-overlay {
    opacity: 1;
}

.screenshot-overlay svg {
    color: white;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

#lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    z-index: 10001;
}

/* Sidebar */
.tool-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.sidebar-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-text);
}

/* Tool Info List */
.tool-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tool-info-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tool-info-list li:first-child {
    padding-top: 0;
}

.info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1rem;
    color: var(--color-text);
}

.info-value a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.info-value a:hover {
    text-decoration: underline;
}

.info-value .pricing-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 600;
}

.info-value .pricing-badge.free {
    background: #d1fae5;
    color: #065f46;
}

.info-value .pricing-badge.freemium {
    background: #dbeafe;
    color: #1e40af;
}

.info-value .pricing-badge.paid {
    background: #fef3c7;
    color: #92400e;
}

/* Social Links */
.tool-social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.social-link.twitter {
    color: #1da1f2;
    background: #f0f9ff;
}

.social-link.twitter:hover {
    background: #dbeafe;
    border-color: #1da1f2;
}

.social-link.facebook {
    color: #1877f2;
    background: #f0f4ff;
}

.social-link.facebook:hover {
    background: #dbe4ff;
    border-color: #1877f2;
}

.social-link.linkedin {
    color: #0a66c2;
    background: #f0f7ff;
}

.social-link.linkedin:hover {
    background: #dae9ff;
    border-color: #0a66c2;
}

/* Related Tools List */
.related-tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.related-tool-item:hover {
    background: var(--color-background);
}

.related-tool-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-background);
}

.related-tool-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-tool-title {
    font-weight: 500;
    font-size: 0.9375rem;
}

/* Similar Tools Section */
.similar-tools-section {
    background: var(--color-background);
    padding: 80px 0;
}

.similar-tools-section .section-title {
    text-align: center;
    margin-bottom: 50px;
}

.similar-tools-section .section-title h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text);
}

.similar-tools-section .section-title p {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tool-content-wrapper {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }
    
    .tool-hero-content {
        gap: 30px;
    }
    
    .tool-name {
        font-size: 2rem;
    }
    
    .tool-tagline {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .tool-hero {
        padding: 40px 0;
    }
    
    .tool-hero-content {
        flex-direction: column;
    }
    
    .tool-hero-left {
        flex-direction: column;
        gap: 20px;
    }
    
    .tool-logo img {
        width: 100px;
        height: 100px;
    }
    
    .tool-name {
        font-size: 1.75rem;
    }
    
    .tool-tagline {
        font-size: 1rem;
    }
    
    .tool-hero-right {
        width: 100%;
    }
    
    .tool-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .tool-sidebar {
        position: static;
    }
    
    .tool-screenshots-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .content-block h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .tool-hero {
        padding: 30px 0;
    }
    
    .tool-name {
        font-size: 1.5rem;
    }
    
    .tool-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .tool-screenshots-gallery {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .sidebar-card {
        padding: 20px;
    }
    
    /* Lightbox responsive */
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    #lightbox-image {
        max-width: 95%;
    }
    
    .lightbox-counter {
        bottom: 20px;
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* ============================================
   Submitter Information Card
   ============================================ */
.submitter-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.submitter-card h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.submitter-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.submitter-avatar {
    margin-bottom: 15px;
}

.submitter-avatar img {
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.submitter-details {
    width: 100%;
}

.submitter-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.submitter-name a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.submitter-name a:hover {
    opacity: 0.8;
}

.submitter-bio {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
}

.submitter-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.submitter-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.submitter-stat svg {
    flex-shrink: 0;
}

.submitter-links {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.submitter-links .btn {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    padding: 6px 12px;
}

.submitter-links .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.submitter-links .btn svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   Backlink Badges Section with Tabs
   ============================================ */
.backlink-badges-section {
    margin-top: 40px;
}

.backlink-description {
    color: #6b7280;
    margin-bottom: 24px;
}

/* Tabs Navigation */
.backlink-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
}

.backlink-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.backlink-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.backlink-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.backlink-tab svg {
    flex-shrink: 0;
}

/* Tab Panes */
.backlink-tabs-content {
    position: relative;
}

.backlink-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.backlink-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Preview Section */
.backlink-preview-section {
    margin-bottom: 24px;
}

.backlink-preview-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.backlink-preview {
    padding: 24px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Embed Preview Card */
.embed-card {
    max-width: 400px;
    width: 100%;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: system-ui, -apple-system, sans-serif;
}

/* Compact version - just logo, name and rating */
.embed-card.compact {
    max-width: 300px;
}

.embed-card.compact .embed-card-content {
    padding: 16px;
}

.embed-card.compact .embed-card-header {
    margin-bottom: 0;
}

.embed-card.compact .embed-logo img {
    width: 50px;
    height: 50px;
}

.embed-card.compact .embed-info {
    flex: 1;
}

.embed-card.compact .embed-info h3 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.3;
}

.embed-card.compact .embed-rating {
    color: #f59e0b;
    font-size: 13px;
    font-weight: 500;
}

.embed-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.embed-card-content {
    padding: 20px;
}

.embed-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.embed-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.embed-card-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.embed-description {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px;
}

.embed-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.embed-badge {
    padding: 4px 12px;
    background: #667eea;
    color: white;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 500;
}

.embed-badge.free {
    background: #10b981;
}

.embed-badge.freemium {
    background: #3b82f6;
}

.embed-badge.paid {
    background: #f59e0b;
}

.embed-rating {
    padding: 4px 12px;
    background: #fbbf24;
    color: #1f2937;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 500;
}

.embed-btn {
    display: inline-block;
    width: 100%;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
}

.embed-btn:hover {
    background: #5568d3;
}

.embed-footer {
    margin: 12px 0 0;
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
}

.embed-footer strong {
    color: #667eea;
}

/* HTML & Markdown Preview */
.html-preview,
.markdown-preview {
    padding: 32px;
    font-size: 16px;
}

.html-preview a,
.markdown-preview a {
    color: #667eea;
    text-decoration: underline;
}

/* Code Section */
.backlink-code-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.backlink-code {
    width: 100%;
    padding: 16px;
    background: #1f2937;
    color: #10b981;
    border: 1px solid #374151;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 12px;
}

.backlink-code:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.copy-backlink-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-backlink-btn svg {
    width: 16px;
    height: 16px;
}

.copy-backlink-btn.copied {
    background: #10b981;
    border-color: #10b981;
}

.copy-backlink-btn.copied::after {
    content: ' ✓ Copied!';
}

/* Notice */
.backlink-notice {
    margin-top: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
}

.backlink-notice strong {
    color: #667eea;
}
