/* WriteAI - Modern AI Writing Tools Hub */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --bg-dark: #0f0f23;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: #27273a;
    --success: #22c55e;
    --warning: #f59e0b;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Particle Canvas */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-2);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 24px;
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    color: var(--text-primary);
}

.logo-text .highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.usage-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.usage-icon {
    color: var(--warning);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 16px;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
}

.mobile-menu a:hover {
    background: var(--bg-card-hover);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    position: relative;
    z-index: 1;
}

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

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(40px, 8vw, 72px);
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

.hero-visual {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.floating-cards {
    position: relative;
    width: 300px;
    height: 300px;
}

.float-card {
    position: absolute;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.card-2 {
    top: 60px;
    right: 0;
    animation-delay: 1s;
}

.card-3 {
    bottom: 60px;
    left: 20px;
    animation-delay: 2s;
}

.card-4 {
    bottom: 0;
    right: 20px;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Tools Section */
.tools-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 48px;
}

.tool-categories {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

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

.tool-card {
    position: relative;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.tool-card.hidden {
    display: none;
}

.tool-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.tool-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

.tool-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    background: var(--primary);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.tool-badge.hot {
    background: var(--secondary);
}

/* Tool Modal */
.tool-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tool-modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-icon {
    font-size: 32px;
}

.modal-title h2 {
    font-size: 24px;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
}

.input-group input,
.input-group textarea,
.input-group select {
    padding: 14px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.input-group textarea {
    min-height: 120px;
    resize: vertical;
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.generate-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-generate {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-generate.loading .btn-text {
    display: none;
}

.btn-generate .btn-loading {
    display: none;
}

.btn-generate.loading .btn-loading {
    display: inline;
}

.generation-info {
    font-size: 13px;
    color: var(--text-muted);
}

.output-section {
    display: none;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.output-section.active {
    display: block;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.output-header h3 {
    font-size: 18px;
}

.output-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.output-variations {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.variation-card {
    padding: 20px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.variation-card:hover,
.variation-card.selected {
    border-color: var(--primary);
}

.variation-card.selected {
    background: rgba(99, 102, 241, 0.1);
}

.variation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.variation-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.variation-select {
    font-size: 12px;
    color: var(--text-muted);
}

.variation-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* Pricing Section */
.pricing-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.3s;
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: var(--gradient-2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.pricing-header h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price .amount {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 48px;
    font-weight: 700;
}

.price .period {
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.pricing-features li:last-child {
    border-bottom: none;
}

/* Affiliate Section */
.affiliate-section {
    padding: 60px 0;
    position: relative;
    z-index: 1;
}

.affiliate-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 40px;
    background: var(--gradient-2);
    border-radius: 20px;
    flex-wrap: wrap;
}

.affiliate-content h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.affiliate-content p {
    opacity: 0.9;
}

.affiliate-card .btn {
    background: white;
    color: var(--primary-dark);
}

/* FAQ Section */
.faq-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.faq-icon {
    font-size: 24px;
    color: var(--primary);
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding-bottom: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    background: var(--bg-card);
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 16px;
    max-width: 280px;
}

.footer-links h4 {
    font-size: 14px;
    margin-bottom: 20px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    transition: color 0.3s;
}

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--text-primary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--success);
    color: white;
    border-radius: 10px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s;
    z-index: 3000;
}

.toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-visual {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .usage-badge {
        display: none;
    }
    
    .nav-right .btn {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        text-align: center;
        padding-top: 100px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-subtitle {
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .affiliate-card {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.5s ease forwards;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.15s; }
.tool-card:nth-child(3) { animation-delay: 0.2s; }
.tool-card:nth-child(4) { animation-delay: 0.25s; }
.tool-card:nth-child(5) { animation-delay: 0.3s; }
.tool-card:nth-child(6) { animation-delay: 0.35s; }
.tool-card:nth-child(7) { animation-delay: 0.4s; }
.tool-card:nth-child(8) { animation-delay: 0.45s; }
.tool-card:nth-child(9) { animation-delay: 0.5s; }
.tool-card:nth-child(10) { animation-delay: 0.55s; }
.tool-card:nth-child(11) { animation-delay: 0.6s; }
.tool-card:nth-child(12) { animation-delay: 0.65s; }
