/* 래플 페이지 전용 스타일 */
.raffle-page { max-width: 800px; margin: 0 auto; padding: 0 15px; }

/* 잭팟 배너 */
.raffle-jackpot-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    border-radius: 20px;
    padding: 32px 24px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}
.raffle-jackpot-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(255,215,0,0.08) 0%, transparent 60%);
    animation: raffle-glow 4s ease-in-out infinite;
}
@keyframes raffle-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}
.raffle-week-badge {
    display: inline-block;
    background: rgba(255,215,0,0.15);
    color: #ffd700;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
.raffle-jackpot-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}
.raffle-jackpot-amount {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ffaa00, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* 카운트다운 */
.raffle-countdown {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
.raffle-countdown-box {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 58px;
    text-align: center;
}
.raffle-countdown-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffd700;
    line-height: 1;
}
.raffle-countdown-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}
.raffle-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}
.raffle-stat {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}
.raffle-stat i { margin-right: 4px; color: rgba(255,215,0,0.6); }

/* 상금 구조 */
.raffle-prize-structure {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.raffle-prize-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.raffle-prize-row:last-child { border-bottom: none; }
.raffle-prize-rank {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-right: 14px;
}
.raffle-prize-rank.gold { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #5a3e00; }
.raffle-prize-rank.silver { background: linear-gradient(135deg, #c0c0c0, #e8e8e8); color: #444; }
.raffle-prize-rank.bronze { background: linear-gradient(135deg, #cd7f32, #e8a964); color: #fff; }
.raffle-prize-rank.carry { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.raffle-prize-info { flex: 1; }
.raffle-prize-info .label { font-size: 0.9rem; font-weight: 600; color: #333; }
.raffle-prize-info .detail { font-size: 0.78rem; color: #888; margin-top: 2px; }
.raffle-prize-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    flex-shrink: 0;
}

/* 응모 섹션 */
.raffle-enter-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.raffle-enter-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 6px 0;
}
.raffle-enter-info {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 18px;
}
.raffle-amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.raffle-amount-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.raffle-amount-btn:hover, .raffle-amount-btn.active {
    border-color: #ffd700;
    background: #fffdf0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,215,0,0.2);
}
.raffle-amount-btn .amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: #333;
    line-height: 1;
}
.raffle-amount-btn .label {
    font-size: 0.72rem;
    color: #999;
    margin-top: 4px;
}
.raffle-amount-btn .multiplier {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
}
.raffle-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #1a1a2e;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.raffle-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255,215,0,0.4);
}
.raffle-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.raffle-my-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}
.raffle-my-info .point { color: #667eea; font-weight: 700; }
.raffle-my-info .entries { color: #e53e3e; font-weight: 600; }

/* 탭 */
.raffle-tabs {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.raffle-tab-nav {
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    border-bottom: 2px solid #f0f0f0;
}
.raffle-tab-btn {
    flex: 1;
    padding: 10px 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}
.raffle-tab-btn.active {
    color: #333;
    border-bottom-color: #ffd700;
}
.raffle-tab-content { display: none; }
.raffle-tab-content.active { display: block; }

/* 당첨자 카드 */
.raffle-winner-card {
    display: flex;
    align-items: center;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: background 0.2s;
}
.raffle-winner-card:hover { background: #f8f9fa; }
.raffle-winner-card .rank-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-right: 12px;
}
.raffle-winner-card .rank-badge.r1 { background: linear-gradient(135deg, #ffd700, #ffaa00); color: #5a3e00; }
.raffle-winner-card .rank-badge.r2 { background: linear-gradient(135deg, #c0c0c0, #e8e8e8); color: #444; }
.raffle-winner-card .rank-badge.r3 { background: linear-gradient(135deg, #cd7f32, #e8a964); color: #fff; }
.raffle-winner-card .winner-info { flex: 1; }
.raffle-winner-card .winner-name { font-size: 0.92rem; font-weight: 600; color: #333; }
.raffle-winner-card .winner-meta { font-size: 0.78rem; color: #999; margin-top: 2px; }
.raffle-winner-card .winner-prize {
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.raffle-winner-card .winner-prize.r1 { color: #daa520; }
.raffle-winner-card .winner-prize.r2 { color: #808080; }
.raffle-winner-card .winner-prize.r3 { color: #cd7f32; }

/* 내역 카드 */
.raffle-history-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}
.raffle-history-item:last-child { border-bottom: none; }
.raffle-history-item .hist-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 12px;
    font-size: 0.85rem;
}
.raffle-history-item .hist-icon.entry { background: #e8f4fd; color: #3498db; }
.raffle-history-item .hist-icon.win { background: #fef9e7; color: #daa520; }
.raffle-history-item .hist-info { flex: 1; }
.raffle-history-item .hist-title { font-size: 0.88rem; font-weight: 600; color: #333; }
.raffle-history-item .hist-date { font-size: 0.75rem; color: #999; margin-top: 2px; }
.raffle-history-item .hist-amount { font-size: 0.9rem; font-weight: 700; flex-shrink: 0; }
.raffle-history-item .hist-amount.minus { color: #e53e3e; }
.raffle-history-item .hist-amount.plus { color: #27ae60; }

/* FAQ 아코디언 */
.raffle-faq {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.raffle-faq h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 14px 0;
}
.raffle-faq-item {
    border-bottom: 1px solid #f0f0f0;
}
.raffle-faq-item:last-child { border-bottom: none; }
.raffle-faq-q {
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    color: #333;
}
.raffle-faq-q::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: #999;
    transition: transform 0.2s;
}
.raffle-faq-item.open .raffle-faq-q::after { transform: rotate(180deg); }
.raffle-faq-a {
    display: none;
    padding: 0 0 14px 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
}
.raffle-faq-item.open .raffle-faq-a { display: block; }

/* 비로그인 안내 */
.raffle-login-notice {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 16px;
}
.raffle-login-notice p { margin: 0 0 12px 0; color: #666; font-size: 0.9rem; }
.raffle-login-notice a {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #1a1a2e;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
}

/* 확인 모달 */
.raffle-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.raffle-modal-overlay.show { display: flex; }
.raffle-modal {
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: raffle-modal-in 0.3s;
}
@keyframes raffle-modal-in {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.raffle-modal h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
}
.raffle-modal .modal-amount {
    font-size: 2rem;
    font-weight: 900;
    color: #ffd700;
    margin: 12px 0;
}
.raffle-modal .modal-desc {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 20px;
}
.raffle-modal-btns {
    display: flex;
    gap: 10px;
}
.raffle-modal-btns button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}
.raffle-modal-btns .btn-cancel {
    background: #f0f0f0;
    color: #666;
}
.raffle-modal-btns .btn-confirm {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #1a1a2e;
}

/* confetti */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 10000;
    animation: confetti-fall 3s ease-in forwards;
}
@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* 빈 상태 */
.raffle-empty {
    text-align: center;
    padding: 30px 15px;
    color: #999;
    font-size: 0.9rem;
}
.raffle-empty i { font-size: 2rem; display: block; margin-bottom: 10px; }

/* 반응형 */
@media (max-width: 576px) {
    .raffle-jackpot-amount { font-size: 2.2rem; }
    .raffle-countdown { gap: 6px; }
    .raffle-countdown-box { padding: 8px 10px; min-width: 48px; }
    .raffle-countdown-num { font-size: 1.2rem; }
    .raffle-amount-grid { grid-template-columns: repeat(2, 1fr); }
    .raffle-stats { gap: 12px; flex-wrap: wrap; }
    .raffle-my-info { flex-direction: column; gap: 6px; text-align: center; }
}

/* 다크모드 */
@media (prefers-color-scheme: dark) {
    .raffle-prize-structure, .raffle-enter-section, .raffle-tabs, .raffle-faq {
        background: #1e1e2e;
    }
    .raffle-prize-row { border-bottom-color: #333; }
    .raffle-enter-section h3, .raffle-faq h3, .raffle-faq-q,
    .raffle-prize-info .label, .raffle-winner-card .winner-name,
    .raffle-history-item .hist-title {
        color: #e0e0e0;
    }
    .raffle-amount-btn { background: #2a2a3e; border-color: #3a3a4e; }
    .raffle-amount-btn:hover, .raffle-amount-btn.active {
        background: #3a3a2e; border-color: #ffd700;
    }
    .raffle-amount-btn .amount { color: #e0e0e0; }
    .raffle-my-info { background: #2a2a3e; }
    .raffle-tab-nav { border-bottom-color: #333; }
    .raffle-winner-card:hover { background: #2a2a3e; }
    .raffle-history-item { border-bottom-color: #333; }
    .raffle-faq-item { border-bottom-color: #333; }
    .raffle-login-notice { background: #2a2a3e; }
    .raffle-modal { background: #2a2a3e; }
    .raffle-modal h4 { color: #e0e0e0; }
    .raffle-modal-btns .btn-cancel { background: #3a3a4e; color: #aaa; }
}
