/* ============================================
   Index Page - Template Showcase
   ============================================ */

.index-page {
    background: var(--dark-bg);
}

/* Background */
.index-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.index-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: gradient-drift 20s ease-in-out infinite;
}

@keyframes gradient-drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-5%, -5%); }
}

.index-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Header */
.index-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-container .logo {
    margin-bottom: 0;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-nav a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: var(--text-white);
}

.header-nav .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Hero Section */
.hero {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--primary-purple);
    margin-bottom: 2rem;
}

.badge-icon {
    display: flex;
    color: var(--primary-purple);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-actions .btn {
    padding: 1rem 2rem;
}

.hero-actions .btn svg {
    transition: transform 0.3s ease;
}

.hero-actions .btn:hover svg {
    transform: translateX(4px);
}

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

.hero-stats .stat {
    text-align: center;
}

.hero-stats .stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    font-family: var(--font-mono);
}

.hero-stats .stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Section Styles */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* Templates Section */
.templates-section {
    position: relative;
    z-index: 10;
    padding: 6rem 2rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.template-card {
    display: block;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.4s ease;
}

.template-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.template-preview {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--dark-bg);
}

.template-preview iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 400%;
    height: 400%;
    transform: scale(0.25);
    transform-origin: top left;
    border: none;
    pointer-events: none;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.template-card:hover .preview-overlay {
    opacity: 1;
}

.preview-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-galaxy);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.template-card:hover .preview-btn {
    transform: translateY(0);
}

/* Template Info */
.template-info {
    padding: 1.5rem;
}

.template-number {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.template-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.template-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Features Section */
.features-section {
    position: relative;
    z-index: 10;
    padding: 6rem 2rem;
    background: rgba(0, 0, 0, 0.3);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.2);
}

.feature-icon-large {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-lg);
    color: var(--primary-purple);
    margin-bottom: 1.5rem;
}

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer */
.index-footer {
    position: relative;
    z-index: 10;
    padding: 4rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .index-header {
        padding: 1rem;
    }

    .header-nav {
        gap: 1rem;
    }

    .header-nav a:not(.btn) {
        display: none;
    }

    .hero {
        padding: 7rem 1.5rem 3rem;
    }

    .hero-subtitle br {
        display: none;
    }

    .hero-stats {
        gap: 2rem;
    }

    .templates-section,
    .features-section {
        padding: 4rem 1.5rem;
    }

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

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

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-stats .stat-value {
        font-size: 2rem;
    }
}
