/* TextFly - CSS com design assimétrico harmonioso estilo Apple */

/* Reset e Variáveis CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

:root {
    /* Cores Light Mode */
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --accent-color: #0056f9;
    --accent-hover: #0041c2;
    --success-color: #22c55e;
    --warning-color: #fbbf24;
    --danger-color: #ef4444;
    --purple-color: #8b5cf6;
    --indigo-color: #6366f1;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-color: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-color: #f7fafc;
    --text-light: #a0aec0;
    --border-color: #2d3748;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Base */
body {
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
.header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
    backdrop-filter: blur(20px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Theme Toggle */
.theme-toggle {
    width: 50px;
    height: 24px;
    background-color: #cbd5e0;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .theme-toggle {
    background-color: var(--accent-color);
}

.toggle-circle {
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

[data-theme="dark"] .toggle-circle {
    transform: translateX(26px);
}

/* Hero Section */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 86, 249, 0.02), rgba(79, 137, 255, 0.02));
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--purple-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Main Tool Section */
.main-content {
    padding: 3rem 0 5rem;
}

.tool-section {
    display: flex;
    justify-content: center;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    border: 1px solid var(--border-color);
}

/* Text Area */
.textarea-container {
    position: relative;
    margin: 2rem;
    margin-bottom: 0;
}

.main-textarea {
    width: 100%;
    min-height: 200px;
    max-height: 400px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    background: var(--bg-color);
    color: var(--text-color);
    resize: vertical;
    transition: all 0.3s ease;
}

.main-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(0, 86, 249, 0.1);
    transform: translateY(-2px);
}

.main-textarea::placeholder {
    color: var(--text-light);
}

.char-counter {
    position: absolute;
    bottom: 16px;
    right: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    background: var(--card-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

/* Controls Section */
.controls-section {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

.controls-section > h3 {
    font-size: 1.4rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.control-group {
    margin-bottom: 2.5rem;
}

.control-group:last-child {
    margin-bottom: 1rem;
}

.control-group h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--accent-color), var(--purple-color));
    border-radius: 2px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

/* Control Buttons - MENORES */
.control-btn {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-family: inherit;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.control-btn:active {
    transform: translateY(-1px);
}

/* Action Buttons */
.action-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--indigo-color));
    color: white;
    border: none;
    font-weight: 600;
}

.action-btn:hover {
    background: linear-gradient(135deg, var(--accent-hover), #5855eb);
    border-color: transparent;
}

.action-btn.danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

.action-btn.danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.action-btn i {
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* Convert Buttons */
.convert-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.convert-btn.processing {
    border-color: var(--warning-color);
    background: rgba(251, 191, 36, 0.1);
    animation: processing 0.5s ease;
}

@keyframes processing {
    0%, 100% { transform: translateY(-3px) scale(1); }
    50% { transform: translateY(-3px) scale(1.02); }
}

/* Stats Area */
.stats-area {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
}

.stats-area h4 {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem 0.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Support Section */
.support-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--accent-color), var(--indigo-color));
    color: white;
    margin: 3rem 0;
}

.support-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.support-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.support-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.7;
}

.support-why {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-left: 4px solid white;
}

.support-why h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
}

.support-why p {
    margin-bottom: 0;
}

.support-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn-quote {
    background: white;
    color: var(--accent-color);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.btn-quote:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.support-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Educational Content */
.education-section {
    padding: 5rem 0;
    background: var(--bg-color);
}

.education-header {
    text-align: center;
    margin-bottom: 4rem;
}

.education-header h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.education-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Educational Content - SIMÉTRICO E ORGANIZADO */
.content-grid-symmetric {
    max-width: 1000px;
    margin: 0 auto;
}

.content-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.block-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.block-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--purple-color), var(--indigo-color));
}

.block-content:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.block-content h3 {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.block-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    font-size: 0.9rem;
}

.block-content strong {
    color: var(--accent-color);
    font-weight: 600;
}

.example-box {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.example-text {
    display: block;
    margin-top: 0.25rem;
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem;
    background: rgba(0, 86, 249, 0.05);
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Footer */
.footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    margin-bottom: 1rem;
    display: block;
}

.footer-logo span {
    color: var(--accent-color);
}

.footer-column h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: var(--text-light);
    text-decoration: none;
}

.footer-bottom-links a:hover {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .controls-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .content-block {
        flex-direction: column;
        align-items: center;
    }

    .content-block.left .block-content,
    .content-block.right .block-content {
        margin: 0 auto;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content h2 {
        font-size: 1.4rem;
    }

    .tool-card {
        margin: 0 -15px;
        border-radius: 16px;
    }

    .controls-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.5rem;
    }

    .control-btn {
        padding: 0.75rem;
        min-height: 60px;
    }

    .support-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .block-content {
        padding: 1.5rem;
        max-width: 100%;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.2rem;
    }

    .textarea-container,
    .controls-section {
        margin: 1rem;
        padding: 1rem;
    }

    .controls-grid {
        grid-template-columns: 1fr 1fr;
    }

    .control-btn {
        font-size: 0.85rem;
        min-height: 55px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .block-content {
        padding: 1.25rem;
    }
}

/* Ko-fi Widget Styling */
#kofi-wk-btn {
    border-radius: 50px !important;
    background: white !important;
    color: var(--accent-color) !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

#kofi-wk-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}