* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f2ff;
    color: #1a1a3e;
}

.app {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(255, 248, 252, 0.85);
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}

.app>* {
    position: relative;
    z-index: 1;
}

.app-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 26px 22px;
    -webkit-overflow-scrolling: touch;
}

.app-scroll::-webkit-scrollbar {
    width: 4px;
}
.app-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.app-scroll::-webkit-scrollbar-thumb {
    background: rgba(165, 180, 252, 0.25);
    border-radius: 4px;
}
.app-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(165, 180, 252, 0.40);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 8px 12px;
    border-bottom: 1px solid rgba(165, 180, 252, 0.15);
}
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbc4d4 0%, #4a5fc7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(74, 95, 199, 0.25);
}
.header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #fbc4d4 0%, #4a5fc7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header-badge {
    font-size: 11px;
    font-weight: 600;
    color: #7a7ab0;
    background: rgba(255, 255, 255, 0.50);
    padding: 3px 14px;
    border-radius: 100px;
    border: 1px solid rgba(165, 180, 252, 0.12);
    white-space: nowrap;
}

.tabs {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.40);
    border-radius: 12px;
    padding: 3px;
    margin: 12px 0 14px;
    flex-shrink: 0;
    border: 1px solid rgba(165, 180, 252, 0.10);
}
.tab {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    color: #9a9ac0;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.tab .tab-icon {
    font-size: 16px;
}
.tab.active {
    background: #ffffff;
    color: #1a1a4e;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(165, 180, 252, 0.10);
}
.tab:not(.active):hover {
    color: #6a6a9a;
}
.tab:active {
    transform: scale(0.96);
}

.algo-selector {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    background: rgba(255, 255, 255, 0.40);
    padding: 10px 16px;
    border-radius: 16px;
    border: 1px solid rgba(165, 180, 252, 0.10);
    margin-bottom: 14px;
    flex-shrink: 0;
}
.algo-selector .label {
    font-size: 13px;
    font-weight: 500;
    color: #7a7ab0;
    margin-right: 2px;
}
.algo-selector label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #7a7ab0;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background 0.2s;
}
.algo-selector label:hover {
    background: rgba(165, 180, 252, 0.06);
}
.algo-selector input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #4a5fc7;
    cursor: pointer;
    border-radius: 4px;
}
.algo-selector .count {
    margin-left: auto;
    font-size: 12px;
    color: #9a9ac0;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.35);
    padding: 1px 12px;
    border-radius: 100px;
}
.algo-selector .count strong {
    color: #5a5acc;
    font-weight: 700;
}

.input-panel {
    display: none;
    animation: fadeUp 0.3s ease;
}
.input-panel.active {
    display: block;
}

@keyframes fadeUp {
    0% {
        opacity: 0.4;
        transform: translateY(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-area {
    width: 100%;
    min-height: 260px;
    max-height: 420px;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background: rgba(255, 255, 255, 0.72);
    border: 2px solid rgba(165, 180, 252, 0.12);
    border-radius: 14px;
    color: #1a1a3e;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    line-height: 1.6;
    box-shadow: 0 2px 12px rgba(165, 180, 252, 0.04);
}
.text-area:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 4px rgba(165, 180, 252, 0.08), 0 2px 12px rgba(165, 180, 252, 0.04);
    background: #ffffff;
}
.text-area::placeholder {
    color: #b8b8d8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.char-info {
    font-size: 13px;
    color: #9a9ac0;
    font-weight: 500;
}
.char-info strong {
    color: #5a5a8a;
    font-weight: 600;
}
.char-info .limit {
    color: #9a9ac0;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    padding: 7px 20px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
}
.btn:active {
    transform: scale(0.96);
}
.btn-primary {
    background: linear-gradient(135deg, #6c7ddb 0%, #4a5fc7 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(74, 95, 199, 0.30);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(74, 95, 199, 0.40);
}
.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 2px 12px rgba(74, 95, 199, 0.25);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.55);
    color: #5a5a8a;
    border: 1px solid rgba(165, 180, 252, 0.10);
}
.btn-secondary:hover {
    background: #ffffff;
    border-color: rgba(165, 180, 252, 0.20);
}
.btn-secondary:active {
    background: rgba(165, 180, 252, 0.12);
    border-color: rgba(165, 180, 252, 0.25);
}
.btn-danger {
    background: rgba(239, 68, 68, 0.05);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.06);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.10);
}
.btn-danger:active {
    background: rgba(239, 68, 68, 0.18);
}

.drop-zone {
    border: 2px dashed rgba(165, 180, 252, 0.18);
    border-radius: 16px;
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    background: rgba(255, 255, 255, 0.18);
}
.drop-zone:hover {
    border-color: rgba(165, 180, 252, 0.30);
    background: rgba(255, 255, 255, 0.30);
}
.drop-zone.dragover {
    border-color: #a5b4fc;
    background: rgba(165, 180, 252, 0.06);
}
.drop-zone .drop-icon {
    font-size: 38px;
    display: block;
    margin-bottom: 6px;
    opacity: 0.7;
}
.drop-zone .drop-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a3e;
}
.drop-zone .drop-sub {
    font-size: 13px;
    color: #9a9ac0;
    margin-top: 2px;
}
.drop-zone .drop-sub strong {
    color: #a5b4fc;
    font-weight: 500;
}
.drop-zone input[type="file"] {
    display: none;
}

.file-info {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
    border: 1px solid rgba(165, 180, 252, 0.10);
}
.file-info.visible {
    display: flex;
}
.file-info .f-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.file-info .f-details {
    flex: 1;
    min-width: 80px;
}
.file-info .f-name {
    font-weight: 600;
    color: #1a1a3e;
    word-break: break-all;
    font-size: 14px;
}
.file-info .f-size {
    font-size: 12px;
    color: #9a9ac0;
}
.file-info .f-remove {
    background: none;
    border: none;
    font-size: 18px;
    color: #9a9ac0;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}
.file-info .f-remove:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.06);
}

.file-status {
    font-size: 13px;
    color: #9a9ac0;
    margin-top: 8px;
    text-align: center;
    min-height: 20px;
}
.progress-wrap {
    width: 100%;
    height: 4px;
    background: rgba(165, 180, 252, 0.08);
    border-radius: 6px;
    margin-top: 8px;
    overflow: hidden;
    display: none;
}
.progress-wrap.visible {
    display: block;
}
.progress-wrap .bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6c7ddb, #4a5fc7);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.result-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-top: 14px;
}

.result-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.result-head .result-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a3e;
}
.result-head .badge {
    font-size: 12px;
    font-weight: 600;
    background: rgba(165, 180, 252, 0.12);
    padding: 2px 14px;
    border-radius: 100px;
    color: #5a5a8a;
    border: 1px solid rgba(165, 180, 252, 0.10);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    flex: 1;
    align-content: start;
    overflow-y: auto;
    padding-bottom: 4px;
}
.grid::-webkit-scrollbar {
    width: 3px;
}
.grid::-webkit-scrollbar-thumb {
    background: rgba(165, 180, 252, 0.12);
    border-radius: 4px;
}

.card {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 16px;
    padding: 13px 14px 14px;
    border: 1px solid rgba(165, 180, 252, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.01);
}
.card:hover {
    border-color: rgba(165, 180, 252, 0.16);
    box-shadow: 0 4px 20px rgba(165, 180, 252, 0.05);
    transform: translateY(-1px);
}

.card .algo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.card .algo-name {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3a3a6a;
}
.card .algo-badge {
    font-size: 9px;
    font-weight: 600;
    padding: 1px 10px;
    border-radius: 100px;
    background: rgba(165, 180, 252, 0.06);
    color: #9a9ac0;
}

.card .hash {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    font-weight: 500;
    word-break: break-all;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.35);
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(165, 180, 252, 0.06);
    min-height: 42px;
    color: #1a1a3e;
}
.card .hash.empty {
    color: #b8b8d8;
    font-style: italic;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
}
.card .hash.loading {
    color: #6a6a9a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card .hash.loading .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(165, 180, 252, 0.12);
    border-top-color: #a5b4fc;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.card .copy-btn {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 500;
    color: #9a9ac0;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    margin-top: 6px;
    float: right;
    font-family: inherit;
}
.card .copy-btn:hover {
    background: rgba(165, 180, 252, 0.05);
    color: #a5b4fc;
}
.card .copy-btn.copied {
    color: #059669;
    background: rgba(5, 150, 105, 0.05);
}

