/* Reset e Variáveis */
:root {
    --primary: #e53e3e;
    --primary-dark: #c53030;
    --primary-light: #fc8181;
    --secondary: #1a202c;
    --dark: #0f172a;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-800);
    background-color: var(--white);
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    border-bottom: 1px solid var(--gray-200);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
}

/* Hero Section */
.hero {
    padding: 8rem 2rem 4rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    max-width: 1280px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.hero h1 .highlight {
    color: var(--primary);
    position: relative;
}

.hero p {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

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

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

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.hero-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--gray-100), var(--white));
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.hero-image i {
    color: var(--gray-400);
}

.hero-image i:first-child {
    color: var(--primary);
}

.hero-image i:last-child {
    color: var(--primary);
}

/* Sections Header */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(229, 62, 62, 0.1);
    color: var(--primary);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--gray-600);
    font-size: 1.125rem;
}

/* Features */
.features {
    padding: 5rem 0;
    background: var(--white);
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

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

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(229, 62, 62, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Converter Section */
.converter {
    padding: 5rem 0;
    background: var(--gray-50);
}

.converter-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--gray-50);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(229, 62, 62, 0.05);
    transform: translateY(-2px);
}

.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(229, 62, 62, 0.1);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--gray-500);
}

input[type="file"] {
    display: none;
}

/* File Info */
.file-info {
    display: none;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.file-info.active {
    display: flex;
}

.file-icon {
    font-size: 2rem;
    color: var(--primary);
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--gray-800);
    word-break: break-all;
}

.file-size {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.file-clear {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.3s ease;
}

.file-clear:hover {
    color: var(--primary);
}

/* Conversion Options */
.conversion-options {
    display: none;
    margin-top: 1.5rem;
}

.conversion-options.active {
    display: block;
}

.format-label {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
}

.format-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.format-btn {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.format-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
}

.loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.loading-sub {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Result Section */
.result-section {
    display: none;
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    border-top: 1px solid var(--gray-200);
}

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

.result-icon {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.preview-area {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    text-align: left;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid var(--gray-200);
}

/* Formats Section */
.formats {
    padding: 5rem 0;
    background: var(--white);
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.format-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.format-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.format-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.format-card span {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
}

.format-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 9999px;
    color: var(--gray-600);
}

/* FAQ Section */
.faq {
    padding: 5rem 0;
    background: var(--gray-50);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--gray-50);
}

.faq-question h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.faq-question i {
    color: var(--gray-400);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.25rem;
    border-top: 1px solid transparent;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 1.25rem;
    border-top-color: var(--gray-200);
}

.faq-answer p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 3rem 0 1.5rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-section p {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--gray-400);
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

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

.footer-section h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

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

.footer-section ul li a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.footer-section ul li i {
    width: 1.5rem;
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--gray-800);
    font-size: 0.75rem;
}

.footer-dev {
    margin-top: 0.5rem;
    color: var(--gray-600);
}

.footer-dev i {
    color: var(--primary);
}

/* Responsividade */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 2rem;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--gray-200);
    }

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

    .nav-toggle {
        display: block;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 6rem;
    }

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

    .hero p {
        margin: 0 auto 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        display: none;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

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

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .converter-card {
        padding: 1.5rem;
    }

    .format-buttons {
        gap: 0.5rem;
    }

    .format-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

/* Estilos para preview */
.preview-text {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    max-height: 400px;
}

.preview-json {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    white-space: pre-wrap;
    color: #2d3748;
}

.loading-preview {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

/* Melhorias no resultado */
.result-section {
    animation: slideUp 0.3s ease;
}

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