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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #ddd;
    --success-color: #27ae60;
    --white: #ffffff;
    --max-width: 1200px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
}

/* Typography */
h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.logo:hover {
    color: var(--white);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0;
}

nav a {
    color: var(--white);
    font-weight: 500;
    transition: opacity 0.3s ease;
}

nav a:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Tool Cards */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.tool-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.tool-card h3 {
    margin-top: 0;
    color: var(--secondary-color);
}

.tool-card p {
    margin-bottom: 1.5rem;
    color: #666;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #2980b9;
    text-decoration: none;
    color: var(--white);
}

.btn-secondary {
    background-color: var(--success-color);
}

.btn-secondary:hover {
    background-color: #229954;
}

/* Tool Interface */
.tool-interface {
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 2rem;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.tool-interface h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

textarea {
    width: 100%;
    min-height: 250px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}

textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Stats Display */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-item {
    background: var(--white);
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

/* Output Area */
.output-area {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    padding: 1rem;
    min-height: 150px;
    font-size: 1rem;
    margin: 1rem 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* FAQ Section */
.faq {
    margin: 3rem 0;
}

.faq-item {
    background: var(--light-bg);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
}

.faq-item h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

/* Blog Posts */
.blog-posts {
    margin: 3rem 0;
}

.blog-post {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.blog-post h2 {
    margin-top: 0;
}

.blog-meta {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    color: var(--white);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Content Sections */
.content-section {
    margin: 3rem 0;
}

.intro-text {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    margin: 2rem 0;
}

/* Highlight Box */
.highlight-box {
    background: #e3f2fd;
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 5px;
}

.highlight-box p:last-child {
    margin-bottom: 0;
}

/* Warning Box */
.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 5px;
}

/* Success Box */
.success-box {
    background: #d4edda;
    border-left: 4px solid var(--success-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

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

    .hero p {
        font-size: 1.1rem;
    }

    .header-content {
        padding: 0 1rem;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        background-color: var(--primary-color);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 1rem;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .menu-toggle {
        display: block;
    }

    .container {
        padding: 2rem 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    p, li {
        font-size: 1rem;
    }

    .tool-interface {
        padding: 1rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    header, footer, .btn, .tool-interface {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
