/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #e5e7eb;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo-text {
    background: linear-gradient(135deg, #a855f7 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.nav {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav a {
    color: #d1d5db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav a:hover {
    color: #a855f7;
}

.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #a855f7;
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

.header-actions .filter-btn {
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid #a855f7;
    color: #a855f7;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-actions .filter-btn:hover {
    background: #a855f7;
    color: white;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
}

.hero-tagline {
    font-size: 1.5rem;
    margin: 0.5rem 0 2rem;
    color: #ec4899;
    font-weight: 600;
}

/* Introduction Section */
.intro-section {
    padding: 2rem 0;
    background: rgba(15, 15, 35, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.intro-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.intro-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #f3f4f6;
}

.intro-content p {
    font-size: 1rem;
    color: #d1d5db;
    line-height: 1.6;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #a855f7 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #9ca3af;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #a855f7;
}

.stat-label {
    color: #9ca3af;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Featured Banner */
.featured-banner {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(239, 68, 68, 0.15) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    margin: 2rem auto;
    max-width: 1200px;
    overflow: hidden;
    position: relative;
}

.featured-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b 0%, #ff8e53 25%, #ff6b9d 50%, #c44ed4 75%, #a855f7 100%);
}

.featured-content {
    padding: 2.5rem;
    position: relative;
}

.featured-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    width: 100%;
    text-align: center;
}

.featured-badge i {
    font-size: 1rem;
}

