/* ================================================
   THIRA - Public Welcome Page Styles
   ================================================ */

/* ================================================
   HERO SECTION
   ================================================ */

.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    padding: 8rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* Hero Buttons - Force no transform on any state */
.btn-hero,
.btn-hero:hover,
.btn-hero:focus,
.btn-hero:active,
.btn-hero-primary,
.btn-hero-primary:hover,
.btn-hero-primary:focus,
.btn-hero-primary:active,
.btn-hero-secondary,
.btn-hero-secondary:hover,
.btn-hero-secondary:focus,
.btn-hero-secondary:active {
    transform: none !important;
}

.btn-hero {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    border: none;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-hero-primary:hover {
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
    color: white;
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    color: white;
}

.hero-features {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 4rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.hero-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

/* ================================================
   FEATURES / MODULES SECTION
   ================================================ */

.features-section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.module-card {
    background: var(--dark-card);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--module-color), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.module-card:hover::before {
    transform: scaleX(1);
}

.module-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--module-color);
}

.module-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--module-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.module-card:hover .module-icon {
    transform: scale(1.1) rotate(5deg);
}

.module-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.module-description {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Module Colors */
.module-card[data-module="games"] { --module-color: #6366f1; }
.module-card[data-module="anime"] { --module-color: #10b981; }
.module-card[data-module="manga"] { --module-color: #ec4899; }
.module-card[data-module="books"] { --module-color: #f59e0b; }
.module-card[data-module="movies"] { --module-color: #8b5cf6; }
.module-card[data-module="series"] { --module-color: #3b82f6; }

/* ================================================
   TOP 100 SECTION
   ================================================ */

.top100-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.05), transparent);
}

.top100-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.top100-tab {
    padding: 0.75rem 2rem;
    background: var(--dark-card);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.top100-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.top100-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.top100-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.top100-item {
    background: var(--dark-card);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.top100-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.top100-image {
    width: 60px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
}

.top100-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.top100-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
}

.top100-image-placeholder i {
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.top100-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

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

.top100-rank {
    font-size: 1.5rem;
    font-weight: 800;
    /* Background color is set inline per module */
    /* Color is set inline (white #ffffff) */
    min-width: 40px;
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 6px;
    text-align: center;
}

.top100-users {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    flex: 1;
    text-align: right;
}

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

.top100-title,
.top100-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ================================================
   NEWS SECTION
   ================================================ */

.news-section {
    padding: 6rem 0;
}

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

.news-card {
    background: var(--dark-card);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.news-card:hover {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--dark-bg), var(--dark-card));
}

.news-content {
    padding: 1.5rem;
}

.news-category {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.news-date,
.news-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ================================================
   ABOUT SECTION
   ================================================ */

.about-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.05), transparent);
}

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

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* ================================================
   STATISTICS SECTION
   ================================================ */

/* User Statistics (Separate Area - Top) */
.user-stats-section {
    margin: 3rem 0 2rem 0;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 20px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    text-align: center;
}

.user-stat-card {
    display: inline-block;
}

.user-stat-number {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.user-stat-label {
    color: var(--text-color);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Module Statistics (Grid - Bottom) */
.module-stats-section {
    margin-top: 3rem;
}

.module-stats-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.stat-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================================================
   ANIMATIONS
   ================================================ */

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

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-features {
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .modules-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .top100-grid {
        grid-template-columns: 1fr;
    }
    
    .top100-item {
        padding: 0.875rem;
    }
    
    .top100-image {
        width: 50px;
        height: 70px;
    }
    
    .top100-rank {
        font-size: 1.25rem;
        min-width: 35px;
    }
    
    .top100-users {
        font-size: 0.75rem;
    }
    
    .top100-title,
    .top100-info h4 {
        font-size: 0.9rem;
    }
    
    .top100-tabs {
        flex-direction: column;
    }
    
    /* User Statistics - Mobile */
    .user-stats-section {
        padding: 2rem 1.5rem;
    }
    
    .user-stat-number {
        font-size: 3rem;
    }
    
    .user-stat-label {
        font-size: 1rem;
    }
    
    /* Module Statistics - Mobile */
    .module-stats-title {
        font-size: 1.2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .top100-image {
        width: 45px;
        height: 60px;
    }
    
    .top100-rank {
        font-size: 1.1rem;
        min-width: 30px;
    }
    
    .top100-users {
        font-size: 0.7rem;
    }
    
    /* CRITICAL: Truncate titles to 2 lines on mobile */
    .top100-item .top100-title,
    .top100-item .top100-info h4 {
        font-size: 0.85rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        line-height: 1.2em !important;
        max-height: 2.4em !important;
        word-break: break-word !important;
    }
    
    .top100-content-wrapper {
        gap: 0.5rem;
    }
    
    .top100-header {
        gap: 0.5rem;
    }
}
