:root {
    --bg-color: #fcf6f2;
    --card-bg: #ffffff;
    --text-main: #5a4b41;
    --accent-pink: #ff9a9e;
    --accent-pastel: #fecfef;
    --border-color: #f0e4dc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding: 16px;
    padding-bottom: 40px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #4a3b32;
}

/* 进度条样式 */
.progress-container {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(220, 200, 190, 0.3);
}

.progress-bar-bg {
    background: #eade9420;
    background-color: #eee;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    background-image: linear-gradient(120deg, var(--accent-pink) 0%, var(--accent-pastel) 100%);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: bold;
}

/* 3列网格 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    aspect-ratio: 3 / 4;
    box-shadow: 0 2px 6px rgba(220, 200, 190, 0.2);
}

.photo-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #faf6f3;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.photo-placeholder img.thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder .icon {
    font-size: 1.5rem;
    color: #ccc1b9;
}

.card-title {
    padding: 6px 4px;
    font-size: 0.75rem;
    text-align: center;
    background: #fff;
    border-top: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 隐蔽的 file input */
.file-input {
    display: none;
}

/* 密码层 */
.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(90, 75, 65, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.hidden { display: none !important; }

.auth-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 20px;
    width: 85%;
    max-width: 340px;
    text-align: center;
}

.auth-card h3 { margin-bottom: 12px; }
.auth-card p { font-size: 0.9rem; color: #7a6b61; margin-bottom: 16px; }

.auth-card input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    text-align: center;
    font-size: 1rem;
}

.auth-card button {
    background: var(--accent-pink);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}

.error { color: #ff6b6b; font-size: 0.85rem; margin-top: 8px; }

/* 上传中的简单转圈动画 */
.loading-spinner {
    position: absolute;
    width: 24px; height: 24px;
    border: 3px solid rgba(255,154,158,0.3);
    border-top: 3px solid var(--accent-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }