/*
 * 深眠协议 — 黑暗主题样式
 * deep-sleep-protocol.html 专属样式
 * 与 ARG 方框的暗色调设计相协调
 */

/* ============================================================
 *  全局暗色覆盖
 * ============================================================ */

.deep-sleep-head {
    background-color: #0a0a14 !important;
    background-image: none !important;
    height: 200px !important;
    position: relative;
    overflow: hidden;
}

/* 页首顶部微光 */
.deep-sleep-head::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 50% 80%, rgba(180, 0, 0, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 50%, rgba(60, 60, 120, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(60, 60, 120, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.deep-sleep-head > .title,
.deep-sleep-head > .typed-cursor {
    margin-top: 80px !important;
    color: #c0b0a0 !important;
    text-shadow: 0 0 20px rgba(200, 100, 50, 0.4), 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* ============================================================
 *  倒计时区域
 * ============================================================ */

.countdown-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    max-width: 1050px;
    margin: 40px auto 0 auto;
    padding: 32px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #14142a 0%, #1a1a34 50%, #111122 100%);
    border: 1px solid rgba(180, 0, 0, 0.25);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    box-sizing: border-box;
}

.countdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: bold;
    color: #b0a090;
    letter-spacing: 2px;
}

.countdown-header i {
    color: #c04030;
    font-size: 20px;
    animation: hourglass-pulse 2s ease-in-out infinite;
}

@keyframes hourglass-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.countdown-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: linear-gradient(180deg, #1c1c36 0%, #12122a 100%);
    border: 1px solid rgba(200, 50, 30, 0.3);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 0 30px rgba(200, 0, 0, 0.08);
    font-size: 36px;
    font-weight: bold;
    font-family: "Linotte", "HYZhengYuan", monospace;
    color: #e0c0a0;
    text-shadow: 0 0 12px rgba(200, 100, 50, 0.5);
    transition: box-shadow 0.5s ease;
}

.countdown-label {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(180, 160, 140, 0.6);
    letter-spacing: 2px;
}

.countdown-separator {
    font-size: 32px;
    font-weight: bold;
    color: rgba(200, 50, 30, 0.5);
    margin: 0 4px;
    align-self: flex-start;
    margin-top: 14px;
}

/* ============================================================
 *  主内容区
 * ============================================================ */

.deep-sleep-container {
    display: flex;
    justify-content: center;
    width: 80%;
    max-width: 1050px;
    margin: 24px auto 0 auto;
}

.deep-sleep-content {
    width: 100%;
    border-radius: 16px;
    padding: 40px 46px;
    background: linear-gradient(180deg, #14142a 0%, #111122 100%);
    border: 1px solid rgba(180, 0, 0, 0.2);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    box-sizing: border-box;
}

/* 协议标题 */
.protocol-header {
    text-align: center;
    margin-bottom: 36px;
}

.protocol-title {
    font-size: 32px;
    font-weight: bold;
    color: #e0d0c0;
    letter-spacing: 6px;
    margin: 0 0 12px 0;
    text-shadow:
        0 0 15px rgba(200, 100, 50, 0.4),
        0 0 40px rgba(200, 50, 20, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.5);
}

.protocol-divider {
    width: 120px;
    height: 2px;
    margin: 0 auto 12px auto;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(200, 50, 30, 0.6) 30%,
        rgba(200, 50, 30, 0.8) 50%,
        rgba(200, 50, 30, 0.6) 70%,
        transparent 100%
    );
}

.protocol-subtitle {
    font-size: 13px;
    color: rgba(180, 160, 140, 0.5);
    letter-spacing: 3px;
    margin: 0;
}

/* 协议内容区 */
.protocol-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.protocol-section {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.protocol-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(200, 50, 30, 0.1);
    font-size: 20px;
    color: #c04030;
}

.protocol-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: #a09080;
}

.status-locked {
    color: #c04030;
    font-weight: bold;
    letter-spacing: 1px;
}

/* 加密提示区 */
.encrypted-notice {
    border-color: rgba(200, 50, 30, 0.15);
}

.encrypted-notice .protocol-icon {
    background: rgba(200, 50, 30, 0.12);
}

/* 提示区域 */
.hint-section {
    justify-content: center;
    text-align: center;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.06);
}

.hint-text {
    margin: 0;
    font-size: 13px;
    color: rgba(160, 140, 120, 0.6);
    letter-spacing: 1px;
}

.hint-text i {
    margin-right: 6px;
    color: rgba(200, 150, 100, 0.5);
}

/* ============================================================
 *  密钥输入区
 * ============================================================ */

.key-input-section {
    border-color: rgba(200, 150, 100, 0.2) !important;
}

.key-input-section .protocol-icon {
    background: rgba(200, 150, 100, 0.1) !important;
    color: #c09060 !important;
}

.key-input-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.key-input-label {
    margin: 0;
    font-size: 14px;
    color: #a09080;
    letter-spacing: 1px;
}

