.b64-tool {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.b64-tool h1 {
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 28px;
}

.b64-tool h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 22px;
}

.b64-tool h3 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.b64-privacy-note {
    color: #666;
    font-size: 13px;
    margin-bottom: 20px;
    padding: 8px 12px;
    background: #f0faf0;
    border-left: 3px solid #28a745;
    border-radius: 3px;
}

/* Input textarea */
.b64-input-area {
    width: 100%;
    min-height: 150px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    word-break: break-all;
    line-height: 1.5;
    box-sizing: border-box;
}

.b64-input-area:focus {
    border-color: #337ab7;
    outline: none;
}

/* Options bar */
.b64-options-bar {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

.b64-toggle-label {
    font-size: 13px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.b64-select-label {
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.b64-select {
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Buttons */
.b64-btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #333;
    cursor: pointer;
    margin-right: 5px;
    margin-bottom: 5px;
}

.b64-btn:hover {
    background: #f5f5f5;
}

.b64-btn-primary {
    background: #337ab7;
    color: #fff;
    border-color: #337ab7;
}

.b64-btn-primary:hover {
    background: #286090;
}

/* Toolbar */
.b64-toolbar {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
}

/* File upload */
.b64-file-upload {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    margin: 12px 0;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.b64-file-upload:hover,
.b64-file-upload.dragover {
    border-color: #337ab7;
    background: #f0f7ff;
}

.b64-file-label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

/* Error display */
.b64-error {
    color: #721c24;
    background: #f8d7da;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 13px;
    margin: 10px 0;
}

/* Output section */
.b64-output-section {
    margin-top: 15px;
}

.b64-output-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.b64-output-title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.b64-view-selector {
    display: flex;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
}

.b64-view-btn {
    padding: 4px 12px;
    font-size: 12px;
    border: none;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-right: 1px solid #ddd;
}

.b64-view-btn:last-child {
    border-right: none;
}

.b64-view-btn.active {
    background: #337ab7;
    color: #fff;
}

.b64-view-btn:hover:not(.active) {
    background: #f5f5f5;
}

/* Output pre block */
.b64-output-wrapper {
    position: relative;
}

.b64-output {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    padding: 12px;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0;
    min-height: 60px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Copy button */
.b64-copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 8px;
    font-size: 11px;
    background: #444;
    color: #ccc;
    border: 1px solid #555;
    border-radius: 3px;
    cursor: pointer;
}

.b64-copy-btn:hover {
    background: #555;
    color: #fff;
}

/* Stats line */
.b64-stats {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

/* Image preview */
.b64-image-preview {
    margin-top: 15px;
    text-align: center;
}

.b64-image-preview img {
    max-width: 100%;
    max-height: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Character set table */
.b64-charset-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0 20px;
    font-size: 13px;
    font-family: 'Courier New', Courier, monospace;
}

.b64-charset-table th,
.b64-charset-table td {
    padding: 4px 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.b64-charset-table th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #555;
}

/* Step-by-step example table */
.b64-example-table {
    width: auto;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
    font-family: 'Courier New', Courier, monospace;
}

.b64-example-table th,
.b64-example-table td {
    padding: 6px 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.b64-example-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #555;
}

.b64-example-table td:first-child {
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    color: #555;
    font-size: 12px;
    white-space: nowrap;
}

/* Code blocks for programming language examples */
.b64-code-block {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    padding: 14px;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0 20px;
    line-height: 1.5;
    white-space: pre;
    word-wrap: normal;
}

.b64-code-block code {
    background: none !important;
    color: inherit !important;
    padding: 0 !important;
    font-size: inherit;
}

/* SEO content */
.b64-tool .seo-content {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
    line-height: 1.7;
    color: #333;
}

.b64-tool .seo-content p {
    margin-bottom: 14px;
    font-size: 15px;
}

.b64-tool .seo-content code {
    background: #f4f4f4;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 13px;
    color: #c7254e;
}

.b64-tool .seo-content ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.b64-tool .seo-content ul li {
    margin-bottom: 8px;
    font-size: 15px;
}

.b64-tool .seo-content a {
    color: #337ab7;
}

.b64-tool .seo-content a:hover {
    color: #23527c;
    text-decoration: underline;
}

/* FAQ */
.b64-tool .faq-section {
    margin-top: 10px;
}

.b64-tool .faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.b64-tool .faq-item:last-child {
    border-bottom: none;
}

.b64-tool .faq-item h3 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 8px;
    color: #222;
}

.b64-tool .faq-item p {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .b64-options-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .b64-output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .b64-charset-table {
        font-size: 11px;
    }

    .b64-charset-table th,
    .b64-charset-table td {
        padding: 2px 4px;
    }
}
