body {
    background-color: #1e1e2e;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: sans-serif;
}

#phone-wrapper {
    width: 375px;
    height: 667px;
    background: #f8f9fa;
    border: 10px solid #333;
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

#status-bar {
    display: flex;
    justify-content: space-around;
    padding: 40px 10px 20px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.lang-toggle {
    position: absolute;
    right: 12px;
    top: 10px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 10px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.stat-label {
    font-size: 0.9rem;
    color: #222;
}

.stat-bar {
    width: 12px;
    height: 40px;
    border-radius: 6px;
    background: #cfcfcf;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.stat-fill {
    width: 100%;
    height: 50%;
    background: #222;
    transition: height 0.3s ease, background-color 0.6s ease;
}

.stat-num {
    font-size: 18px;
    font-weight: bold;
    transition: color 0.6s ease;
    display: inline-block;
    color: #000;
}

.flash-up { color: #2ecc71; }
.flash-down { color: #ff4757; }

.fill-up { background: #2ecc71; }
.fill-down { background: #ff4757; }

#card-container {
    flex: 1;
    display: flex;
    flex-direction: column; /* 加上这一行，让内部元素垂直排布 */
    justify-content: center;
    align-items: center;
    position: relative;
    padding-top: 10px;
}

/* 1. 顶部季节显示 */
#season-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px; /* 紧贴卡牌上方 */
}

#main-card {
    width: 85%;
    height: 70%; /* 稍微加高一点以容纳更多内容 */
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
    
    /* 核心修改：改为纵向排列 */
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: flex-start; /* 从顶部开始堆叠 */
    position: relative;
    touch-action: none;
    transition: transform 0.2s ease;
}

/* 2. 文字描述在最上面 */
#card-text {
    font-size: 1rem;
    line-height: 1.5;
    margin: 10px 0 15px 0;
    min-height: 60px; /* 预留文字高度，防止图片上下跳动 */
    display: flex;
    align-items: center;
}

/* 3. 图片在文字下面 */
.card-img-container {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

#card-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* 4. 最下面是角色名 */
#character-name {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #888;
    font-weight: bold;
    letter-spacing: 1px;
}

.swipe-label {
    position: absolute;
    top: 16px;
    padding: 6px 12px;
    border: 2px solid;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1rem;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    letter-spacing: 2px;
}

.swipe-label-left {
    right: 16px;
    color: #ff4757;
    border-color: #ff4757;
}

.swipe-label-right {
    left: 16px;
    color: #2ecc71;
    border-color: #2ecc71;
}

.swipe-out-left {
    transform: translateX(-140%) rotate(-18deg);
}

.swipe-out-right {
    transform: translateX(140%) rotate(18deg);
}

.affection-panel {
    margin: 10px 22px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    font-size: 0.9rem;
}

.affection-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.affection-list {
    color: #555;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}


.controls {
    padding: 18px 22px 24px;
    display: flex;
    gap: 16px;
}

.btn {
    flex: 1;
    padding: 16px 12px;
    border-radius: 14px;
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 1px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.btn-reject {
    background: #ff4d4f;
}

.btn-agree {
    background: #2ecc71;
}