.no-algo-hint {
    text-align: center;
    color: #9a9ac0;
    padding: 16px 0;
    font-size: 14px;
}

.footer {
    text-align: center;
    padding: 18px 0 6px;
    font-size: 15px;
    color: #7a7ab0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    border-top: 1px solid rgba(165, 180, 252, 0.08);
    margin-top: 10px;
}
.footer strong {
    color: #4a5fc7;
    font-weight: 700;
}
.footer-divider {
    color: #c0c0e0;
    font-weight: 300;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(60, 50, 100, 0.92);
    color: #fff;
    padding: 10px 28px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(165, 180, 252, 0.15);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 999;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.success {
    background: rgba(6, 95, 70, 0.80);
}
.toast.error {
    background: rgba(153, 27, 27, 0.80);
}
.toast.info {
    background: rgba(79, 70, 229, 0.75);
}

.hidden {
    display: none !important;
}

.cancel-wrap {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

@media (max-width: 640px) {
    .app-scroll {
        padding: 10px 14px 14px;
    }
    .header {
        padding: 10px 0 8px;
    }
    .header-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 11px;
    }
    .header h1 {
        font-size: 18px;
    }
    .header-badge {
        font-size: 10px;
        padding: 2px 10px;
    }
    .tabs {
        margin: 8px 0 10px;
        border-radius: 10px;
        padding: 3px;
    }
    .tab {
        font-size: 13px;
        padding: 6px 0;
        border-radius: 8px;
    }
    .tab .tab-icon {
        font-size: 14px;
    }
    .algo-selector {
        padding: 8px 12px;
        border-radius: 12px;
        gap: 4px 10px;
        margin-bottom: 10px;
    }
    .algo-selector .label {
        font-size: 12px;
        width: 100%;
        margin-bottom: 0;
    }
    .algo-selector label {
        font-size: 12px;
        padding: 1px 4px;
    }
    .algo-selector input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }
    .algo-selector .count {
        font-size: 11px;
        padding: 1px 10px;
        margin-left: 0;
        width: 100%;
        text-align: left;
    }
    .text-area {
        min-height: 170px;
        max-height: 280px;
        padding: 12px 14px;
        font-size: 12px;
        font-weight: 600;
        border-radius: 12px;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 8px;
    }
    .char-info {
        font-size: 12px;
    }
    .actions {
        justify-content: stretch;
    }
    .actions .btn {
        flex: 1;
        justify-content: center;
        padding: 6px 14px;
        font-size: 12px;
    }
    .drop-zone {
        padding: 18px 12px;
        border-radius: 12px;
    }
    .drop-zone .drop-icon {
        font-size: 30px;
    }
    .drop-zone .drop-title {
        font-size: 14px;
    }
    .drop-zone .drop-sub {
        font-size: 12px;
    }
    .file-info {
        padding: 8px 12px;
        gap: 8px;
        border-radius: 10px;
    }
    .file-info .f-icon {
        font-size: 20px;
    }
    .file-info .f-name {
        font-size: 13px;
    }
    .result-area {
        margin-top: 10px;
    }
    .result-head {
        margin-bottom: 8px;
    }
    .result-head .result-title {
        font-size: 14px;
    }
    .result-head .badge {
        font-size: 11px;
        padding: 1px 10px;
    }
    .grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .card {
        padding: 10px 11px 11px;
        border-radius: 12px;
    }
    .card .algo-name {
        font-size: 10px;
    }
    .card .algo-badge {
        font-size: 8px;
        padding: 1px 7px;
    }
    .card .hash {
        font-size: 10px;
        padding: 6px 8px;
        min-height: 30px;
        border-radius: 8px;
    }
    .card .hash.empty {
        font-size: 11px;
    }
    .card .copy-btn {
        font-size: 11px;
        padding: 2px 6px;
    }
}