.key-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.key-input-field {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(200, 150, 100, 0.25);
    color: #d0c0b0;
    font-family: "Linotte", "HYZhengYuan", sans-serif;
    font-size: 15px;
    letter-spacing: 1px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.key-input-field::placeholder {
    color: rgba(160, 140, 120, 0.4);
}

.key-input-field:focus {
    border-color: rgba(200, 150, 100, 0.5);
    box-shadow: 0 0 16px rgba(200, 100, 30, 0.15);
}

.key-submit-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(200, 100, 30, 0.3), rgba(180, 60, 20, 0.25));
    border: 1px solid rgba(200, 100, 50, 0.35);
    color: #d0b090;
    font-family: "Linotte", "HYZhengYuan", sans-serif;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.key-submit-btn:hover {
    background: linear-gradient(135deg, rgba(200, 100, 30, 0.45), rgba(180, 60, 20, 0.4));
    border-color: rgba(200, 100, 50, 0.55);
    box-shadow: 0 4px 16px rgba(200, 50, 20, 0.25);
    color: #e0c8a0;
}

.key-submit-btn:active {
    transform: scale(0.97);
}

.key-input-hint {
    margin: 0;
    font-size: 11px;
    color: rgba(160, 140, 120, 0.4);
    letter-spacing: 1px;
}

/* ============================================================
 *  解密结果展示区
 * ============================================================ */

.result-section {
    border-color: rgba(200, 150, 100, 0.2) !important;
    animation: result-fade-in 0.4s ease-out;
}

@keyframes result-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section .protocol-icon {
    background: rgba(200, 150, 100, 0.1) !important;
    color: #c09060 !important;
}

.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #e0c8a0;
    letter-spacing: 2px;
}

.result-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(200, 150, 100, 0.5) 0%,
        rgba(200, 150, 100, 0.1) 100%
    );
}

.result-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
    color: #b0a090;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ============================================================
 *  附件下载列表
 * ============================================================ */

.attachments-list {
    margin-top: 4px;
}

.attachments-divider {
    width: 100%;
    height: 1px;
    margin: 4px 0 14px 0;
    background: linear-gradient(
        90deg,
        rgba(200, 150, 100, 0.2) 0%,
        rgba(200, 150, 100, 0.08) 60%,
        transparent 100%
    );
}

.attachments-label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: bold;
    color: #b0a090;
    letter-spacing: 1px;
}

.attachments-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(200, 150, 100, 0.12);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.attachment-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(200, 150, 100, 0.25);
}

.attachment-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.attachment-name {
    font-size: 13px;
    color: #c0b0a0;
    letter-spacing: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-status {
    font-size: 11px;
    letter-spacing: 1px;
}

.att-status-available {
    color: rgba(140, 180, 140, 0.7);
}

.att-status-depleted {
    color: rgba(200, 80, 60, 0.7);
}

.att-status-offline {
    color: rgba(200, 160, 60, 0.7);
}

.attachment-download-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(200, 100, 30, 0.25), rgba(180, 60, 20, 0.2));
    border: 1px solid rgba(200, 100, 50, 0.3);
    color: #d0b090;
    font-family: "Linotte", "HYZhengYuan", sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.attachment-download-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(200, 100, 30, 0.4), rgba(180, 60, 20, 0.35));
    border-color: rgba(200, 100, 50, 0.5);
    box-shadow: 0 2px 12px rgba(200, 50, 20, 0.2);
    color: #e0c8a0;
    transform: translateY(-1px);
}

.attachment-download-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.attachment-download-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(30%);
}

/* 页脚 — 暗色版 */
.deep-sleep-footer {
    background-color: #0a0a14 !important;
    color: #605850 !important;
    box-shadow: inset 0 -4px 8px 6px rgba(0, 0, 0, 0.3) !important;
}

.deep-sleep-footer .icp-link {
    color: #807060 !important;
}

.deep-sleep-footer a {
    color: #908070 !important;
}

/* ============================================================
 *  响应式设计
 * ============================================================ */

@media (max-width: 768px) {
    .deep-sleep-head {
        height: 140px !important;
    }

    .deep-sleep-head > .title,
    .deep-sleep-head > .typed-cursor {
        margin-top: 50px !important;
        font-size: 22px !important;
    }

    .countdown-section {
        width: 92%;
        padding: 20px 12px;
        margin-top: 24px;
    }

    .countdown-header {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .countdown-number {
        width: 60px;
        height: 60px;
        font-size: 26px;
        border-radius: 10px;
    }

    .countdown-item {
        min-width: 52px;
    }

    .countdown-separator {
        font-size: 24px;
        margin: 0 2px;
        margin-top: 10px;
    }

    .countdown-label {
        font-size: 11px;
    }

    .deep-sleep-container {
        width: 92%;
    }

    .deep-sleep-content {
        padding: 24px 18px;
    }

    .protocol-title {
        font-size: 24px;
        letter-spacing: 3px;
    }

    .protocol-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px;
    }

    .protocol-text {
        font-size: 13px;
    }

    .key-input-row {
        flex-direction: column;
        gap: 8px;
    }

    .key-submit-btn {
        width: 100%;
        justify-content: center;
    }

    .result-title {
        font-size: 16px;
    }

    .attachment-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .attachment-download-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
}

/* 中屏 */
@media (min-width: 769px) and (max-width: 1024px) {
    .countdown-number {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }

    .countdown-section {
        width: 88%;
    }

    .deep-sleep-container {
        width: 88%;
    }
}
