/* ===== 全局基础样式 ===== */
body {
    background-image: url("/static/images/bg.jpg");
    background-size: cover;          /* 等比铺满屏幕 */
    background-position: center;     /* 居中显示 */
    background-repeat: no-repeat;    /* 不平铺 */
    background-attachment: fixed;    /* 滚动时背景固定（PC 推荐） */

    font-family: "Microsoft YaHei", sans-serif;
    color: #222;
    text-align: center;
    margin: 0;
    padding: 10px 10px;
    box-sizing: border-box;
}

/* ===== 页面容器 ===== */
.container {
    max-width: 2560px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 标题 ===== */
h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);  /* 完全居中 */
    color: #ffffff;
    font-size: 8em;
    font-weight: bold;
    text-align: center;
}

/* ===== 抽奖设置区 ===== */
.form-area {
    position: fixed;
    right: 24px;
    bottom: 24px;

    background: none;      /* ❗无背景 */
    box-shadow: none;      /* ❗无阴影 */
    padding: 0;

    z-index: 1000;
}

.form-area form {
    display: flex;
    flex-direction: row;      /* 横向排列 */
    align-items: center;      /* 垂直居中 */
    gap: 8px;                 /* 控件之间间距 */
}

.form-area label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);  /* 假设你背景偏暗 */
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.form-area select{
    width: 78px;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 6px;
}

.form-area input[type="number"] {
    width: 30px;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 6px;
}

.form-area button {
    width: 44px;
    height: 44px;
    padding: 0;

    border-radius: 50%;
    border: none;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    font-size: 18px;
    line-height: 1;

    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.start-btn { background-color: #28a745; color: white; }
.resetwon-btn { background-color: #ffffff; color: rgb(60, 60, 60); font-weight:bold; }
.reset-btn { background-color: #dc3545; color: white; }
.record-btn { background-color: #ffffff; color: white; }

/* ===== 滚动展示区 ===== */
.roll-area {
    margin: 30px auto 40px;
    height: 180px;
    max-width: 2560px;
    overflow: hidden;
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* ===== 滚动列表 ===== */
.roll-list {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* ===== 单个滚动项 ===== */
.roll-item {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.6em;
    font-weight: bold;
}

/* ===== 头像 ===== */
.roll-item img,
.winner-item img {
    width: 125px;
    height: 125px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0078d7;
    margin-bottom: 10px;
}

/* ===== 中奖结果区 ===== */
.result-area {
    margin-top: 30px;
}

/* ===== 奖品展示 ===== */
.prize-box {
    color: white;
    text-align: center;
    margin-bottom: 10px;
}

.prize-box img {
    width: 450px;
    height: auto;
    border-radius: 14px;
}

.prize-box h2 {
    margin-top: 10px;
    font-size: 4em;
}

h3 {
    color: #ffffff;
    margin-top: 10px;
    font-size: 2.4em;
}

/* ===== 中奖人列表 ===== */
.winner-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    max-width: 2200px;
    margin: 0 auto;
}

/* ===== 单个中奖人 ===== */
.winner-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px 15px 15px;  /* 顶右下都 15px */
    width: 140px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

/* ===== 危险操作按钮 ===== */
.danger-btn {
    background-color: #d9534f;
}

.danger-btn:hover {
    background-color: #c9302c;
}

.record-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
}

.record-item {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    align-items: center;

    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    padding: 12px 20px;

    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.record-prize,
.record-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.record-prize img,
.record-person img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.record-time {
    font-size: 13px;
    color: #666;
    text-align: right;
}

.back-btn {
    margin-top: 40px;
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
}

.gold-title {
    font-size: 2.2em;
    font-weight: bold;
    text-align: center;
    letter-spacing: 2px;

    /* 金色渐变 */
    background: linear-gradient(
        90deg,
        #fff2b0,
        #ffd700,
        #ffb700,
        #ffd700,
        #fff2b0
    );

    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* 动态发光动画 */
    animation: glow 2s infinite alternate;

    margin-top: 15px;
}

/* 动态发光关键帧 */
@keyframes glow {
    0% {
        text-shadow:
            0 0 4px rgba(255, 215, 0, 0.5),
            0 0 8px rgba(255, 215, 0, 0.4),
            0 0 16px rgba(255, 200, 0, 0.3);
    }
    50% {
        text-shadow:
            0 0 8px rgba(255, 215, 0, 0.8),
            0 0 16px rgba(255, 215, 0, 0.7),
            0 0 32px rgba(255, 200, 0, 0.5);
    }
    100% {
        text-shadow:
            0 0 6px rgba(255, 215, 0, 0.6),
            0 0 12px rgba(255, 215, 0, 0.5),
            0 0 24px rgba(255, 200, 0, 0.4);
    }
}

#centerText {
    color: gold; /* 金色 */
}

.winner-meta {
    font-size: 1em;
    color: #464646;
    margin-bottom: 1px;
    white-space: nowrap;
}

.winner-name {
    margin-top: 2px;      /* 元素与上方 meta 间距 */
    margin-bottom: 0;     /* 与底部卡片内边距一致 */
    font-size: 2em;
    font-weight: bold;
}

#player {
  position: fixed;       /* 固定在页面 */
  left: 10px;            /* 距离左边 10px */
  bottom: 10px;          /* 距离底部 10px */
  width: 200px;          /* 控件宽度 */
  z-index: 9999;         /* 保证在最上层 */
  border-radius: 8px;    /* 圆角可选 */
  box-shadow: 0 2px 6px rgba(0,0,0,0.3); /* 可选阴影 */
}
