/**
 * ============================================
 * 成长冒险岛 - 前台专用样式
 * ============================================
 */

/* ==================== 首页：角色卡 ==================== */
.hero-card {
    background: linear-gradient(135deg, #4FC3F7 0%, #81C784 50%, #FFD54F 100%);
    border-radius: var(--radius-xl);
    padding: 24px;
    color: white;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-avatar {
    font-size: 3.5rem;
    margin-bottom: 4px;
    animation: float 3s ease-in-out infinite;
}

.hero-name {
    font-size: 1.5rem;
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.hero-level {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 2px;
}

.hero-points {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.25);
    padding: 6px 16px;
    border-radius: 20px;
    margin-top: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

/* 快捷入口网格 */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.quick-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 2px solid transparent;
}

.quick-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.quick-item-icon {
    font-size: 2rem;
    margin-bottom: 4px;
    display: block;
}

.quick-item-label {
    font-size: 0.9rem;
    font-weight: 700;
}

.quick-item-value {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ==================== 任务页 ==================== */
.task-section {
    margin-bottom: 20px;
}

.task-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 4px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
}

.task-item:hover {
    box-shadow: var(--shadow-md);
}

.task-item.completed {
    opacity: 0.6;
    background: #F5F5F5;
}

.task-item.completed .task-name {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-checkbox {
    width: 28px;
    height: 28px;
    border: 3px solid #E0E0E0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
    font-size: 1rem;
    cursor: pointer;
}

.task-checkbox.checked {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: white;
    animation: bounce 0.4s;
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.task-meta {
    display: flex;
    gap: 8px;
    margin-top: 2px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.task-points {
    font-weight: 700;
    color: var(--color-accent-dark);
}

.task-required-badge {
    background: #FFECB3;
    color: var(--color-accent-dark);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ==================== 随机任务区(锁定态) ==================== */
.random-section-locked {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #ECEFF1, #CFD8DC);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.random-lock-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    animation: shake 2s infinite;
}

.random-lock-text {
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* 随机任务区(解锁态) */
.random-cards {
    display: grid;
    gap: 12px;
}

/* 老虎机滚屏效果 */
.slot-machine-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: var(--radius-lg);
    padding: 20px;
    min-height: 400px;
}

.slot-machine-title {
    text-align: center;
    color: #FFD700;
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 16px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: glow 2s infinite;
}

.slot-machine-phase {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 数字滚动显示 */
.slot-machine-number-display {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #2a2a4e, #1a1a3e);
    border: 4px solid #FFD700;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.slot-machine-number {
    font-size: 4rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: pulse 0.5s infinite;
}

/* 任务条滚动容器 */
.slot-machine-reels-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 20px 0;
}

.slot-machine-reel {
    position: relative;
    height: 60px;
    overflow: hidden;
    background: #0a0a1a;
    border-radius: var(--radius-md);
    border: 2px solid #FFD700;
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.2);
}

.slot-machine-reel-items {
    position: absolute;
    width: 100%;
    transition: transform 0.1s linear;
}

.slot-machine-reel-item {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: linear-gradient(135deg, #2a2a4e, #1a1a3e);
    border-bottom: 1px solid #FFD700;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-machine-reel-item.lucky {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    animation: glow 1s infinite;
}

.slot-machine-reel-item.stopped {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

@keyframes slotBlur {
    0%, 100% { filter: blur(0px); }
    50% { filter: blur(1px); }
}

@keyframes slotScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

.slot-machine-reel.spinning .slot-machine-reel-items {
    animation: slotScroll 0.1s linear infinite;
}

.slot-machine-result {
    display: none;
    animation: slideUp 0.5s ease-out;
}

.slot-machine-result.show {
    display: block;
}

.slot-machine-btn {
    display: block;
    margin: 20px auto 0;
    padding: 16px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a2e;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.slot-machine-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.6);
}

.slot-machine-btn:disabled {
    background: #666;
    cursor: not-allowed;
    animation: none;
    box-shadow: none;
}

.slot-machine-count {
    text-align: center;
    color: #FFD700;
    font-size: 0.9rem;
    margin-top: 12px;
    font-weight: 600;
}

.slot-machine-decoration {
    position: absolute;
    font-size: 2rem;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

.slot-machine-decoration.left {
    left: 10px;
    top: 50%;
}

.slot-machine-decoration.right {
    right: 10px;
    top: 50%;
    animation-delay: 1.5s;
}

.random-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 2px solid #E0E0E0;
    animation: slideUp 0.4s ease-out;
    transition: all 0.3s;
}

.random-card.completed {
    border-color: var(--color-secondary);
    background: #E8F5E9;
}

.random-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.random-card-category {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 0.85rem;
}

.random-card-difficulty {
    font-size: 0.85rem;
}

.random-card-content {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.5;
}

.random-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==================== 盲盒按钮（大）==================== */
.mystery-box-btn {
    width: 120px;
    height: 120px;
    border: none;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--color-accent), var(--color-orange));
    font-size: 3rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(255,213,79,0.4);
    transition: all 0.3s;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mystery-box-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(255,213,79,0.6);
}

.mystery-box-btn:active {
    animation: shake 0.3s;
}

/* ==================== 能力森林 ==================== */
.forest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.tree-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.tree-card:hover {
    border-color: var(--color-secondary);
    transform: translateY(-3px);
}

.tree-icon {
    font-size: 2.5rem;
    margin-bottom: 4px;
}

.tree-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.tree-stage {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* 能力树详情 - 节点可视化 */
.tree-detail-stages {
    position: relative;
    padding: 16px 0;
}

.stage-group {
    margin-bottom: 20px;
}

.stage-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 4px solid var(--color-secondary);
}

.node-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #FAFAFA;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    transition: all 0.3s;
}

.node-item.unlocked {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border: 1px solid var(--color-secondary);
}

.node-dot {
    width: 24px; height: 24px;
    border-radius: var(--radius-full);
    background: #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: all 0.3s;
}

.node-dot.unlocked {
    background: var(--color-secondary);
    color: white;
    animation: sparkle 2s infinite;
}

.node-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ==================== 成就勋章 ==================== */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.achievement-badge {
    text-align: center;
    padding: 16px 8px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.achievement-badge.unlocked {
    border-color: var(--color-accent);
    animation: glow 2s infinite;
}

.achievement-badge.locked {
    opacity: 0.5;
    filter: grayscale(0.8);
}

.achievement-badge.hidden-locked {
    opacity: 0.4;
}

.achievement-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
    display: block;
}

.achievement-name {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

/* ==================== 商城 ==================== */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.shop-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.shop-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.shop-item-icon {
    font-size: 2.5rem;
    margin-bottom: 6px;
}

.shop-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.shop-item-cost {
    color: var(--color-accent-dark);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* ==================== 日历 ==================== */
.calendar-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.calendar-day-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 4px;
}

.calendar-day {
    padding: 6px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.calendar-day:hover {
    background: #E3F2FD;
}

.calendar-day.today {
    background: var(--color-primary);
    color: white;
    font-weight: 700;
}

.calendar-day.has-data::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px; height: 6px;
    background: var(--color-secondary);
    border-radius: var(--radius-full);
}

.calendar-day.all-complete::after {
    background: var(--color-accent);
}

.calendar-day.other-month {
    opacity: 0.3;
}

/* ==================== 管理员入口（首页小按钮）==================== */
.admin-entry {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.admin-entry:hover {
    background: white;
    box-shadow: var(--shadow-md);
}