.featured-main {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.featured-app-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.featured-top {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.featured-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.featured-logo-text {
    width: auto;
    height: 50px;
    border-radius: 0;
    box-shadow: none;
    max-width: 280px;
    object-fit: contain;
}

.featured-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.featured-rating .stars {
    display: flex;
    gap: 3px;
}

.featured-rating .stars i {
    color: #fbbf24;
    font-size: 1.1rem;
}

.featured-rating span {
    color: #22c55e;
    font-weight: 600;
    font-size: 0.95rem;
}

.featured-description {
    color: #d1d5db;
    line-height: 1.6;
    font-size: 1rem;
}


.featured-cta {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-featured {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.3);
}

.btn-featured:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(168, 85, 247, 0.4);
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
}

/* Featured Reviews Carousel */
.featured-reviews {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.reviews-header {
    text-align: center;
    margin-bottom: 2rem;
}

.reviews-header h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f3f4f6;
    margin: 0;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.carousel-wrapper {
    overflow: hidden;
    flex: 1;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 1.25rem;
}

.carousel-slide {
    min-width: 360px;
    max-width: 360px;
    flex-shrink: 0;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #f3f4f6;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 2;
}

.carousel-btn:hover {
    background: rgba(168, 85, 247, 0.4);
    border-color: rgba(168, 85, 247, 0.6);
    transform: scale(1.05);
}

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

.carousel-btn i {
    font-size: 1.2rem;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.indicator:hover {
    background: rgba(168, 85, 247, 0.5);
    transform: scale(1.2);
}

.indicator.active {
    background: rgba(168, 85, 247, 0.8);
    transform: scale(1.2);
    border-color: rgba(168, 85, 247, 0.8);
}

/* Review Cards */
.review-testimonial {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.review-testimonial:hover {
    transform: translateY(-2px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.15);
}

.review-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
}

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

.review-text {
    color: #d1d5db;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}


/* Responsive Featured Banner */
@media (max-width: 1200px) {
    .carousel-slide {
        min-width: 320px;
        max-width: 320px;
    }
}

@media (max-width: 768px) {
    .featured-content {
        padding: 2rem 1.5rem;
    }
    
    .featured-badge {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }
    
    .featured-main {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    
    .featured-app-info {
        align-items: center;
        text-align: center;
    }
    
    .featured-top {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .featured-logo {
        width: 64px;
        height: 64px;
    }
    
    .featured-logo-text {
        height: 50px;
        max-width: 100%;
        width: 100%;
    }
    
    .featured-cta {
        justify-content: center;
    }
    
    .carousel-slide {
        min-width: 100%;
        max-width: 100%;
    }
    
    .carousel-clone {
        display: none;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn i {
        font-size: 1rem;
    }
    
    .reviews-header h4 {
        font-size: 1.25rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .featured-badge {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .featured-content {
        padding: 1.5rem 1rem;
    }
    
    .featured-logo-text {
        height: 45px;
        max-width: 100%;
        width: 100%;
    }
    
    .featured-reviews {
        margin-top: 2rem;
        padding-top: 2rem;
    }
    
    .reviews-header h4 {
        font-size: 1.1rem;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
    }
    
    .carousel-btn i {
        font-size: 0.9rem;
    }
    
    .review-testimonial {
        padding: 1.25rem;
        min-height: auto;
    }
    
    .review-text {
        font-size: 0.9rem;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
}

/* Filters */
.filters {
    background: rgba(15, 15, 35, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    display: none;
}

.filters.active {
    display: block;
}

.filters-content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #d1d5db;
    white-space: nowrap;
}

.filter-group select {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e5e7eb;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Comparison Table */
.comparison-table {
    padding: 4rem 0;
}

.comparison-table h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #f3f4f6;
}

.comparison-intro {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: #d1d5db;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.section-intro {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #d1d5db;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Table Container */
.table-wrapper {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Table Base */
table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* Column Widths */
table col:nth-child(1) { width: 80px; }   /* Rank */
table col:nth-child(2) { width: 220px; }  /* App */
table col:nth-child(3) { width: 100px; }  /* Free Trial */
table col:nth-child(4) { width: 80px; }   /* Voice */
table col:nth-child(5) { width: 100px; }  /* AI Images */
table col:nth-child(6) { width: 90px; }   /* AI Video */
table col:nth-child(7) { width: 120px; }  /* Starting Price */
table col:nth-child(8) { width: auto; }   /* Best For */
table col:nth-child(9) { width: 120px; }  /* Action */

/* Table Header */
thead th {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    padding: 1rem 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid rgba(168, 85, 247, 0.3);
    white-space: normal;
    line-height: 1.2;
    word-spacing: 2px;
}

/* Table Body */
tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(168, 85, 247, 0.05);
}

tbody td {
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.9rem;
    line-height: 1.3;
    text-align: center;
}

tbody td:first-child {
    text-align: center;
}

tbody td:nth-child(2) {
    text-align: left;
    vertical-align: middle;
}

tbody td:nth-child(7) {
    text-align: center;
    font-weight: 600;
}

tbody td:nth-child(8) {
    text-align: left;
}

/* Rank Column */
.rank {
    width: 80px;
    text-align: center;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
    flex-shrink: 0;
}

.rank-crown {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.rank-crown i {
    font-size: 1.2rem;
}

/* Hide duplicate rank badge in app-name on desktop */
.app-name .rank-number {
    display: none;
}

/* App Name Column */
.app-name {
    font-weight: 600;
    min-width: 200px;
    vertical-align: middle;
}

.app-name img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    vertical-align: middle;
    margin-right: 0.75rem;
}

.app-name > span {
    vertical-align: middle;
}

.app-name > span:first-of-type {
    font-size: 1rem;
    color: #f3f4f6;
}

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

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #fbbf24;
    font-size: 0.9rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.badge.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.badge.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge.editors-choice {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    font-weight: 600;
    border: 1px solid #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.6rem;
    display: inline-block;
    vertical-align: middle;
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    white-space: normal;
    margin-left: 0.5rem;
    line-height: 1.1;
    text-align: center;
}

.editors-choice-tag {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #1f2937 !important;
    font-weight: 600;
    border: 1px solid #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(168, 85, 247, 0.4);
}

/* Detailed Reviews */
.detailed-reviews {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.detailed-reviews h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #f3f4f6;
}

.review-card {
    background: rgba(31, 41, 55, 0.8);
    border-radius: 16px;
    margin-bottom: 3rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.4);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: rgba(168, 85, 247, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.app-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.3);
}

.app-details h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: #f3f4f6;
}

.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.tag {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.review-actions {
    text-align: right;
}

.pricing {
    margin-bottom: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #22c55e;
}

.price-note {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
}

.review-content {
    padding: 2rem;
}

.review-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.review-main h4 {
    color: #f3f4f6;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.review-main h4:first-child {
    margin-top: 0;
}

.review-main p {
    color: #d1d5db;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    margin-bottom: 2rem;
}

.feature-list li {
    padding: 0.5rem 0;
    color: #d1d5db;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-list i {
    color: #22c55e;
    font-size: 0.9rem;
}

.pros-cons {
    margin-bottom: 2rem;
}

.pros, .cons {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.pros h4 {
    color: #22c55e;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cons h4 {
    color: #ef4444;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pros ul, .cons ul {
    list-style: none;
}

.pros li, .cons li {
    padding: 0.25rem 0;
    color: #d1d5db;
    font-size: 0.9rem;
}

.quick-stats {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
}

.quick-stats h4 {
    color: #f3f4f6;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.stat-label {
    color: #9ca3af;
    font-size: 0.9rem;
}

.stat-value {
    color: #d1d5db;
    font-weight: 500;
}

/* Buyer's Guide */
.buyers-guide {
    padding: 4rem 0;
}

.buyers-guide h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #f3f4f6;
}

.guide-content {
    display: grid;
    gap: 2.5rem;
}

.guide-section {
    background: rgba(31, 41, 55, 0.8);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-section h3 {
    color: #a855f7;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guide-section h3 i {
    font-size: 1.2rem;
}

.guide-section p {
    color: #d1d5db;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.guide-section ul {
    list-style: none;
    padding-left: 0;
}

.guide-section li {
    padding: 0.5rem 0;
    color: #d1d5db;
    position: relative;
    padding-left: 1.5rem;
}

.guide-section li::before {
    content: "•";
    color: #a855f7;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.guide-section strong {
    color: #f3f4f6;
}

/* FAQ */
.faq {
    padding: 4rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #f3f4f6;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: rgba(31, 41, 55, 0.8);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.faq-item h3 {
    color: #a855f7;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.faq-item p {
    color: #d1d5db;
    line-height: 1.7;
}

/* Footer */
.footer {
    background: rgba(15, 15, 35, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    color: #a855f7;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #a855f7;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Force all elements to respect viewport width */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Exception: Preserve circular badges */
    .rank-number,
    .rank-crown {
        max-width: none !important;
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0 !important;
        border-radius: 50% !important;
    }

    body {
        overflow-x: hidden;
        width: 100vw;
        max-width: 100vw;
        position: relative;
    }

    /* Ensure all sections respect viewport width */
    section {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem 0;
    }

    .nav {
        gap: 0.75rem;
        order: 3;
        margin-top: 0.5rem;
        justify-content: center;
        width: 100%;
    }

    .nav a {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .header-actions {
        order: 2;
    }

    .logo {
        gap: 0.5rem;
    }

    .logo-image {
        width: 32px;
        height: 32px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.25rem;
    }

    .hero-stats {
        gap: 2rem;
        flex-direction: column;
    }

    .stat {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .filters-content {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
        min-width: 0;
    }

    .comparison-table {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .table-wrapper {
        background: transparent;
        overflow: visible;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    /* Hide table structure on mobile */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    table {
        overflow: hidden;
        table-layout: auto !important;
        width: 100% !important;
    }

    /* Remove fixed column widths on mobile */
    table col {
        width: auto !important;
    }

    tbody {
        width: 100%;
        max-width: 100%;
    }

    thead,
    colgroup {
        display: none !important;
    }

    tbody tr {
        background: rgba(31, 41, 55, 0.8);
        border-radius: 12px;
        margin-bottom: 1.5rem;
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Ensure all child elements respect container width */
    tbody tr * {
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Exception: Preserve rank badge circle */
    tbody tr .rank-number,
    tbody tr .rank-crown {
        max-width: 36px !important;
        min-width: 36px !important;
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0 !important;
    }

    tbody tr img {
        max-width: 40px !important;
        height: auto !important;
    }

    tbody tr:hover {
        background: rgba(31, 41, 55, 0.9);
        transform: translateY(-2px);
    }

    tbody td {
        text-align: left;
        padding: 0.5rem 0;
        border: none;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-wrap: break-word;
        word-wrap: break-word;
        overflow: hidden;
    }

    /* Constrain inline-styled divs */
    tbody td div[style] {
        max-width: 100% !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    /* Specifically target app-name divs with inline styles */
    .app-name div[style] {
        max-width: calc(100vw - 140px) !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .app-name div[style] span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    tbody td::before {
        content: attr(data-label) ": ";
        font-weight: 500;
        color: #e5e7eb;
        font-size: 0.9rem;
        letter-spacing: 0;
        flex-shrink: 0;
        margin-right: 0.5rem;
    }

    /* Hide the original rank column on mobile */
    tbody td:first-child {
        display: none !important;
    }

    /* App name cell with rank badge */
    tbody td:nth-child(2) {
        order: 1;
        padding: 0 0 1.25rem 0;
        margin-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        justify-content: space-between;
        align-items: center;
    }

    .app-name {
        flex-direction: row;
        text-align: left;
        gap: 0.75rem;
        align-items: center;
        width: 100%;
        justify-content: space-between;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .app-name::before {
        display: none;
    }

    .app-name img {
        margin: 0;
        flex-shrink: 0;
    }
    
    .app-name > div {
        flex: 1 1 0;
        display: flex;
        align-items: center;
        gap: 0.5rem !important;
        min-width: 0 !important;
        max-width: 100%;
        overflow: hidden;
    }

    .app-name span {
        word-break: break-word;
        overflow-wrap: break-word;
        flex: 0 1 auto;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-name img {
        width: 32px !important;
        height: 32px !important;
    }

    /* Show rank badge on mobile inside app-name */
    .app-name .rank-number {
        display: inline-flex !important;
    }

    /* Adjust specific columns - Feature badges */
    tbody td:nth-child(3),
    tbody td:nth-child(4),
    tbody td:nth-child(5),
    tbody td:nth-child(6) {
        order: 2;
        padding: 0.4rem 0;
    }

    tbody td:nth-child(3) .badge,
    tbody td:nth-child(4) .badge,
    tbody td:nth-child(5) .badge,
    tbody td:nth-child(6) .badge {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Pricing */
    tbody td:nth-child(7) {
        order: 3;
        padding: 0.5rem 0;
        font-weight: 600;
    }

    /* Best For description */
    tbody td:nth-child(8) {
        order: 4;
        padding: 0.875rem;
        margin-top: 0.75rem;
        border-top: none;
        display: block;
        text-align: left;
        background: rgba(168, 85, 247, 0.1);
        border-radius: 8px;
        border-left: 3px solid #a855f7;
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.95rem;
        line-height: 1.4;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    tbody td:nth-child(8)::before {
        display: block;
        margin-bottom: 0.5rem;
        color: #a855f7;
        font-weight: 600;
    }

    /* View Details button */
    tbody td:last-child {
        order: 5;
        padding-top: 1rem;
        margin-top: 0.5rem;
        justify-content: center;
    }

    tbody td:last-child::before {
        display: none;
    }

    .btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.75rem 1.5rem;
        box-sizing: border-box !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Ensure button container respects width */
    tbody td:last-child {
        width: 100% !important;
        max-width: 100% !important;
    }

    .comparison-table h2 {
        font-size: 2rem;
    }

    .comparison-intro {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .review-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 1.5rem;
    }

    .review-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .review-content {
        padding: 1.5rem;
    }

    .guide-section {
        padding: 1.5rem;
    }

    .guide-section h3 {
        font-size: 1.2rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .faq-item {
        padding: 1.5rem;
    }

    .category-tags {
        gap: 0.5rem;
    }

    .category-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    /* Extra strict width constraints for small phones */
    body {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .container {
        padding: 0 12px;
        max-width: 100vw !important;
    }

    .comparison-table {
        max-width: 100vw !important;
        overflow: hidden !important;
    }

    .table-wrapper {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* More aggressive constraints for app names on small phones */
    .app-name div[style] {
        max-width: calc(100vw - 120px) !important;
    }

    .nav {
        gap: 0.5rem;
    }

    .nav a {
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    tbody tr {
        padding: 0.75rem;
        margin-bottom: 1rem;
        max-width: calc(100vw - 24px) !important;
    }

    tbody td {
        padding: 0.4rem 0;
        flex-wrap: wrap;
        max-width: 100% !important;
    }

    tbody td:nth-child(8) {
        padding: 0.75rem;
        max-width: 100% !important;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
        max-width: 100% !important;
    }

    .badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }

    .app-name img {
        width: 28px !important;
        height: 28px !important;
    }

    .app-name > div {
        gap: 0.4rem !important;
    }

    .app-info {
        flex-direction: column;
        text-align: center;
    }

    .tags {
        justify-content: center;
    }
}

/* Loading and Animation Effects */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.slide-in {
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Hidden by default for JS filtering */
.hidden {
    display: none !important;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* SEO Categories Section */
.seo-categories {
    padding: 2rem 0;
    background: rgba(15, 15, 35, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.seo-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.seo-content h3 {
    margin-bottom: 1.5rem;
    color: #f3f4f6;
    font-size: 1.5rem;
    font-weight: 600;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.category-tag {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(168, 85, 247, 0.3);
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: rgba(168, 85, 247, 0.3);
    transform: translateY(-2px);
}

.seo-description {
    font-size: 0.95rem;
    color: #d1d5db;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

/* Logo hover effect */
.logo-image {
    transition: transform 0.3s ease;
}

.logo:hover .logo-image {
    transform: scale(1.1);
}

/* Table row hover improvements */
tbody tr:hover .rank-number {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(168, 85, 247, 0.6);
}

/* Button focus states */
.btn:focus {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 5% auto;
    padding: 0;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
    position: relative;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: white;
    padding: 1.5rem 2rem;
    margin: 0;
    border-radius: 15px 15px 0 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-content h3 {
    color: #a855f7;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
    color: #d1d5db;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.modal-body strong {
    color: #ec4899;
}

.modal-close {
    color: white;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover,
.modal-close:focus {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%);
}

/* Modal responsive design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-content h2 {
        font-size: 1.25rem;
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
        max-height: 50vh;
    }
    
    .modal-close {
        top: 0.75rem;
        right: 1rem;
        font-size: 1.5rem;
    }
}
