* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f5f7;
    color: #222;
}

#app {
    max-width: 1100px;
    margin: 16px auto 32px;
    padding: 0 12px;
}

header {
    margin-bottom: 16px;
}

header h1 {
    margin: 0 0 4px;
    font-size: 24px;
}

.subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card h2 {
    margin-top: 0;
    font-size: 18px;
}

#seqInput {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    padding: 8px;
    font-family: "Fira Code", Menlo, Consolas, monospace;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.input-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.genetic-code-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    margin-bottom: 6px;
}

.genetic-code-row label {
    color: #555;
}

#codeSelect {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #ccc;
    font-size: 13px;
    background: #fff;
}
button {
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    background: #007aff;
    color: #fff;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

button:hover {
    background: #0063cc;
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2) inset;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.status {
    font-size: 13px;
    color: #666;
}

.basic-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.basic-row-group {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.seq-variant {
    align-items: flex-start;
}

.label-col {
    min-width: 110px;
    color: #555;
    font-size: 13px;
    padding-top: 4px;
}

.value-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#seqReverse,
#seqComplement,
#seqRevComp {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    padding: 6px;
    font-family: "Fira Code", Menlo, monospace;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}



.basic-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.basic-row span:first-child {
    min-width: 80px;
    color: #555;
}

.reverse-complement {
    align-items: flex-start;
}

#revComp {
    flex: 1;
    min-height: 80px;
    resize: vertical;
    padding: 6px;
    font-family: "Fira Code", Menlo, monospace;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    border-bottom: 1px solid #eee;
    padding: 4px 6px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #fafafa;
    position: sticky;
    top: 0;
    z-index: 1;
}

tbody tr:nth-child(even) {
    background: #fbfbfb;
}

tbody tr.longest-orf {
    background: #fff7e0;
}

tbody tr.longest-orf td {
    font-weight: 500;
}

.orf-legend {
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-square {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.legend-square.longest {
    background: #ffd166;
}

/* 蛋白序列列稍窄一点，自动换行 */
td.protein {
    max-width: 260px;
    word-break: break-all;
}



.protein-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    margin-bottom: 8px;
}

.protein-controls label {
    color: #555;
}

#orfSelect {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #ccc;
    font-size: 13px;
    background: #fff;
}

.protein-summary {
    color: #444;
    font-size: 13px;
}

#aaTable th,
#aaTable td {
    font-size: 12px;
}

.orf-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    margin-bottom: 6px;
}

.orf-filter label {
    color: #555;
}

#minOrfLength {
    width: 80px;
    padding: 4px 6px;
    border-radius: 999px;
    border: 1px solid #ccc;
    font-size: 13px;
}




header {
    position: relative;
}

.lang-switch {
    position: absolute;
    top: 12px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
}

.lang-current {
    font-weight: 600;
    color: #222;
}

.lang-link {
    text-decoration: none;
    color: #0070f3;
    cursor: pointer;
}

.lang-link:hover {
    text-decoration: underline;
}

.lang-sep {
    color: #aaa;
}
