/* assets/css/scratch.css - V10.5 Final Polish (Gradient Colors) */

:root {
    --card-radius: 24px;
    --font-stack: -apple-system, "SF Pro Display", "PingFang SC", sans-serif;
    /* 定义主色调渐变：Apple Blue Style */
    --primary-gradient: linear-gradient(135deg, #0061ff 0%, #60efff 100%);
}

body.theme-scratch {
    background-color: #F5F7FA;
    background-image: 
        radial-gradient(at 10% 10%, rgba(169, 196, 255, 0.2) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(255, 222, 173, 0.2) 0px, transparent 50%);
    min-height: 100vh;
    font-family: var(--font-stack);
    padding-bottom: 80px; 
}

/* 布局容器 */
.scratch-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* [新增] 标题区域美化 */
.page-header {
    text-align: center; /* 稍微居中一点更好看，如果不喜欢可删掉 */
    padding: 10px 20px;
}

/* [核心修改] 标题渐变色 */
.page-header .large-title {
    font-weight: 800;
    letter-spacing: -1px;
    /* 渐变文字魔法 */
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block; /* 修复某些浏览器渐变裁剪问题 */
    margin-bottom: 4px;
}

.ticket-row {
    position: relative;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade { to { opacity: 1; transform: translateY(0); } }

/* === 底层：勋章卡片 (保持 V10.4 稳定版结构) === */
.medal-card {
    position: relative;
    width: 100%;
    height: 140px; 
    border-radius: var(--card-radius);
    padding: 20px 24px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

.grad-blue { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); box-shadow: 0 12px 24px -6px rgba(79, 172, 254, 0.4); }
.grad-yellow { background: linear-gradient(135deg, #FFD000 0%, #FF9500 100%); box-shadow: 0 12px 24px -6px rgba(255, 170, 0, 0.4); }
.grad-orange { background: linear-gradient(135deg, #FF9966 0%, #FF5E62 100%); box-shadow: 0 12px 24px -6px rgba(255, 94, 98, 0.4); }
.grad-green { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); box-shadow: 0 12px 24px -6px rgba(56, 249, 215, 0.4); }

.medal-info {
    z-index: 2;
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0; 
    padding-right: 15px;
}

.medal-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
    max-width: 100%;
}
.medal-status-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.medal-title {
    font-size: 22px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.3;
    letter-spacing: -0.5px;
    height: 2.6em; /* 稳定高度锚点 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.medal-icon-box {
    z-index: 2;
    width: 80px; 
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2));
    animation: floatIcon 4s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.bg-deco { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.1); z-index: 1; pointer-events: none; }
.deco-1 { width: 150px; height: 150px; top: -50px; right: -30px; }
.deco-2 { width: 80px; height: 80px; bottom: 10px; left: 40%; }

.scratch-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-radius: var(--card-radius); z-index: 10; cursor: grab;
    touch-action: none; transition: opacity 0.5s ease;
}
.scratch-canvas.hidden { opacity: 0; pointer-events: none; }

/* 底部按钮区域 */
.scratch-actions { text-align: center; margin-top: 20px; padding-bottom: 40px; }

/* [核心修改] 按钮美化 */
.btn-refresh {
    border: none;
    padding: 14px 40px; /* 加宽一点 */
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* 默认/禁用状态 */
    background: #eef2f5;
    color: #999;
    box-shadow: none;
}

/* 激活状态：渐变色 + 投影 */
.btn-refresh:not(:disabled) {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 20px -6px rgba(0, 97, 255, 0.4); /* 弥散蓝光 */
    cursor: pointer;
    transform: translateY(0);
}

.btn-refresh:not(:disabled):active {
    transform: translateY(2px) scale(0.98); /* 按压回弹感 */
    box-shadow: 0 4px 12px -4px rgba(0, 97, 255, 0.4);
}