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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #fef9f9 0%, #fff5f5 100%);
    min-height: 100vh;
    color: #333;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #fef9f9 0%, #fff5f5 100%);
}

.hero-wrapper {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-main {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.tagline {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.subtitle {
    color: #888;
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: #e88b8b;
}

#improve-btn {
    width: 100%;
    margin-top: 16px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #e88b8b 0%, #d66b6b 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#improve-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(216, 107, 107, 0.4);
}

#improve-btn:disabled {
    background: #ccc;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.language-note {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    margin-top: 12px;
}

.result-section {
    margin-top: 32px;
}

.improved-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
}

.improved-text {
    background: #f0fdf4;
    border-left: 4px solid #4ade80;
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin: 12px 0;
    font-size: 1.05rem;
    line-height: 1.5;
}

#copy-btn {
    padding: 10px 20px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

#copy-btn:hover {
    background: #eee;
}

.explanation-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
}

.explanation-box div {
    margin-top: 12px;
    line-height: 1.6;
    color: #555;
}

.feedback-box {
    text-align: center;
    padding: 16px;
    color: #666;
}

.feedback-btn {
    padding: 8px 16px;
    margin: 0 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.feedback-btn:hover {
    background: #f5f5f5;
}

.feedback-btn.selected {
    background: #fef9f9;
    border-color: #e88b8b;
}

.feedback-btn.disabled {
    cursor: default;
    opacity: 0.6;
}

.feedback-btn.disabled:hover {
    background: white;
}

.feedback-btn.disabled.selected {
    background: #fef9f9;
    opacity: 1;
}

.feedback-thanks {
    display: inline-block;
    margin-left: 12px;
    color: #4ade80;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0e0e0;
    border-top-color: #e88b8b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#loading-text {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.loading-subtitle {
    font-size: 0.9rem;
    color: #999;
}

.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
    text-align: center;
}

.hidden {
    display: none;
}

/* Examples Section */
.examples-section {
    background: white;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.example-card {
    background: #fef9f9;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.example-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.example-before,
.example-after {
    padding: 12px 0;
}

.example-before {
    border-bottom: 1px solid #f0e0e0;
    margin-bottom: 12px;
}

.example-before .label,
.example-after .label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.example-before .label {
    background: #fee2e2;
    color: #b91c1c;
}

.example-after .label {
    background: #dcfce7;
    color: #15803d;
}

.example-before p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    font-style: italic;
}

.example-after p {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Section Styles */
.section-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #333;
}

/* How It Works */
.how-it-works {
    background: linear-gradient(135deg, #fef9f9 0%, #fff5f5 100%);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step {
    text-align: center;
    padding: 24px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e88b8b 0%, #d66b6b 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #333;
}

.step p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Why LDR */
.why-ldr {
    background: white;
}

.reasons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.reason {
    background: #fef9f9;
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.reason-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 16px;
}

.reason h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #333;
}

.reason p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Final CTA */
.final-cta {
    background: linear-gradient(135deg, #fef9f9 0%, #fff5f5 100%);
    text-align: center;
}

.final-cta p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.cta-button {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, #e88b8b 0%, #d66b6b 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(216, 107, 107, 0.4);
}

/* Footer */
.site-footer {
    background: white;
    text-align: center;
    padding: 32px 20px;
    border-top: 1px solid #f0e0e0;
}

.site-footer p {
    color: #999;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-wrapper {
        flex-direction: column;
    }

    .hero-main {
        max-width: 100%;
    }

    .steps,
    .reasons,
    .examples-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .step,
    .reason,
    .example-card {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero-main {
        padding: 24px 16px;
    }

    header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    #improve-btn {
        font-size: 1rem;
        padding: 14px 20px;
    }

    .section-container {
        padding: 40px 16px;
    }

    section h2 {
        font-size: 1.5rem;
        margin-bottom: 28px;
    }

    .example-card {
        padding: 20px 16px;
    }

    .example-before p,
    .example-after p {
        font-size: 0.9rem;
    }

    .step,
    .reason {
        padding: 20px 16px;
    }

    .step h3,
    .reason h3 {
        font-size: 1rem;
    }

    .step p,
    .reason p {
        font-size: 0.9rem;
    }

    .feedback-box {
        padding: 12px;
    }

    .feedback-thanks {
        display: block;
        margin-left: 0;
        margin-top: 8px;
    }
}
