.base64-page {
    max-width: 1180px;
    margin: 0 auto;
}

.base64-card {
    padding: 24px;
}

/* 탭 */

.base64-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
}

.base64-tab {
    border: 1px solid #dbe1ea;
    background: #f8fafc;
    color: #475569;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.18s ease;
}

.base64-tab:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.base64-tab.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

/* 레이아웃 */

.base64-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.base64-panel {
    min-width: 0;
}

.base64-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

/* textarea */

.base64-textarea {
    min-height: 280px;
    resize: vertical;
    line-height: 1.7;
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 미니 버튼 */

.base64-mini-btn {
    border: 1px solid #dbe1ea;
    background: #fff;
    color: #475569;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.18s ease;
}

.base64-mini-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* 카운트 */

.base64-count {
    margin-top: 8px;
    font-size: 12px;
    color: #94a3b8;
    text-align: right;
}

/* 버튼 */

.base64-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.base64-btn-row .utility-btn {
    min-width: 132px;
    height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
    transition: 0.18s ease;
}

.base64-btn-row .utility-btn:hover {
    transform: translateY(-1px);
}

.base64-btn-row .utility-btn-primary {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.base64-btn-row .utility-btn-primary:hover {
    background: #111827;
    border-color: #111827;
}

/* 메시지 */

.base64-message {
    min-height: 22px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #475569;
}

.base64-message.is-error {
    color: #dc2626;
}

.base64-message.is-success {
    color: #2563eb;
}

/* 도움말 */

.help-panel {
    margin-top: 32px;
}

.help-panel h2 {
    margin-bottom: 18px;
}

.help-panel .help-box + .help-box {
    margin-top: 18px;
}

/* 반응형 */

@media (max-width: 860px) {
    .base64-grid {
        grid-template-columns: 1fr;
    }

    .base64-textarea {
        min-height: 220px;
    }
}

@media (max-width: 640px) {
    .base64-card {
        padding: 18px;
    }

    .base64-mode-tabs {
        flex-wrap: wrap;
    }

    .base64-tab {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }

    .base64-btn-row {
        flex-direction: column;
    }

    .base64-btn-row .utility-btn {
        width: 100%;
        min-width: 100%;
        height: 44px;
    }

    .base64-panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .base64-mini-btn {
        width: 100%;
    }
}