:root {

    --bg: #07070a;

    --card: #101016;

    --border: rgba(255,255,255,0.08);

    --border-hover: rgba(255,255,255,0.18);

    --text: #f5f5f7;

    --muted: #92929d;

    --accent: #3989ff;

    --accent-light: #8dc9ff;

    --success: #76ffae;

    --danger: #ff7373;

    --max-width: 1050px;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}


body {

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(130,70,255,0.14),
            transparent 40%
        ),
        var(--bg);

    color: var(--text);

    line-height: 1.6;

}


button {

    font: inherit;

    cursor: pointer;

}


a {

    color: inherit;

    text-decoration: none;

}



/* =========================
   NAVBAR
========================= */

.navbar {

    width:
        min(
            var(--max-width),
            calc(100% - 32px)
        );

    height: 76px;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.brand {

    display: flex;

    align-items: center;

    gap: 11px;

}


.brand-symbol {

    width: 38px;

    height: 38px;

    display: grid;

    place-items: center;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: rgba(255,255,255,0.03);

    color: var(--accent-light);

    font-size: 23px;

}


.brand-text {

    display: flex;

    flex-direction: column;

    line-height: 1;

}


.brand-main {

    font-size: 13px;

    font-weight: 800;

    letter-spacing: 1.8px;

}


.brand-sub {

    margin-top: 5px;

    color: var(--accent-light);

    font-size: 9px;

    letter-spacing: 3px;

}


.back-link {

    color: var(--muted);

    font-size: 13px;

}


.back-link:hover {

    color: var(--text);

}



/* =========================
   HERO
========================= */

.tool-hero {

    width:
        min(
            720px,
            calc(100% - 32px)
        );

    margin: 80px auto 50px;

    text-align: center;

}


.tool-badge {

    display: inline-block;

    padding: 6px 12px;

    border: 1px solid var(--border);

    border-radius: 50px;

    color: var(--accent-light);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 2px;

}


.tool-hero h1 {

    margin-top: 20px;

    font-size:
        clamp(
            42px,
            8vw,
            68px
        );

    line-height: 1.02;

    letter-spacing: -3px;

}


.tool-hero h1 span {

    color: var(--accent-light);

}


.tool-hero p {

    max-width: 560px;

    margin: 20px auto 0;

    color: var(--muted);

    font-size: 14px;

}



/* =========================
   DECODER
========================= */

.decoder {

    width:
        min(
            var(--max-width),
            calc(100% - 32px)
        );

    margin: auto;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 14px;

}


.upload-panel,
.result-panel {

    padding: 25px;

    border: 1px solid var(--border);

    border-radius: 18px;

    background: var(--card);

}


.panel-heading {

    margin-bottom: 18px;

}


.section-label {

    color: var(--accent-light);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.8px;

}


.panel-heading h2 {

    margin-top: 2px;

    font-size: 20px;

}



/* =========================
   UPLOAD
========================= */

.upload-area {

    min-height: 250px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 7px;

    padding: 25px;

    border: 1px dashed rgba(255,255,255,0.13);

    border-radius: 13px;

    background: #0a0a0e;

    text-align: center;

    cursor: pointer;

    transition: 0.2s;

}


.upload-area:hover,
.upload-area.dragging {

    border-color:
        rgba(57,137,255,0.65);

    background:
        rgba(57,137,255,0.05);

}


.upload-icon {

    margin-bottom: 5px;

    color: var(--accent-light);

    font-size: 38px;

}


.upload-area strong {

    font-size: 14px;

}


.upload-area > span:not(.upload-button) {

    color: var(--muted);

    font-size: 10px;

}


.upload-button {

    margin-top: 10px;

    padding: 8px 13px;

    border-radius: 8px;

    background:
        rgba(57,137,255,0.12);

    color: var(--accent-light);

    font-size: 11px;

    font-weight: 700;

}


.file-info {

    margin-top: 9px;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color: var(--muted);

    font-size: 10px;

}



/* =========================
   BUTTONS
========================= */

.decode-button,
.copy-button {

    width: 100%;

    height: 48px;

    margin-top: 18px;

    border: 0;

    border-radius: 11px;

    background: var(--accent);

    color: white;

    font-size: 13px;

    font-weight: 700;

    transition: 0.2s;

}


.decode-button:hover,
.copy-button:not(:disabled):hover {

    background: var(--accent-light);

    transform: translateY(-1px);

}


.decode-button:disabled,
.copy-button:disabled {

    opacity: 0.35;

    cursor: not-allowed;

}


.decode-button span,
.copy-button span {

    margin-left: 7px;

}


.clear-button {

    width: 100%;

    margin-top: 9px;

    padding: 10px;

    border: 0;

    background: transparent;

    color: var(--muted);

    font-size: 12px;

}


.clear-button:hover {

    color: var(--text);

}



/* =========================
   RESULT
========================= */

.result-container {

    min-height: 250px;

    display: grid;

    place-items: center;

    padding: 20px;

    border: 1px dashed rgba(255,255,255,0.09);

    border-radius: 13px;

    background: #0a0a0e;

    text-align: center;

}


.result-placeholder {

    color: #5f5f69;

}


.placeholder-icon {

    margin-bottom: 8px;

    color: #77717f;

    font-size: 40px;

}


.result-placeholder p {

    font-size: 11px;

    line-height: 1.5;

}


.result-content {

    display: none;

    width: 100%;

}


.success-icon {

    width: 38px;

    height: 38px;

    margin: 0 auto 12px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        rgba(118,255,174,0.1);

    color: var(--success);

    font-weight: 800;

}


.result-label {

    color: var(--accent-light);

    font-size: 8px;

    font-weight: 800;

    letter-spacing: 1.5px;

}


.decoded-text {

    max-height: 150px;

    margin-top: 9px;

    padding: 12px;

    overflow: auto;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: #07070a;

    color: var(--text);

    font-size: 12px;

    line-height: 1.5;

    text-align: left;

    word-break: break-word;

}


.error-content {

    display: none;

}


.error-icon {

    width: 38px;

    height: 38px;

    margin: 0 auto 12px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        rgba(255,115,115,0.1);

    color: var(--danger);

    font-weight: 800;

}


.error-content strong {

    display: block;

    font-size: 13px;

}


.error-content p {

    max-width: 240px;

    margin: 5px auto 0;

    color: var(--muted);

    font-size: 10px;

}



/* =========================
   INFO
========================= */

.info-section {

    width:
        min(
            var(--max-width),
            calc(100% - 32px)
        );

    margin: 70px auto;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

}


.info-card {

    display: flex;

    gap: 13px;

    padding: 18px;

    border: 1px solid var(--border);

    border-radius: 14px;

    background:
        rgba(255,255,255,0.02);

}


.info-icon {

    color: var(--accent-light);

    font-size: 19px;

}


.info-card h3 {

    font-size: 13px;

}


.info-card p {

    margin-top: 3px;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.5;

}



/* =========================
   FOOTER
========================= */

footer {

    width:
        min(
            var(--max-width),
            calc(100% - 32px)
        );

    margin: auto;

    padding: 25px 0 35px;

    border-top: 1px solid var(--border);

    display: flex;

    justify-content: space-between;

    color: var(--muted);

    font-size: 10px;

}



/* =========================
   MOBILE
========================= */

@media (max-width: 750px) {

    .navbar {

        height: 68px;

    }


    .tool-hero {

        margin-top: 65px;

        margin-bottom: 40px;

    }


    .tool-hero h1 {

        letter-spacing: -2px;

    }


    .decoder {

        grid-template-columns: 1fr;

    }


    .upload-panel,
    .result-panel {

        padding: 20px;

    }


    .info-section {

        grid-template-columns: 1fr;

    }


    footer {

        flex-direction: column;

        gap: 7px;

    }

}