@media (max-width: 400px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .app-scroll {
        padding: 6px 10px 10px;
    }
    .header h1 {
        font-size: 16px;
    }
    .header-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .tab {
        font-size: 12px;
        padding: 5px 0;
    }
    .text-area {
        min-height: 48px;
        font-size: 12px;
        padding: 8px 12px;
    }
    .btn {
        font-size: 11px;
        padding: 5px 12px;
    }
    .card .hash {
        font-size: 9px;
        padding: 4px 6px;
        min-height: 26px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .app-scroll {
        padding: 6px 20px 8px;
    }
    .header {
        padding: 4px 0 4px;
    }
    .header-icon {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    .header h1 {
        font-size: 16px;
    }
    .header-badge {
        font-size: 9px;
        padding: 1px 8px;
    }
    .tabs {
        margin: 4px 0 6px;
        padding: 2px;
    }
    .tab {
        font-size: 11px;
        padding: 4px 0;
    }
    .tab .tab-icon {
        font-size: 12px;
    }
    .algo-selector {
        padding: 4px 10px;
        margin-bottom: 6px;
        gap: 2px 8px;
        border-radius: 10px;
    }
    .algo-selector .label {
        font-size: 10px;
        width: auto;
    }
    .algo-selector label {
        font-size: 10px;
    }
    .algo-selector input[type="checkbox"] {
        width: 12px;
        height: 12px;
    }
    .algo-selector .count {
        font-size: 10px;
        padding: 0 8px;
        width: auto;
    }
    .text-area {
        min-height: 120px;
        max-height: 200px;
        padding: 8px 12px;
        font-size: 11px;
        font-weight: 600;
    }
    .toolbar {
        flex-direction: row;
        margin-top: 4px;
    }
    .char-info {
        font-size: 11px;
    }
    .btn {
        font-size: 11px;
        padding: 4px 12px;
    }
    .drop-zone {
        padding: 10px 12px;
    }
    .drop-zone .drop-icon {
        font-size: 22px;
        margin-bottom: 2px;
    }
    .drop-zone .drop-title {
        font-size: 12px;
    }
    .drop-zone .drop-sub {
        font-size: 10px;
    }
    .result-area {
        margin-top: 4px;
    }
    .result-head {
        margin-bottom: 4px;
    }
    .result-head .result-title {
        font-size: 12px;
    }
    .result-head .badge {
        font-size: 10px;
        padding: 0 8px;
    }
    .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }
    .card {
        padding: 6px 8px 8px;
        border-radius: 10px;
    }
    .card .algo-name {
        font-size: 8px;
    }
    .card .algo-badge {
        font-size: 7px;
        padding: 0 6px;
    }
    .card .hash {
        font-size: 8px;
        padding: 4px 6px;
        min-height: 22px;
    }
    .card .copy-btn {
        font-size: 9px;
        padding: 1px 6px;
        margin-top: 2px;
    }
    .toast {
        bottom: 12px;
        font-size: 12px;
        padding: 6px 16px;
    }
}

@media (prefers-color-scheme: dark) {
    html,
    body {
        background: #12102a;
    }
    .app {
        background: rgba(25, 20, 50, 0.82);
    }
    .header {
        border-bottom-color: rgba(165, 180, 252, 0.06);
    }
    .header h1 {
        background: linear-gradient(135deg, #fbc4d4 0%, #4a5fc7 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    .header-badge {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(165, 180, 252, 0.06);
        color: #8a8ab8;
    }
    .tabs {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(165, 180, 252, 0.04);
    }
    .tab {
        color: #6a6a90;
    }
    .tab.active {
        background: rgba(60, 50, 100, 0.70);
        color: #ffffff;
        font-weight: 600;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.20);
    }
    .tab:not(.active):hover {
        color: #b8b0d0;
    }
    .algo-selector {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(165, 180, 252, 0.04);
    }
    .algo-selector .label {
        color: #8a8ab8;
    }
    .algo-selector label {
        color: #8a8ab8;
    }
    .algo-selector label:hover {
        background: rgba(165, 180, 252, 0.04);
    }
    .algo-selector .count {
        background: rgba(255, 255, 255, 0.04);
        color: #6a6a90;
    }
    .algo-selector .count strong {
        color: #8a8aff;
        font-weight: 700;
    }
    .text-area {
        background: rgba(30, 25, 55, 0.50);
        border-color: rgba(165, 180, 252, 0.06);
        color: #e8e0f0;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    }
    .text-area:focus {
        border-color: #a5b4fc;
        box-shadow: 0 0 0 4px rgba(165, 180, 252, 0.06), 0 2px 12px rgba(0, 0, 0, 0.10);
        background: rgba(30, 25, 55, 0.70);
    }
    .text-area::placeholder {
        color: #6a6a90;
    }
    .char-info {
        color: #6a6a90;
    }
    .char-info strong {
        color: #b8b0d0;
    }
    .btn-secondary {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(165, 180, 252, 0.04);
        color: #8a8ab8;
    }
    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(165, 180, 252, 0.08);
    }
    .btn-danger {
        background: rgba(239, 68, 68, 0.04);
        border-color: rgba(239, 68, 68, 0.04);
        color: #f87171;
    }
    .btn-danger:hover {
        background: rgba(239, 68, 68, 0.08);
    }
    .drop-zone {
        border-color: rgba(165, 180, 252, 0.06);
        background: rgba(255, 255, 255, 0.02);
    }
    .drop-zone:hover {
        border-color: rgba(165, 180, 252, 0.16);
        background: rgba(255, 255, 255, 0.04);
    }
    .drop-zone .drop-title {
        color: #e8e0f0;
    }
    .drop-zone .drop-sub {
        color: #6a6a90;
    }
    .file-info {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(165, 180, 252, 0.04);
    }
    .file-info .f-name {
        color: #e8e0f0;
    }
    .file-info .f-size {
        color: #6a6a90;
    }
    .file-info .f-remove {
        color: #6a6a90;
    }
    .file-info .f-remove:hover {
        color: #f87171;
        background: rgba(239, 68, 68, 0.04);
    }
    .file-status {
        color: #6a6a90;
    }
    .progress-wrap {
        background: rgba(255, 255, 255, 0.04);
    }
    .result-head .result-title {
        color: #ffffff;
        font-weight: 700;
    }
    .result-head .badge {
        background: rgba(165, 180, 252, 0.08);
        border-color: rgba(165, 180, 252, 0.06);
        color: #b8b0d0;
    }
    .card {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(165, 180, 252, 0.04);
    }
    .card:hover {
        border-color: rgba(165, 180, 252, 0.08);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.20);
    }
    .card .algo-name {
        color: #ffffff;
        font-weight: 800;
    }
    .card .algo-badge {
        background: rgba(255, 255, 255, 0.04);
        color: #6a6a90;
    }
    .card .hash {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(165, 180, 252, 0.04);
        color: #f0ecff;
    }
    .card .hash.empty {
        color: #6a6a90;
    }
    .card .hash.loading {
        color: #8a8ab8;
    }
    .card .copy-btn {
        color: #6a6a90;
    }
    .card .copy-btn:hover {
        background: rgba(165, 180, 252, 0.04);
        color: #a5b4fc;
    }
    .card .copy-btn.copied {
        color: #34d399;
        background: rgba(52, 211, 153, 0.04);
    }
    .toast {
        background: rgba(40, 30, 70, 0.92);
        border-color: rgba(255, 255, 255, 0.04);
    }
    .toast.success {
        background: rgba(6, 95, 70, 0.75);
    }
    .toast.error {
        background: rgba(153, 27, 27, 0.75);
    }
    .toast.info {
        background: rgba(79, 70, 229, 0.70);
    }
    .no-algo-hint {
        color: #6a6a90;
    }
    .footer {
        border-top-color: rgba(165, 180, 252, 0.04);
        color: #7a7a9a;
    }
    .footer strong {
        color: #8a8aff;
    }
    .footer-divider {
        color: #5a5a7a;
    }
}

@media (prefers-color-scheme: dark) and (max-width: 640px) {
    .app {
        background: rgba(25, 20, 50, 0.88);
    }
    .card {
        background: rgba(255, 255, 255, 0.03);
    }
}
