/* ==========================================================
   BASE64
   ========================================================== */

.tool-page {
    padding: 72px 0 90px;
}

.tool-header {
    max-width: 820px;
    margin-bottom: 42px;
}

.tool-header h1 {
    margin-bottom: 18px;

    font-size: clamp(2.5rem, 5vw, 4.7rem);
    line-height: 1;

    letter-spacing: -0.05em;
}

.tool-header p {
    max-width: 680px;

    color: var(--muted);

    font-size: 1rem;
    line-height: 1.7;
}

.breadcrumb {
    margin-bottom: 22px;

    display: flex;
    align-items: center;

    gap: 8px;

    color: #687282;

    font-size: 0.82rem;
}

.breadcrumb a:hover {
    color: var(--text);
}


/* ==========================================================
   BASE64 TOOL
   ========================================================== */

.base64-tool {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 20px;

    background: var(--panel);

    box-shadow: var(--shadow);
}

.base64-toolbar {
    padding: 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    border-bottom: 1px solid var(--border);

    background: #0d1118;
}

.base64-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tool-button {
    padding: 9px 14px;

    border: 1px solid var(--border);
    border-radius: 10px;

    color: var(--text);

    background: #151a23;

    cursor: pointer;

    transition: 0.18s ease;
}

.tool-button:hover {
    border-color: rgba(255, 59, 92, 0.45);

    background: var(--panel-hover);
}

.tool-button.primary {
    border-color: rgba(255, 59, 92, 0.45);

    color: #ffffff;

    background: var(--accent-soft);
}

.tool-button.danger {
    color: #aeb6c2;
}

.base64-status {
    color: var(--muted);

    font-size: 0.8rem;
}

.base64-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;
}

.editor-panel {
    min-width: 0;
}

.editor-panel + .editor-panel {
    border-left: 1px solid var(--border);
}

.editor-title {
    padding: 12px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);

    color: #818b99;

    background: #10151c;

    font-size: 0.76rem;
    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}

.editor {
    width: 100%;
    height: 520px;

    padding: 20px;

    resize: vertical;

    border: 0;
    outline: 0;

    color: #d9dee5;

    background: #0b0f15;

    font-family:
        "JetBrains Mono",
        "Fira Code",
        Consolas,
        monospace;

    font-size: 0.9rem;
    line-height: 1.65;

    tab-size: 4;
}

.editor::placeholder {
    color: #515a68;
}

.editor.output {
    color: #d8dee8;
}


/* ==========================================================
   MESSAGE
   ========================================================== */

.base64-message {
    min-height: 48px;

    padding: 13px 16px;

    display: flex;
    align-items: center;

    border-top: 1px solid var(--border);

    color: var(--muted);

    background: #0d1118;

    font-size: 0.84rem;
}

.base64-message.success {
    color: #69d38b;
}

.base64-message.error {
    color: #ff7389;
}


/* ==========================================================
   CONTENT
   ========================================================== */

.content-section {
    padding: 20px 0 0;
}

.content-section h2 {
    margin-bottom: 20px;

    font-size: clamp(1.7rem, 3vw, 2.4rem);

    letter-spacing: -0.035em;
}

.content-section h3 {
    margin-top: 34px;
    margin-bottom: 12px;

    font-size: 1.2rem;
}

.content-section p,
.content-section li {
    color: var(--muted);

    line-height: 1.8;
}

.content-layout {
    max-width: 820px;
}

.code-example {
    margin: 24px 0;

    padding: 20px;

    overflow-x: auto;

    border: 1px solid var(--border);
    border-radius: 14px;

    color: #d6dce6;

    background: #0b0f15;

    font-family:
        Consolas,
        monospace;

    line-height: 1.6;
}

.related-tools {
    margin-top: 70px;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 14px;
}

.related-tool {
    padding: 20px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--panel);

    transition: 0.18s ease;
}

.related-tool:hover {
    transform: translateY(-3px);

    border-color: rgba(255, 59, 92, 0.4);
}

.related-tool span {
    display: block;

    margin-top: 8px;

    color: var(--muted);

    font-size: 0.82rem;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 820px) {

    .base64-grid {
        grid-template-columns: 1fr;
    }

    .editor-panel + .editor-panel {
        border-left: 0;
        border-top: 1px solid var(--border);
    }

    .editor {
        height: 360px;
    }

    .related-tools {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {

    .tool-page {
        padding-top: 48px;
    }

    .base64-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .base64-status {
        padding-left: 2px;
    }
}