/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f43f5e;
    --success: #10b981;
    --warning: #f59e0b;

    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    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;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.logo strong {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.nav-links a i {
    width: 18px;
    height: 18px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    padding: 140px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top center, rgba(99, 102, 241, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--primary-light);
    margin-bottom: 24px;
}

.hero-badge i {
    width: 18px;
    height: 18px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.hero-stats .stat i {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* ===== Converter Section ===== */
.converter-section {
    padding: 40px 0 80px;
}

.converter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.converter-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 24px 32px;
    text-align: center;
}

.converter-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.converter-header h2 i {
    width: 28px;
    height: 28px;
}

.converter-header p {
    opacity: 0.9;
}

.converter-body {
    padding: 32px;
}

.input-group,
.output-group {
    margin-bottom: 24px;
}

.input-group label,
.output-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.input-group label i,
.output-group label i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

textarea {
    width: 100%;
    padding: 16px;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

textarea::placeholder {
    color: var(--text-muted);
}

.input-actions,
.output-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-primary i,
.btn-secondary i {
    width: 18px;
    height: 18px;
}

/* ===== Conversion Buttons ===== */
.conversion-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.convert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.convert-btn i {
    width: 18px;
    height: 18px;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.convert-btn.uppercase:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.convert-btn.lowercase:hover {
    background: #3b82f6;
    border-color: #3b82f6;
}

.convert-btn.title:hover {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

.convert-btn.sentence:hover {
    background: #ec4899;
    border-color: #ec4899;
}

.convert-btn.camel:hover {
    background: #10b981;
    border-color: #10b981;
}

.convert-btn.pascal:hover {
    background: #14b8a6;
    border-color: #14b8a6;
}

.convert-btn.snake:hover {
    background: #f59e0b;
    border-color: #f59e0b;
}

.convert-btn.kebab:hover {
    background: #f97316;
    border-color: #f97316;
}

.convert-btn.constant:hover {
    background: #6366f1;
    border-color: #6366f1;
}

.convert-btn.dot:hover {
    background: #0ea5e9;
    border-color: #0ea5e9;
}

.convert-btn.path:hover {
    background: #84cc16;
    border-color: #84cc16;
}

.convert-btn.alternating:hover {
    background: #a855f7;
    border-color: #a855f7;
}

.convert-btn.inverse:hover {
    background: #06b6d4;
    border-color: #06b6d4;
}

.convert-btn.capitalize:hover {
    background: #22c55e;
    border-color: #22c55e;
}

/* ===== Text Stats ===== */
.text-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    padding: 20px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    margin-top: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.stat-item i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* ===== Tools Grid ===== */
.converters-grid {
    padding: 80px 0;
    background: var(--bg-darker);
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header h2 i {
    color: var(--primary);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.tool-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.tool-icon i {
    width: 28px;
    height: 28px;
    color: white;
}

.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
}

.tool-link i {
    width: 18px;
    height: 18px;
    transition: var(--transition);
}

.tool-card:hover .tool-link i {
    transform: translateX(4px);
}

/* ===== Features Section ===== */
.features-section {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border-radius: 50%;
    margin: 0 auto 20px;
}

.feature-icon i {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== How To Section ===== */
.how-to-section {
    padding: 80px 0;
    background: var(--bg-darker);
}

.steps-container {
    max-width: 700px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    transition: var(--transition);
}

.step:hover {
    border-color: var(--primary);
}

.step-number {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
}

/* ===== Use Cases Section ===== */
.use-cases-section {
    padding: 80px 0;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.use-case-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.use-case-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.use-case-card>i {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 16px;
}

.use-case-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.use-case-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== FAQ Section ===== */
.faq-section {
    padding: 80px 0;
    background: var(--bg-darker);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-glass);
}

.faq-question i {
    width: 20px;
    height: 20px;
    color: var(--primary);
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Articles Section ===== */
.articles-section {
    padding: 80px 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.article-image {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.article-image i {
    width: 64px;
    height: 64px;
    color: white;
    opacity: 0.9;
}

.article-content {
    padding: 24px;
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
}

.read-more i {
    width: 18px;
    height: 18px;
    transition: var(--transition);
}

.article-card:hover .read-more i {
    transform: translateX(4px);
}

.articles-cta {
    text-align: center;
    margin-top: 40px;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: white;
    color: var(--primary);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.btn-cta i {
    width: 24px;
    height: 24px;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-darker);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.social-links a i {
    width: 18px;
    height: 18px;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-bottom a {
    color: var(--primary);
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--success);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast i {
    width: 20px;
    height: 20px;
}

/* ===== Mobile Responsiveness ===== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        flex-direction: column;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .converter-body {
        padding: 20px;
    }

    .conversion-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .tools-grid,
    .features-grid,
    .use-cases-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .conversion-buttons {
        grid-template-columns: 1fr;
    }

    .input-actions,
    .output-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .text-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.converter-card,
.tool-card,
.feature-card,
.step,
.faq-item,
.article-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== Print Styles ===== */
@media print {

    .header,
    .footer,
    .cta-section {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}