/**
 * PC端翻牌抽奖页面样式
 */

.lottery-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f666001a 0%, #f6660045 50%, #f6660017 100%);
    background-attachment: fixed;
}

.lottery-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 0rem;
}

.lottery-header {
    text-align: center;
    margin-bottom: 1.2rem;
}

.lottery-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

.lottery-subtitle {
    font-size: 1.25rem;
    color: #fff;
    margin: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

.lottery-subtitle .subtitle-cost-number {
    color: #ff0000;
    font-weight: 900;
    font-size: 1.3em;
}

.lottery-subtitle .subtitle-points-number {
    color: #ff4500;
    font-weight: 700;
}

/* 翻牌抽奖区域 */
.card-lottery-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 1.2rem 0;
}

.card-lottery-content {
    display: grid;
    grid-template-columns: 25% 50% 25%;
    align-items: flex-start;
    gap: 0.1px;
    width: 100%;
    max-width: 1400px;
}

.lottery-left-placeholder {
    grid-column: 1;
    min-width: 200px;
}

.card-lottery-container {
    width: 100%;
    margin: 0 auto;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 卡片网格 - 3x3布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 450px;
}

/* 卡片项 */
.card-item {
    aspect-ratio: 1;
    perspective: 1000px;
    cursor: pointer;
}

.card-item.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.card-item.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-item.revealed {
    pointer-events: none;
}

/* 卡片内部容器 */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* 卡片正面和背面 */
.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 卡片正面 */
.card-front {
    background: linear-gradient(135deg, #f66600 0%, #667eea00 50%, #f66600 100%);
    color: #fff;
    transform: rotateY(0deg);
    z-index: 2;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.card-icon {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-hint {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* 卡片背面 */
.card-back {
    background: #fff;
    transform: rotateY(180deg);
    padding: 1rem;
    z-index: 1;
}

.card-prize-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.card-prize-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* 奖品类型样式 */
.card-back.prize-first {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.card-back.prize-first .card-prize-icon {
    color: #fff;
}

.card-back.prize-first .card-prize-name {
    color: #fff;
}

.card-back.prize-second {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}

.card-back.prize-second .card-prize-icon {
    color: #fff;
}

.card-back.prize-second .card-prize-name {
    color: #fff;
}

.card-back.prize-third {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a85c 100%);
}

.card-back.prize-third .card-prize-icon {
    color: #fff;
}

.card-back.prize-third .card-prize-name {
    color: #fff;
}

.card-back.prize-try {
    background: #f5f5f5;
}

.card-back.prize-try .card-prize-icon {
    color: #999;
}

.card-back.prize-try .card-prize-name {
    color: #666;
}

/* 控制按钮 */
.card-lottery-controls {
    text-align: center;
    margin-top: 2rem;
}

.card-lottery-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff7f50 100%);
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.card-lottery-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.card-lottery-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.guarantee-tip {
    margin-top: 1rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 0 2px 8px rgba(255, 107, 53, 0.5);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.3) 0%, rgba(255, 127, 80, 0.3) 100%);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

.guarantee-tip i {
    margin-right: 0.5rem;
}

/* 奖品信息 - 颁奖台样式 */
.lottery-prizes {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 182, 193, 0.3) 100%);
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeInPrizes 0.5s ease-in forwards;
}

@keyframes fadeInPrizes {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.prizes-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff6b35;
    margin: 0 0 2rem 0;
    text-align: center;
    text-shadow: 0 2px 5px rgba(255, 107, 53, 0.2);
}

/* 颁奖台容器 */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem 0 1rem;
}

/* 颁奖台项目 */
.podium-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    height: 100%;
}

