@font-face {
    font-family: 'Saira';
    src: url('/assets/fonts/Saira_Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
:root {
    --font: 'Saira', sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: #f2f4f7;
    background-image: radial-gradient(circle at 20% 30%, #dce1e9aa 0%, transparent 55%), radial-gradient(circle at 80% 70%, #cdd4dfaa 0%, transparent 55%), linear-gradient(145deg, #f2f4f7 0%, #e8ebf0 100%);
    font-family: var(--font);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 16px;
    padding-top: 20px;
    gap: 16px;
}
.box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid rgba(200, 208, 218, 0.3);
    box-shadow: 0 20px 50px rgba(160, 170, 185, 0.1);
    padding: 20px 20px 12px;
    width: 100%;
    max-width: 480px;
    height: auto;
    display: flex;
    flex-direction: column;
    color: #2c3340;
}
.box-two {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid rgba(200, 208, 218, 0.3);
    box-shadow: 0 20px 50px rgba(160, 170, 185, 0.1);
    padding: 20px 20px 18px;
    width: 100%;
    max-width: 480px;
    height: auto;
    display: flex;
    flex-direction: column;
    color: #2c3340;
}
.box-three {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid rgba(200, 208, 218, 0.3);
    box-shadow: 0 20px 50px rgba(160, 170, 185, 0.1);
    padding: 16px 20px 14px;
    width: 100%;
    max-width: 480px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #2c3340;
}
.feature-card {
    border-radius: 16px;
    border: 1px solid rgba(200, 208, 218, 0.15);
    padding: 12px 14px 10px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0px;
    border-radius: 0 2px 2px 0;
}
.feature-card.encrypt-card {
    background: rgba(242, 244, 247, 0.5);
    border-color: rgba(200, 208, 218, 0.2);
    margin-bottom: 8px;
}
.feature-card.encrypt-card::before {
    background: #8895a7;
}
.feature-card.decrypt-card {
    background: rgba(242, 244, 247, 0.5);
    border-color: rgba(200, 208, 218, 0.2);
}
.feature-card.decrypt-card::before {
    background: #8895a7;
}
.feature-card .section {
    background: transparent;
    border: none;
    padding: 6px 0 4px;
    border-radius: 0;
}
.section {
    background: rgba(230, 235, 242, 0.45);
    border-radius: 14px;
    border: 1px solid rgba(200, 208, 218, 0.15);
    padding: 10px 12px 8px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.section:not(:last-of-type) {
    margin-bottom: 6px;
}
.section-title {
    font-size: 11px;
    color: #7a889a;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    flex-shrink: 0;
    margin-bottom: 4px;
    font-family: var(--font);
    white-space: nowrap;
}
.filename-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    margin-bottom: 4px;
}
.filename-row input[type="text"] {
    flex: 1;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(200, 208, 218, 0.2);
    border-radius: 10px;
    color: #2c3340;
    font-size: 13px;
    padding: 6px 10px;
    height: 34px;
    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
    font-family: var(--font);
}
.filename-row input[type="text"]:focus {
    border-color: rgba(136, 149, 167, 0.4);
    box-shadow: 0 0 16px rgba(136, 149, 167, 0.1);
}
.filename-row input[type="text"]::placeholder {
    color: #a0aab8;
    font-size: 12px;
}
.filename-row .hint {
    width: 34px;
    height: 34px;
    font-size: 13px;
    color: #7a889a;
    font-weight: 500;
    font-family: var(--font);
    border: 1px solid rgba(200, 208, 218, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}
.key-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    margin-bottom: 4px;
}
.key-row input[type="text"] {
    flex: 1;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(200, 208, 218, 0.2);
    border-radius: 10px;
    color: #2c3340;
    font-size: 13px;
    padding: 6px 10px;
    height: 34px;
    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
    font-family: var(--font);
}
.key-row input[type="text"]:focus {
    border-color: rgba(136, 149, 167, 0.4);
    box-shadow: 0 0 16px rgba(136, 149, 167, 0.1);
}
.key-row input[type="text"]::placeholder {
    color: #a0aab8;
    font-size: 11px;
}
.key-row .hint {
    width: 34px;
    height: 34px;
    font-size: 12px;
    color: #7a889a;
    font-family: var(--font);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1px solid rgba(200, 208, 218, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
    flex-shrink: 0;
}
.row {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-top: 4px;
}
.row button {
    flex: 1;
    padding: 8px 6px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font);
}
.btn-primary {
    background: linear-gradient(135deg, #7a889a, #95a3b5);
    color: #fff;
}
.btn-primary:active {
    transform: scale(0.96);
    opacity: 0.85;
}
.btn-secondary {
    background: rgba(200, 208, 218, 0.15);
    color: #7a889a;
    border: 1px solid rgba(200, 208, 218, 0.2);
}
input[type="file"] {
    display: none;
}
.file-display {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(200, 208, 218, 0.12);
    padding: 4px 8px;
    margin-top: 4px;
    overflow-y: auto;
    font-size: 11px;
    color: #2c3340;
    height: 48px;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
    font-family: var(--font);
}
.file-display .empty {
    color: #a0aab8;
    text-align: center;
    line-height: 40px;
    font-size: 11px;
}
.file-display .item {
    padding: 2px 0;
    border-bottom: 1px solid rgba(200, 208, 218, 0.1);
    font-size: 11px;
    color: #2c3340;
    text-align: center;
}
.file-display .item:last-child {
    border-bottom: none;
}
.file-display::-webkit-scrollbar {
    width: 3px;
}
.file-display::-webkit-scrollbar-thumb {
    background: rgba(200, 208, 218, 0.3);
    border-radius: 10px;
}
.drag-zone {
    border: 2px dashed rgba(200, 208, 218, 0.3);
    border-radius: 10px;
    padding: 4px 6px;
    transition: 0.2s;
    cursor: pointer;
}
.drag-zone.dragover {
    border-color: #7a889a;
    background: rgba(200, 208, 218, 0.08);
}
.text-section {
    flex: none;
    min-height: 200px;
    padding: 8px 12px 8px;
}
.text-area-row {
    display: flex;
    gap: 8px;
    height: 160px;
    min-height: 0;
}
.text-area-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.text-area-group label {
    font-size: 10px;
    color: #7a889a;
    flex-shrink: 0;
    margin-bottom: 2px;
    text-align: center;
    letter-spacing: 0.5px;
    font-family: var(--font);
}
.text-area-group textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(200, 208, 218, 0.18);
    border-radius: 8px;
    color: #2c3340;
    font-size: 12px;
    padding: 6px 8px;
    resize: none;
    outline: none;
    transition: 0.2s;
    font-family: 'Courier New', monospace;
    min-height: 50px;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.5;
}
.text-area-group textarea:focus {
    border-color: rgba(136, 149, 167, 0.35);
    box-shadow: 0 0 16px rgba(136, 149, 167, 0.07);
}
.text-area-group textarea::placeholder {
    color: #a0aab8;
    font-size: 11px;
}
.text-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-top: 4px;
}
.text-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font);
}
.text-actions .btn-small-primary {
    background: linear-gradient(135deg, #7a889a, #95a3b5);
    color: #fff;
    flex: 1;
}
.text-actions .btn-small-primary:active {
    transform: scale(0.96);
    opacity: 0.85;
}
.text-actions .btn-small-secondary {
    background: rgba(200, 208, 218, 0.15);
    color: #7a889a;
    border: 1px solid rgba(200, 208, 218, 0.18);
    flex: 1;
}
.text-actions .btn-small-secondary:active {
    transform: scale(0.96);
    background: rgba(200, 208, 218, 0.25);
}
.text-actions .btn-small-green {
    background: rgba(136, 149, 167, 0.15);
    color: #6b7a8e;
    border: 1px solid rgba(136, 149, 167, 0.15);
    flex: 0.5;
}
.text-actions .btn-small-purple {
    background: rgba(136, 149, 167, 0.1);
    color: #7a889a;
    border: 1px solid rgba(136, 149, 167, 0.1);
    flex: 0.5;
}
.bottom-area {
    flex-shrink: 0;
    padding-top: 6px;
}
.bar-bg {
    background: rgba(230, 235, 242, 0.5);
    border-radius: 20px;
    height: 2px;
    overflow: hidden;
    border: 1px solid rgba(200, 208, 218, 0.1);
}
.bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7a889a, #95a3b5);
    border-radius: 20px;
    transition: width 0.25s;
}
.status {
    text-align: center;
    font-size: 11px;
    color: #7a889a;
    padding: 4px 0 0;
    min-height: 20px;
    font-family: var(--font);
}
.status.ok {
    color: #7a889a;
}
.status.err {
    color: #b07a7a;
}
.footer-links {
    text-align: center;
    font-size: 10px;
    color: #a0aab8;
    font-family: var(--font);
}
.footer-links a {
    color: #a0aab8;
    text-decoration: none;
    border-bottom: 1px dashed rgba(200, 208, 218, 0.3);
}
.footer-links span {
    margin: 0 6px;
}
#langButtons {
    display: flex;
    justify-content: center;
    width: 100%;
}
#langSelect {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(200, 208, 218, 0.2);
    border-radius: 8px;
    color: #2c3340;
    font-size: 12px;
    padding: 4px 8px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    width: 100%;
    max-width: 200px;
    display: block;
    margin: 0 auto;
}
.text-status {
    text-align: center;
    font-size: 11px;
    color: #7a889a;
    padding: 4px 0 0;
    min-height: 20px;
    font-family: var(--font);
}
.text-status.ok {
    color: #7a889a;
}
.text-status.err {
    color: #b07a7a;
}

