#emb-board {
    max-width: 1000px;
    margin: 0 auto;
    font-family: system-ui, sans-serif;
}

#emb-board h1 {
    text-align: center;
}

#emb-board .emb-tagline {
    text-align: center;
    color: #555;
}

#emb-board select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 12px 30px 12px 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#emb-board select:focus {
    outline: 2px solid #0073aa;
}

#emb-board input[type="text"],
#emb-board textarea {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

#emb-board label {
    display: block;
    margin-top: 15px;
}

.emb-search-wrap {
    margin-bottom: 20px;
}

.emb-compose {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.emb-grid-2 {
    display: grid;
    gap: 15px;
    grid-template-columns: 1fr 1fr;
}

.emb-char-count {
    text-align: right;
    font-size: 12px;
    color: #666;
}

.emb-decrypt-limit {
    margin-top: 15px;
}

.emb-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
}

.emb-check input {
    width: auto;
}

.emb-decrypt-limit-wrap {
    margin-top: 10px;
}

.emb-decrypt-note {
    margin-top: 16px;
    padding: 10px 12px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 6px;
    white-space: normal;
}

.emb-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.emb-table th {
    padding: 14px;
    text-align: left;
    background: #f1f1f1;
}

.emb-table td {
    padding: 12px;
}

.emb-actions {
    white-space: nowrap;
    width: 220px;
}

.emb-empty {
    padding: 30px;
    text-align: center;
    font-style: italic;
}

.emb-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 6px;
    color: #fff;
    font-size: 14px;
}

.emb-btn-primary {
    margin-top: 20px;
    padding: 14px 28px;
    font-size: 16px;
    background: #0073aa;
    border-radius: 8px;
}

.emb-btn-decrypt {
    background: #28a745;
}

.emb-btn-delete {
    background: #dc3545;
}

.emb-btn-manage {
    background: #0d6efd;
}

.emb-manage-panel {
    white-space: normal;
}

.emb-manage-panel h3 {
    margin: 0 0 12px;
}

.emb-manage-stats {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.emb-manage-stats li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.emb-manage-actions {
    margin-top: 16px;
}

.emb-btn-muted {
    background: #6c757d;
}

.emb-pager {
    margin-top: 16px;
    text-align: center;
}

.emb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.emb-modal:not([hidden]) {
    display: flex;
}

.emb-modal-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 460px;
    max-width: 92%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.emb-modal-card h2,
.emb-modal-card h3 {
    margin: 0 0 20px;
}

.emb-key-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    word-break: break-all;
}

.emb-modal-actions {
    display: flex;
    gap: 12px;
}

.emb-modal-actions .emb-btn {
    flex: 1;
    margin: 0;
    padding: 14px;
    font-size: 16px;
    border-radius: 8px;
}

#emb-modal-key,
#emb-manage-password {
    width: 100%;
    padding: 14px;
    font-size: 17px;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.emb-window {
    position: fixed;
    display: flex;
    flex-direction: column;
    min-width: 280px;
    min-height: 180px;
    background: #fff;
    border: 1px solid #c5c5c5;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.emb-window-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #1d2327;
    color: #fff;
    cursor: move;
    user-select: none;
    flex: 0 0 auto;
}

.emb-window-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emb-window-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.emb-window-close:hover {
    background: #dc3545;
}

.emb-window-body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 15px;
    line-height: 1.45;
}

.emb-window-body .emb-key-results {
    width: 100%;
    border-collapse: collapse;
    white-space: normal;
}

.emb-window-body .emb-key-results th,
.emb-window-body .emb-key-results td {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.emb-window-body .emb-key-results .emb-plain {
    white-space: pre-wrap;
    font-family: ui-monospace, monospace;
}

.emb-window-resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
}

@media (max-width: 640px) {
    .emb-grid-2 {
        grid-template-columns: 1fr;
    }
}