.podium-stand {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

/* 颁奖台底座 */
.podium-base {
    width: 100%;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.podium-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    pointer-events: none;
}

.podium-base:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* 一等奖 - 最高 */
.podium-first .podium-base {
    height: 118px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    border: 3px solid #ffed4e;
}

/* 二等奖 - 中等高度 */
.podium-second .podium-base {
    height: 88px;
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 50%, #c0c0c0 100%);
    border: 3px solid #e8e8e8;
}

/* 三等奖 - 最低 */
.podium-third .podium-base {
    height: 78px;
    background: linear-gradient(135deg, #cd7f32 0%, #e6a85c 50%, #cd7f32 100%);
    border: 3px solid #e6a85c;
}

/* 排名图标 */
.podium-rank {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.podium-first .podium-rank {
    font-size: 3.5rem;
}

/* 奖品图片 */
.podium-image {
    width: 100%;
    max-width: 120px;
    height: 100px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
}

.podium-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.podium-image img.loaded {
    opacity: 1;
}

.podium-first .podium-image {
    max-width: 140px;
    height: 120px;
}

.podium-rank {
    margin-bottom: 1rem;
    position: relative;
    z-index: 10;
}

/* 标签 */
.podium-label {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.podium-first .podium-label {
    font-size: 1.1rem;
}

/* 奖品值 */
.podium-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
    word-break: break-word;
}

.podium-first .podium-value {
    font-size: 1.25rem;
}

/* 用户信息 */
.lottery-user-info {
    text-align: center;
    margin: 2rem 0;
}

.user-points {
    font-size: 1.25rem;
    color: #fff;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

.user-points strong {
    color: #ff6b35;
    font-size: 1.5rem;
    text-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.user-login-tip {
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.user-login-tip a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.8) 0%, rgba(255, 127, 80, 0.8) 100%);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    transition: all 0.3s;
}

.user-login-tip a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.user-login-tip a:hover {
    text-decoration: underline;
}

/* 中奖通知 */
.lottery-notifications {
    width: 258px;
    height: auto;
    overflow: hidden;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
    grid-column: 3;
    justify-self: flex-start;
    align-self: flex-start;
    position: relative;
    margin-top: 358px;
    opacity: 0;
}

.lottery-notifications.ready {
    opacity: 1;
}

.lottery-notifications .notifications-wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}

.lottery-notifications .notification-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 140, 0, 0.2) 50%, rgba(255, 107, 53, 0.15) 100%);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.4rem;
    font-size: 0.65rem;
    color: #333;
    border: 2px solid #ff8c42;
    line-height: 1.4;
    flex-shrink: 0;
    height: auto;
    overflow: hidden;
    white-space: nowrap;
}

.lottery-notifications .notification-item.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
    width: 100%;
}

.lottery-notifications .notification-item.prev {
    opacity: 0;
    transform: translateY(-20px);
}


.notification-item .notification-content {
    position: relative;
    z-index: 2;
    padding-left: 1.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.notification-item .notification-content::before {
    content: '🎉';
    position: absolute;
    left: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    z-index: 1;
    line-height: 1;
}

.notification-item .username {
    color: #ff6b35;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 107, 53, 0.3);
    display: inline-block;
}

.notification-item .prize-name {
    color: #ff6b35;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 107, 53, 0.3);
    display: inline-block;
}

/* 中奖结果弹窗 */
.lottery-result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.lottery-result-modal.show {
    display: flex;
}

.lottery-result-content {
    background: #fff;
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.result-icon {
    font-size: 4rem;
    color: #ffd700;
    margin-bottom: 1rem;
}

.result-image {
    margin-bottom: 1rem;
}

.result-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.result-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 1rem 0;
}

.result-message {
    font-size: 1.1rem;
    color: #666;
    margin: 0 0 2rem 0;
}

.result-close-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff7f50 100%);
    color: #fff;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.result-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

/* 提示弹窗 */
.lottery-tip-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.lottery-tip-modal.show {
    display: flex;
}

.lottery-tip-content {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: tipModalSlideIn 0.3s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes tipModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tip-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1.5rem 0;
}

.tip-close-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #ff7f50 100%);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    max-width: 150px;
}

.tip-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

/* 响应式设计 - 中奖通知 */
@media (max-width: 1024px) {
    .card-lottery-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .lottery-left-placeholder {
        display: none;
    }
    
    .card-lottery-container {
        grid-column: 1;
    }
    
    .lottery-notifications {
        grid-column: 1;
        max-width: 100%;
        width: 100%;
        justify-self: center;
    }
}
