/* 像素风 —— 8位机复古 */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

html, body {
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

body {
    background: #1a1e2c;
    background-image: radial-gradient(circle at 30% 20%, #2b3045 0%, #141824 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    margin: 0;
}

.auth-card {
    max-width: 720px;
    width: 100%;
    background: #2f354a;
    background-image: linear-gradient(145deg, #3b4058, #262b3d);
    padding: 32px 28px 40px;
    border: 6px solid #4f5770;
    box-shadow: 12px 12px 0 #0b0e16,
    inset 0 -6px 0 #1c2130,
    inset 0 6px 0 #5b6480;
    position: relative;
    transition: 0.05s linear;
    image-rendering: pixelated;
    margin: 10px 0;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border: 4px solid #4f5770;
    border-style: solid;
    pointer-events: none;
    image-rendering: pixelated;
}

/* 响应式调整 — 适配移动端 */
@media (max-width: 640px) {
    body {
        padding: 12px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .auth-card {
        padding: 20px 16px 28px;
        border-width: 4px;
        box-shadow: 8px 8px 0 #0b0e16, inset 0 -4px 0 #1c2130, inset 0 4px 0 #5b6480;
        margin: 0;
    }

    .auth-card::before {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
        border-width: 3px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
        padding-top: 12px;
    }

    .auth-card {
        padding: 16px 12px 24px;
        border-width: 3px;
        box-shadow: 6px 6px 0 #0b0e16, inset 0 -3px 0 #1c2130, inset 0 3px 0 #5b6480;
    }

    .auth-card::before {
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
        border-width: 2px;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    image-rendering: pixelated;
}

.brand-icon {
    width: 64px;
    height: 64px;
    background: #4d5b7a;
    border: 4px solid #2d334a;
    box-shadow: 6px 6px 0 #0f121e, inset -4px -4px 0 #1b2133;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #d7e3ff;
    text-shadow: 3px 3px 0 #18202e;
    font-family: 'Press Start 2P', monospace;
    image-rendering: pixelated;
    transform: scale(1);
    line-height: 1;
    flex-shrink: 0;
}

.brand h1 {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 2px;
    color: #d4e2ff;
    text-shadow: 5px 5px 0 #121826, 0 0 0 #000;
    font-family: 'Press Start 2P', monospace;
    word-break: break-word;
    line-height: 1.3;
}

.brand h1 small {
    font-size: 18px;
    color: #a2b6e0;
    text-shadow: 3px 3px 0 #121826;
    display: inline-block;
    margin-left: 6px;
    font-weight: 400;
}

@media (max-width: 480px) {
    .brand {
        gap: 12px;
        margin-bottom: 20px;
    }

    .brand-icon {
        width: 48px;
        height: 48px;
        font-size: 26px;
        border-width: 3px;
        box-shadow: 4px 4px 0 #0f121e, inset -3px -3px 0 #1b2133;
    }

    .brand h1 {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .brand h1 small {
        font-size: 14px;
        margin-left: 4px;
    }
}

@media (max-width: 380px) {
    .brand h1 {
        font-size: 16px;
    }

    .brand h1 small {
        font-size: 12px;
        display: block;
        margin-left: 0;
    }

    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #b8cbf5;
    text-shadow: 3px 3px 0 #151b2a;
    margin-bottom: 8px;
    letter-spacing: 1px;
    font-family: 'Press Start 2P', monospace;
}

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 11px;
        margin-bottom: 6px;
    }
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-wrapper input,
.input-wrapper textarea {
    width: 100%;
    padding: 14px 16px;
    background: #1f253a;
    border: 4px solid #39405a;
    box-shadow: inset 4px 4px 0 #0f1320, 0 0 0 0 #000;
    font-size: 18px;
    color: #e6f0ff;
    outline: none;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    transition: 0.02s linear;
    image-rendering: pixelated;
    letter-spacing: 1px;
    min-width: 0;
    box-sizing: border-box;
}

.input-wrapper input {
    padding-right: 60px;
}

.input-wrapper textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
    color: #5a688a;
    font-size: 12px;
    opacity: 0.8;
    text-shadow: 2px 2px 0 #0d111e;
}

.input-wrapper input:focus,
.input-wrapper textarea:focus {
    border-color: #7d92c0;
    background: #252d48;
    box-shadow: inset 4px 4px 0 #0f1320, 0 0 0 4px #3d4663;
}

@media (max-width: 480px) {
    .input-wrapper input,
    .input-wrapper textarea {
        padding: 12px 14px;
        font-size: 14px;
        border-width: 3px;
        box-shadow: inset 3px 3px 0 #0f1320;
    }

    .input-wrapper input {
        padding-right: 50px;
    }

    .input-wrapper textarea {
        min-height: 60px;
    }

    .input-wrapper input::placeholder,
    .input-wrapper textarea::placeholder {
        font-size: 10px;
    }
}

@media (max-width: 380px) {
    .input-wrapper input,
    .input-wrapper textarea {
        font-size: 12px;
        padding: 10px 12px;
        letter-spacing: 0.5px;
    }

    .input-wrapper input {
        padding-right: 44px;
    }

    .input-wrapper textarea {
        min-height: 50px;
    }
}

.day {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    /*background: #2d344b;*/
    /*border: 4px solid #3d4663;*/
    color: #b8cbf5;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    /*cursor: pointer;*/
    /*box-shadow: inset 3px 3px 0 #101624, 4px 4px 0 #0b0f1a;*/
    transition: 0.04s linear;
    font-family: 'Press Start 2P', monospace;
    image-rendering: pixelated;
    padding: 0;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}

.toggle-pwd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #2d344b;
    border: 4px solid #3d4663;
    color: #b8cbf5;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: inset 3px 3px 0 #101624, 4px 4px 0 #0b0f1a;
    transition: 0.04s linear;
    font-family: 'Press Start 2P', monospace;
    image-rendering: pixelated;
    padding: 0;
    line-height: 1;
    user-select: none;
    flex-shrink: 0;
}

.toggle-pwd:hover {
    background: #3d4663;
    border-color: #5b6480;
    transform: translateY(-50%) scale(1.02);
}

.toggle-pwd:active {
    transform: translateY(-50%) scale(0.94);
    box-shadow: inset 3px 3px 0 #0b0f1a, 2px 2px 0 #0b0f1a;
}

@media (max-width: 480px) {
    .toggle-pwd {
        width: 36px;
        height: 36px;
        font-size: 14px;
        right: 8px;
        border-width: 3px;
        box-shadow: inset 2px 2px 0 #101624, 3px 3px 0 #0b0f1a;
    }
}

@media (max-width: 380px) {
    .toggle-pwd {
        width: 32px;
        height: 32px;
        font-size: 12px;
        right: 6px;
        border-width: 2px;
    }
}

.auth-action {
    margin: 16px 0 30px;
}

@media (max-width: 480px) {
    .auth-action {
        margin: 12px 0 20px;
    }
}

.btn-primary {
    width: 100%;
    padding: 18px 10px;
    background: #4f6b9e;
    border: none;
    border-bottom: 6px solid #1f2d4a;
    border-right: 6px solid #1f2d4a;
    border-left: 4px solid #7188b0;
    border-top: 4px solid #7188b0;
    font-size: 24px;
    font-weight: 400;
    color: #f0f6ff;
    cursor: pointer;
    text-shadow: 4px 4px 0 #1c2640;
    font-family: 'Press Start 2P', monospace;
    letter-spacing: 2px;
    transition: 0.04s linear;
    box-shadow: 8px 8px 0 #0b0f1a;
    image-rendering: pixelated;
    background-image: linear-gradient(145deg, #5875a8, #3d5780);
    white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
    background: #5f7fb8;
    background-image: linear-gradient(145deg, #6a8ac0, #45629a);
    border-bottom-color: #2b3d62;
    border-right-color: #2b3d62;
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0 #0b0f1a;
}

.btn-primary:active:not(:disabled) {
    transform: translate(4px, 4px);
    box-shadow: 4px 4px 0 #0b0f1a;
    border-bottom-width: 4px;
    border-right-width: 4px;
}

.btn-primary:disabled {
    opacity: 0.5;
    transform: translate(4px, 4px);
    box-shadow: 4px 4px 0 #0b0f1a;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

@media (max-width: 480px) {
    .btn-primary {
        font-size: 18px;
        padding: 14px 8px;
        border-bottom-width: 4px;
        border-right-width: 4px;
        border-left-width: 3px;
        border-top-width: 3px;
        box-shadow: 6px 6px 0 #0b0f1a;
        letter-spacing: 1px;
    }

    .btn-primary:hover:not(:disabled) {
        transform: translate(-1px, -1px);
        box-shadow: 7px 7px 0 #0b0f1a;
    }

    .btn-primary:active:not(:disabled) {
        transform: translate(3px, 3px);
        box-shadow: 3px 3px 0 #0b0f1a;
    }
}

@media (max-width: 380px) {
    .btn-primary {
        font-size: 14px;
        padding: 12px 6px;
        letter-spacing: 0.5px;
    }
}

.result-area {
    background: #222b40;
    border: 4px solid #3d4663;
    padding: 16px 18px 16px 22px;
    box-shadow: inset 4px 4px 0 #101624, 6px 6px 0 #0b0f1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    image-rendering: pixelated;
    margin-top: 4px;
}

.result-area .code-box {
    flex: 1;
    min-width: 120px;
    word-break: break-all;
}

.result-area .code-label {
    font-size: 12px;
    letter-spacing: 2px;
    color: #8a9fc9;
    text-shadow: 2px 2px 0 #121826;
    font-family: 'Press Start 2P', monospace;
    margin-bottom: 6px;
}

.result-area .auth-code {
    font-size: 20px;
    font-weight: 400;
    color: #dbe8ff;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    word-break: break-all;
    text-shadow: 3px 3px 0 #131b2b;
    letter-spacing: 1px;
    line-height: 1.4;
}

.result-area .auth-code.placeholder {
    color: #5a6d94;
    text-shadow: 2px 2px 0 #101624;
    font-size: 16px;
}

@media (max-width: 480px) {
    .result-area {
        padding: 12px 14px 12px 16px;
        border-width: 3px;
        box-shadow: inset 3px 3px 0 #101624, 4px 4px 0 #0b0f1a;
        gap: 8px;
    }

    .result-area .code-label {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .result-area .auth-code {
        font-size: 15px;
        letter-spacing: 0.5px;
    }

    .result-area .auth-code.placeholder {
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .result-area .auth-code {
        font-size: 13px;
    }

    .result-area {
        padding: 10px 10px 10px 12px;
    }
}

.btn-copy {
    background: #3e4f72;
    border: none;
    border-bottom: 6px solid #1e2a44;
    border-right: 6px solid #1e2a44;
    border-left: 4px solid #5d74a0;
    border-top: 4px solid #5d74a0;
    padding: 12px 20px;
    color: #e6f0ff;
    font-size: 16px;
    font-weight: 400;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    box-shadow: 6px 6px 0 #0b0f1a;
    transition: 0.04s linear;
    display: flex;
    align-items: center;
    gap: 10px;
    image-rendering: pixelated;
    letter-spacing: 1px;
    background-image: linear-gradient(145deg, #4b5f88, #334467);
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-copy:hover:not(:disabled) {
    background: #536b98;
    background-image: linear-gradient(145deg, #5f77a8, #3d5280);
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 #0b0f1a;
}

.btn-copy:active:not(:disabled) {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 #0b0f1a;
    border-bottom-width: 4px;
    border-right-width: 4px;
}

.btn-copy:disabled {
    opacity: 0.4;
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 #0b0f1a;
    cursor: not-allowed;
}

.btn-copy svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #dbe8ff;
    stroke-width: 3;
    stroke-linecap: square;
    stroke-linejoin: miter;
    image-rendering: pixelated;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .btn-copy {
        padding: 10px 14px;
        font-size: 13px;
        border-bottom-width: 4px;
        border-right-width: 4px;
        border-left-width: 3px;
        border-top-width: 3px;
        box-shadow: 4px 4px 0 #0b0f1a;
        gap: 6px;
    }

    .btn-copy svg {
        width: 18px;
        height: 18px;
    }

    .btn-copy:hover:not(:disabled) {
        transform: translate(-1px, -1px);
        box-shadow: 5px 5px 0 #0b0f1a;
    }

    .btn-copy:active:not(:disabled) {
        transform: translate(3px, 3px);
        box-shadow: 1px 1px 0 #0b0f1a;
    }
}

@media (max-width: 380px) {
    .btn-copy {
        font-size: 11px;
        padding: 8px 10px;
        gap: 4px;
    }

    .btn-copy svg {
        width: 15px;
        height: 15px;
    }
}

/* 右下角 — 完全响应式 */
.footer-meta {
    position: absolute;
    bottom: 24px;
    right: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #232b40;
    border: 4px solid #3d4663;
    padding: 8px 20px 8px 16px;
    box-shadow: 6px 6px 0 #0b0f1a, inset 3px 3px 0 #101624;
    font-size: 13px;
    color: #bdd0f0;
    font-family: 'Press Start 2P', monospace;
    flex-wrap: wrap;
    justify-content: flex-end;
    image-rendering: pixelated;
    letter-spacing: 0.5px;
    backdrop-filter: none;
    max-width: 90%;
}

.footer-meta .stat-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.footer-meta .stat-item span:first-child {
    color: #839bc7;
    text-shadow: 2px 2px 0 #101624;
    font-size: 11px;
}

.footer-meta .stat-item .num {
    font-weight: 400;
    font-size: 16px;
    color: #e3f0ff;
    text-shadow: 3px 3px 0 #111a2a;
    font-family: 'Press Start 2P', monospace;
}

.footer-meta .divider {
    width: 4px;
    height: 24px;
    background: #3d4a68;
    border: 2px solid #1e2640;
    image-rendering: pixelated;
}

.footer-meta .logo-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #394b6b;
    border: 4px solid #1e2a44;
    padding: 4px 14px 4px 8px;
    box-shadow: inset 3px 3px 0 #121c30;
}

.footer-meta .logo-badge .logo-icon {
    width: 32px;
    height: 32px;
    background: #2b3d60;
    border: 4px solid #1a253f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #dae5ff;
    text-shadow: 3px 3px 0 #101a2a;
    font-family: 'Press Start 2P', monospace;
    box-shadow: inset -3px -3px 0 #101a2a;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.footer-meta .logo-badge .logo-text {
    font-weight: 400;
    color: #dae5ff;
    text-shadow: 3px 3px 0 #121c30;
    font-size: 18px;
    letter-spacing: 1px;
    font-family: 'Press Start 2P', monospace;
}

@media (max-width: 768px) {
    .footer-meta {
        bottom: 16px;
        right: 16px;
        padding: 6px 14px 6px 12px;
        gap: 10px;
        font-size: 11px;
        border-width: 3px;
        box-shadow: 4px 4px 0 #0b0f1a, inset 2px 2px 0 #101624;
    }

    .footer-meta .stat-item span:first-child {
        font-size: 9px;
    }

    .footer-meta .stat-item .num {
        font-size: 13px;
    }

    .footer-meta .divider {
        height: 18px;
        width: 3px;
        border-width: 1px;
    }

    .footer-meta .logo-badge {
        padding: 2px 10px 2px 6px;
        border-width: 3px;
        gap: 6px;
    }

    .footer-meta .logo-badge .logo-icon {
        width: 24px;
        height: 24px;
        font-size: 14px;
        border-width: 3px;
        box-shadow: inset -2px -2px 0 #101a2a;
    }

    .footer-meta .logo-badge .logo-text {
        font-size: 14px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    .footer-meta {
        bottom: 12px;
        right: 12px;
        padding: 5px 10px 5px 8px;
        gap: 6px;
        font-size: 9px;
        border-width: 2px;
        box-shadow: 3px 3px 0 #0b0f1a, inset 2px 2px 0 #101624;
        flex-wrap: wrap;
    }

    .footer-meta .stat-item span:first-child {
        font-size: 8px;
        text-shadow: 1px 1px 0 #101624;
    }

    .footer-meta .stat-item .num {
        font-size: 11px;
        text-shadow: 2px 2px 0 #111a2a;
    }

    .footer-meta .divider {
        height: 14px;
        width: 2px;
        border-width: 1px;
    }

    .footer-meta .logo-badge {
        padding: 2px 6px 2px 4px;
        border-width: 2px;
        gap: 4px;
    }

    .footer-meta .logo-badge .logo-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
        border-width: 2px;
        box-shadow: inset -2px -2px 0 #101a2a;
    }

    .footer-meta .logo-badge .logo-text {
        font-size: 11px;
        letter-spacing: 0.3px;
        text-shadow: 2px 2px 0 #121c30;
    }
}

@media (max-width: 380px) {
    .footer-meta {
        bottom: 8px;
        right: 8px;
        padding: 4px 8px 4px 6px;
        gap: 4px;
        font-size: 7px;
        border-width: 2px;
        box-shadow: 2px 2px 0 #0b0f1a;
    }

    .footer-meta .stat-item .num {
        font-size: 9px;
    }

    .footer-meta .logo-badge .logo-text {
        font-size: 9px;
    }

    .footer-meta .logo-badge .logo-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
}

.hint {
    font-size: 12px;
    color: #7c91bb;
    text-shadow: 2px 2px 0 #101624;
    margin-top: 22px;
    text-align: center;
    border-top: 4px solid #384363;
    padding-top: 18px;
    letter-spacing: 1px;
    font-family: 'Press Start 2P', monospace;
}

.hint span {
    background: #1f273f;
    padding: 4px 12px;
    border: 3px solid #384363;
    color: #bbd0f0;
    box-shadow: inset 2px 2px 0 #0b1020;
    display: inline-block;
}

@media (max-width: 480px) {
    .hint {
        font-size: 10px;
        margin-top: 16px;
        padding-top: 14px;
        border-top-width: 3px;
    }

    .hint span {
        padding: 3px 8px;
        border-width: 2px;
    }
}

@media (max-width: 380px) {
    .hint {
        font-size: 8px;
        margin-top: 12px;
        padding-top: 10px;
    }

    .hint span {
        padding: 2px 6px;
        border-width: 2px;
    }
}

.fade-in {
    animation: pixelFade 0.2s steps(4);
}

@keyframes pixelFade {
    0% {
        opacity: 0.2;
        transform: scale(0.95) translateX(-4px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

::-webkit-scrollbar {
    width: 12px;
    background: #1f253a;
    border: 2px solid #3d4663;
}

::-webkit-scrollbar-thumb {
    background: #4f6b9e;
    border: 2px solid #1f2d4a;
}