/* =========================================
   Base
========================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #080a0d;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% 0%,
            #161a20 0%,
            #0d1014 35%,
            #080a0d 70%
        );

    color: #e7e9ec;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* =========================================
   Page Layout
========================================= */

.ots-page {
    width: 100%;
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 32px 20px;
}


/* =========================================
   Main Card
========================================= */

.ots-card {
    width: 100%;
    max-width: 680px;

    background: rgba(18, 21, 26, 0.96);

    border: 1px solid #292e36;

    border-radius: 18px;

    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.45),
        0 4px 20px rgba(0, 0, 0, 0.25);

    overflow: hidden;
}


/* =========================================
   Header
========================================= */

.ots-header {
    padding: 30px 32px;

    border-bottom: 1px solid #252a31;
}

.ots-brand {
    display: flex;

    align-items: center;

    gap: 16px;
}

.ots-icon {
    width: 46px;
    height: 46px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #1d2229;

    border: 1px solid #303640;

    border-radius: 12px;
}

.ots-icon svg {
    width: 23px;
    height: 23px;

    fill: none;

    stroke: #b8bec7;

    stroke-width: 1.5;

    stroke-linecap: round;
    stroke-linejoin: round;
}

.ots-brand h1 {
    margin: 0;

    color: #f1f3f5;

    font-size: 20px;

    font-weight: 600;

    letter-spacing: -0.02em;
}

.ots-subtitle {
    margin: 5px 0 0;

    color: #858c96;

    font-size: 14px;

    line-height: 1.5;
}


/* =========================================
   Secret Section
========================================= */

.secret-section {
    padding: 28px 32px 30px;
}

.secret-label-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 10px;
}

.secret-label {
    color: #9da4ad;

    font-size: 13px;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.08em;
}


/* =========================================
   Copy Button
========================================= */

.copy-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    min-width: 82px;
    height: 36px;

    padding: 0 12px;

    color: #cdd2d9;

    background: #1b2026;

    border: 1px solid #323841;

    border-radius: 8px;

    font-family: inherit;

    font-size: 13px;

    font-weight: 500;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.1s ease;
}

.copy-button:hover {
    color: #f1f3f5;

    background: #242a32;

    border-color: #454d57;
}

.copy-button:active {
    transform: translateY(1px);
}

.copy-button:focus-visible {
    outline: 2px solid #858d98;

    outline-offset: 2px;
}

.copy-icon {
    width: 16px;
    height: 16px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================
   Secret Container
========================================= */

.secret-container {
    position: relative;

    width: 100%;

    min-height: 180px;

    padding: 22px;

    background: #0b0d10;

    border: 1px solid #292e36;

    border-radius: 12px;

    overflow: auto;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.secret-container:focus-visible {
    border-color: #555d68;

    box-shadow:
        0 0 0 2px rgba(130, 140, 150, 0.12);
}

.secret-container pre {
    margin: 0;

    color: #e4e7eb;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        Menlo,
        monospace;

    font-size: 14px;

    line-height: 1.7;

    white-space: pre-wrap;

    overflow-wrap: anywhere;

    word-break: break-word;
}


/* =========================================
   Copy Status
========================================= */

.copy-status {
    min-height: 22px;

    margin-top: 8px;

    color: #8f98a3;

    font-size: 13px;

    text-align: right;

    opacity: 0;

    transition:
        opacity 0.2s ease;
}

.copy-status.visible {
    opacity: 1;
}


/* =========================================
   Footer
========================================= */

.ots-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 16px 32px;

    background: #101318;

    border-top: 1px solid #252a31;

    color: #707883;

    font-size: 12px;
}

.security-indicator {
    display: flex;

    align-items: center;

    gap: 7px;
}

.security-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #6e7782;

    box-shadow:
        0 0 0 3px rgba(110, 119, 130, 0.1);
}

.ots-footer-text {
    color: #5f6670;
}

.copy-button:disabled {
    color: #626872;

    background: #15181c;

    border-color: #24282e;

    cursor: not-allowed;

    opacity: 0.7;
}

.copy-button:disabled:hover {
    color: #626872;

    background: #15181c;

    border-color: #24282e;
}

.secret-container.is-expired {
    color: #858b94;
}

.ots-error-content {
    padding: 30px 32px;

    color: #9da4ad;

    font-size: 14px;

    line-height: 1.7;
}

.ots-error-content p {
    margin: 0 0 16px;
}

.ots-error-content p:last-child {
    margin-bottom: 0;
}

.ots-error-card .ots-icon svg {
    stroke: #9da1a8;
}

/* =========================================
   Mobile
========================================= */

@media (max-width: 600px) {

    .ots-page {
        padding: 16px;
    }

    .ots-card {
        border-radius: 14px;
    }

    .ots-header {
        padding: 24px;
    }

    .secret-section {
        padding: 24px;
    }

    .ots-footer {
        padding: 15px 24px;
    }

    .ots-subtitle {
        font-size: 13px;
    }

    .secret-container {
        min-height: 160px;

        padding: 18px;
    }

    .secret-container pre {
        font-size: 13px;
    }

    .copy-button-text {
        display: none;
    }

    .copy-button {
        min-width: 38px;

        width: 38px;

        padding: 0;
    }

    .ots-error-content {
        padding: 24px;
    }

}