/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #C62E2E;
    --secondary-color: #1e1e1e;
    --accent-color: #C1E172;
    --background-color: #f8f9fa;
    --text-color: #1e1e1e;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo a {
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #C62E2E 0%, #a82525 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.icon-wrapper {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* Main Content */
.main-content {
    margin: 3rem 0;
}

.tool-section {
    margin-bottom: 3rem;
}

.tool-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.input-section label,
.output-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.input-section label i,
.output-section label i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

textarea::placeholder {
    color: var(--text-muted);
}

.char-counter {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-copy,
.btn-cta-primary,
.btn-cta-secondary {
    padding: 1rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    flex: 1;
    min-width: 200px;
}

.btn-primary:hover {
    background: #a82525;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--background-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Output Section */
.output-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-copy {
    width: 100%;
    background: var(--success-color);
    color: white;
    margin-top: 1rem;
}

.btn-copy:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.copy-feedback {
    display: none;
    background: var(--success-color);
    color: white;
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    text-align: center;
    margin-top: 1rem;
    font-weight: 600;
}

.copy-feedback.show {
    display: block;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* Preview Section */
.preview-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.preview-section h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.preview-section h3 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.preview-box {
    background: #fafafa;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    min-height: 150px;
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.6;
}

.preview-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Features Section */
.features-section {
    background: white;
    padding: 4rem 0;
    margin: 3rem 0;
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    background: var(--background-color);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* How to Use Section */
.how-to-section {
    padding: 4rem 0;
}

.how-to-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.steps-container {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.step-content p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    padding: 4rem 0;
    margin: 3rem 0;
}

.cta-card {
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.cta-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-card > p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-cta-primary {
    background: var(--primary-color);
    color: white;
}

.btn-cta-primary:hover {
    background: #a82525;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-cta-secondary:hover {
    background: white;
    color: var(--text-color);
}

.cta-features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.cta-feature i {
    color: var(--accent-color);
}

/* Content Section */
.content-section {
    background: white;
    padding: 4rem 0;
    margin: 3rem 0;
}

.content-section article {
    max-width: 800px;
    margin: 0 auto;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.content-section h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

.content-section p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question i {
    transition: var(--transition);
    color: var(--primary-color);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-brand p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    opacity: 0.8;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        gap: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
    }

    .cta-features {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .nav-menu {
        font-size: 0.9rem;
        gap: 0.75rem;
    }

    .icon-wrapper {
        font-size: 3rem;
    }
}