* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f8fa;
    color: #111827;
    line-height: 1.6;
}

.container {
    width: min(1100px, 92%);
    margin: auto;
}


/* Header */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.nav {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: #111827;
    text-decoration: none;
    font-size: 21px;
    font-weight: 700;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

nav a {
    color: #4b5563;
    text-decoration: none;
}

nav a:hover {
    color: #111827;
}


/* Hero */

.hero {
    text-align: center;
    padding: 70px 20px 45px;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 58px);
    letter-spacing: -1.5px;
}

.hero p {
    max-width: 680px;
    margin: 18px auto 0;
    color: #6b7280;
    font-size: 18px;
}


/* Tool */

.tool-section {
    padding-bottom: 70px;
}

.tool-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.06);
}

.tool-header {
    margin-bottom: 18px;
}

.tool-header h2 {
    margin: 0 0 5px;
    font-size: 22px;
}

.tool-header p {
    margin: 0;
    color: #6b7280;
}


textarea {
    display: block;
    width: 100%;
    min-height: 300px;
    resize: vertical;

    padding: 18px;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    outline: none;

    font-family: "Courier New", monospace;
    font-size: 15px;
    line-height: 1.6;

    background: #fafafa;
}

textarea:focus {
    border-color: #6b7280;
}


/* Buttons */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

button {
    border: 0;
    border-radius: 8px;

    padding: 11px 17px;

    background: #111827;
    color: #ffffff;

    font-weight: 700;

    cursor: pointer;
}

button:hover {
    opacity: 0.85;
}

button.secondary {
    background: #e5e7eb;
    color: #111827;
}


/* Result */

.result {
    margin-top: 22px;
    padding: 18px;

    border-radius: 10px;

    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.result h3 {
    margin: 0;
}

.result p {
    margin: 3px 0 0;
    color: #166534;
}


/* Output */

.output-section {
    margin-top: 22px;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 10px;
}

.output-header h3 {
    margin: 0;
}

.copy-button {
    padding: 8px 14px;
}

#output {
    min-height: 180px;
    background: #111827;
    color: #ffffff;
}


/* Statistics */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;

    margin-top: 15px;
}

.stat {
    padding: 15px;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    background: #f9fafb;
}

.stat span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 4px;
}

.stat strong {
    font-size: 18px;
}


/* Error */

.error-details {
    margin-top: 20px;
    padding: 18px;

    border-radius: 10px;

    background: #fef2f2;
    border: 1px solid #fecaca;
}

.error-details h3 {
    margin-top: 0;
    color: #991b1b;
}

.error-details pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;

    color: #7f1d1d;

    font-family: "Courier New", monospace;
}


/* Hidden */

.hidden {
    display: none;
}


/* Content */

.content {
    background: #ffffff;
    padding: 70px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 50px;
}

.content h2 {
    margin-top: 35px;
    font-size: 26px;
}

.content h2:first-child {
    margin-top: 0;
}

.content p,
.content li {
    color: #4b5563;
}

.content li {
    margin-bottom: 8px;
}


/* Sidebar */

.side-card {
    position: sticky;
    top: 20px;

    padding: 20px;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #f9fafb;
}

.side-card h3 {
    margin-top: 0;
}

.side-card a {
    display: block;
    padding: 8px 0;

    color: #374151;
    text-decoration: none;
}

.side-card a:hover {
    text-decoration: underline;
}


/* Footer */

footer {
    padding: 30px 0;

    text-align: center;

    color: #6b7280;
}


/* Mobile */

@media (max-width: 700px) {

    .nav {
        padding: 16px 0;
        align-items: flex-start;
    }

    nav {
        display: none;
    }

    .hero {
        padding-top: 50px;
    }

    .tool-card {
        padding: 16px;
    }

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

    .output-header {
        align-items: flex-start;
    }

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

    .side-card {
        position: static;
    }

    button {
        flex: 1;
    }
  }
