* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f4f4f4;
    color: #222;
    margin: 0;
    padding: 40px 16px;
}

.container {
    background-color: #ffffff;
    padding: 32px 40px;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}

h1 {
    margin: 0 0 24px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

h2 {
    margin: 28px 0 12px;
    font-size: 18px;
    font-weight: 600;
}

p {
    margin: 10px 0;
    line-height: 1.7;
    color: #444;
}

/* 表单布局：登录 / 注册更紧凑、居中 */
form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    max-width: 380px;
    margin: 0 auto 10px;
}

label {
    font-size: 14px;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    padding: 9px 11px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    background-color: #fafafa;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #777;
    background-color: #ffffff;
}

button {
    padding: 10px 14px;
    margin-top: 6px;
    background-color: #111;
    color: #ffffff;
    border: 1px solid #111;
    border-radius: 999px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.08s ease;
}

button:hover {
    background-color: #ffffff;
    color: #111;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* 链接与动作区域 */
a {
    color: #222;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.link-row {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    justify-content: center;
    font-size: 14px;
}

.error {
    margin: 0 auto 16px;
    max-width: 480px;
    padding: 10px 12px;
    border-left: 3px solid #888;
    background-color: #f5f5f5;
    color: #555;
    font-size: 14px;
}

.success {
    margin: 0 auto 16px;
    max-width: 480px;
    padding: 10px 12px;
    border-left: 3px solid #111;
    background-color: #f0f0f0;
    color: #222;
    font-size: 14px;
}

/* 折叠区域（用于用户中心密码修改） */
.collapsed-section {
    display: none;
}

.ghost-button {
    margin: 8px 0 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #bbb;
    background-color: #fff;
    color: #222;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.08s ease;
}

.ghost-button:hover {
    background-color: #111;
    color: #fff;
    border-color: #111;
    transform: translateY(-1px);
}

/* 列表：题目 / 附件列表更像卡片 */
ul {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

li {
    margin: 0 0 8px;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;
    transition: background-color 0.2s ease, transform 0.08s ease, border-color 0.2s ease;
}

li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #222;
    font-size: 14px;
}

li:hover {
    background-color: #ffffff;
    border-color: #cfcfcf;
    transform: translateY(-1px);
}

/* 主页及用户中心的提示文案 */
.container > p:first-of-type {
    margin-top: 4px;
}

/* 响应式优化 */
@media (max-width: 600px) {
    body {
        padding: 20px 10px;
    }

    .container {
        padding: 24px 20px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    }

    h1 {
        font-size: 20px;
    }
}

/* ===== 积分排行榜：炫酷但黑白极简 ===== */
.ranking-container {
    position: relative;
    overflow: hidden;
}

.ranking-container::before {
    content: "";
    position: absolute;
    inset: -80px;
    background: radial-gradient(circle at 0% 0%, rgba(0,0,0,0.09), transparent 60%),
                radial-gradient(circle at 100% 100%, rgba(0,0,0,0.06), transparent 55%);
    opacity: 0.9;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.ranking-title {
    position: relative;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.ranking-subtitle {
    position: relative;
    margin-top: -4px;
    font-size: 13px;
    color: #666;
}

.ranking-panel {
    position: relative;
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background: linear-gradient(145deg, #fafafa, #f2f2f2);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.7);
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.score-table thead {
    border-bottom: 1px solid #ddd;
}

.score-table th,
.score-table td {
    padding: 10px 8px;
    text-align: left;
}

.score-table th {
    font-weight: 600;
    font-size: 13px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.score-row:nth-child(odd) {
    background-color: #f8f8f8;
}

.score-row:nth-child(even) {
    background-color: #ffffff;
}

.score-row {
    transition: background-color 0.25s ease, transform 0.22s ease;
}

.score-row-updated {
    animation: rowFlash 0.9s ease-out;
}

@keyframes rowFlash {
    0% {
        background-color: #111;
        color: #fff;
        transform: translateY(-1px) scale(1.01);
    }
    50% {
        background-color: #e0e0e0;
        color: #111;
        transform: translateY(0);
    }
    100% {
        background-color: inherit;
        color: inherit;
        transform: translateY(0);
    }
}

/* 超车时的炫酷上升动画 */
.score-row-climb {
    animation: rowClimb 1s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes rowClimb {
    0% {
        background-color: #111;
        color: #fff;
        transform: translateY(14px) scale(0.96);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    }
    45% {
        background-color: #e0e0e0;
        color: #111;
        transform: translateY(-6px) scale(1.03);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
    }
    100% {
        background-color: inherit;
        color: inherit;
        transform: translateY(0) scale(1);
        box-shadow: none;
    }
}

/* 注册成功动画场景 */
.success-scene {
    position: relative;
    padding: 46px 20px 40px;
    text-align: center;
    overflow: hidden;
}

.success-orbit {
    position: absolute;
    inset: -40px;
    background:
        radial-gradient(circle at 0% 0%, rgba(0,0,0,0.08), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(0,0,0,0.12), transparent 60%);
    opacity: 0;
    animation: successOrbitFade 1.4s ease-out forwards;
}

.success-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    box-shadow:
        0 18px 40px rgba(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 0%, #ffffff, #f2f2f2);
    animation: successRingPop 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.success-check {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    animation: successCheckPop 0.55s cubic-bezier(0.18, 0.89, 0.32, 1.4);
}

.success-check-icon {
    display: inline-block;
    transform-origin: center;
    animation: successCheckTick 0.55s ease-out;
}

.success-text-main {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.success-text-sub {
    margin-top: 4px;
    font-size: 13px;
    color: #666;
}

.success-scene-leave {
    animation: successSceneLeave 0.85s ease forwards;
}

@keyframes successOrbitFade {
    0% { opacity: 0; }
    40% { opacity: 1; }
    100% { opacity: 0.85; }
}

@keyframes successRingPop {
    0% { transform: scale(0.7); opacity: 0; }
    60% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes successCheckPop {
    0% { transform: scale(0.4); }
    70% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes successCheckTick {
    0% { transform: scale(0.3); opacity: 0; }
    40% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes successSceneLeave {
    0% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-16px);
        filter: blur(4px);
    }
}