@media (min-width: 600px) {
    body {
        padding: 24px;
        padding-top: 32px;
        gap: 20px;
    }
    .box, .box-two, .box-three {
        padding: 24px 28px 16px;
        max-width: 520px;
        border-radius: 24px;
    }
    .box-two {
        padding: 24px 28px 22px;
    }
    .box-three {
        padding: 18px 28px 16px;
    }
    .feature-card {
        padding: 16px 18px 14px;
        border-radius: 18px;
    }
    .feature-card.encrypt-card {
        margin-bottom: 10px;
    }
    .row button {
        height: 42px;
        font-size: 14px;
    }
    .filename-row input[type="text"] {
        height: 38px;
        font-size: 14px;
        padding: 8px 12px;
    }
    .filename-row .hint {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    .key-row input[type="text"] {
        height: 38px;
        font-size: 14px;
        padding: 8px 12px;
    }
    .key-row .hint {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
    .file-display {
        height: 56px;
        font-size: 12px;
        padding: 6px 10px;
    }
    .file-display .empty {
        line-height: 44px;
        font-size: 12px;
    }
    .text-section {
        padding: 10px 16px 8px;
        min-height: 240px;
    }
    .text-area-row {
        height: 180px;
    }
    .text-area-group textarea {
        font-size: 13px;
        padding: 8px 10px;
        min-height: 70px;
    }
    .text-actions button {
        height: 34px;
        font-size: 13px;
        padding: 8px 16px;
    }
    .status {
        font-size: 12px;
    }
    .text-status {
        font-size: 12px;
    }
    .footer-links {
        font-size: 12px;
    }
    #langSelect {
        font-size: 13px;
        max-width: 220px;
    }
}

@media (max-width: 400px) {
    body {
        padding: 10px;
        padding-top: 12px;
        gap: 12px;
    }
    .box, .box-two, .box-three {
        padding: 14px 12px 10px;
        border-radius: 16px;
    }
    .box-two {
        padding: 14px 12px 12px;
    }
    .box-three {
        padding: 12px 12px 10px;
    }
    .feature-card {
        padding: 8px 8px 6px;
        border-radius: 12px;
    }
    .feature-card.encrypt-card {
        margin-bottom: 6px;
    }
    .section-title {
        font-size: 10px;
        letter-spacing: 0.3px;
    }
    .row button {
        height: 34px;
        font-size: 10px;
        padding: 6px 3px;
        letter-spacing: 0.2px;
    }
    .filename-row input[type="text"] {
        height: 30px;
        font-size: 11px;
        padding: 4px 6px;
    }
    .filename-row .hint {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
    .key-row input[type="text"] {
        height: 30px;
        font-size: 11px;
        padding: 4px 6px;
    }
    .key-row .hint {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }
    .file-display {
        height: 44px;
        font-size: 10px;
        padding: 3px 6px;
    }
    .file-display .empty {
        line-height: 38px;
        font-size: 10px;
    }
    .text-section {
        padding: 4px 6px 4px;
        min-height: 160px;
    }
    .text-area-row {
        height: 130px;
    }
    .text-area-group textarea {
        font-size: 11px;
        padding: 4px 6px;
        min-height: 40px;
    }
    .text-actions button {
        height: 28px;
        font-size: 11px;
        padding: 4px 8px;
    }
    .status {
        font-size: 10px;
    }
    .text-status {
        font-size: 10px;
    }
    .footer-links {
        font-size: 9px;
    }
    #langSelect {
        font-size: 11px;
        max-width: 160px;
        padding: 3px 6px;
    }
}