/* 本地字体定义 */
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/Nunito-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./fonts/Nunito-SemiBold.ttf') format('truetype');
}

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/Nunito-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('./fonts/Nunito-ExtraBold.ttf') format('truetype');
}

:root {
    --panel-bg: rgba(255, 255, 255, 0.9);
    --panel-border: rgba(0, 0, 0, 0.06);
    --text-color: #333;
    --accent-color: #ff6b6b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #fff9c4 0%, #f8bbd0 50%, #b3e5fc 100%);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 1000px;
    height: 95vh;
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.6);
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    z-index: 10;
}

/* 顶部标题栏 */
.header {
    text-align: center;
    padding: 16px 24px;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.08);
    border-radius: 24px 24px 0 0;
}

.title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(90deg, #ff6b6b, #ffa726, #66bb6a, #42a5f5, #ab47bc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    letter-spacing: 4px;
}

.subtitle {
    font-size: 0.95rem;
    color: #888;
    font-weight: 600;
}

/* 硬币展示区域 */
.coin-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #ffffff;
    overflow: hidden;
}

.coins-display {
    position: relative;
    width: 100%;
    height: 100%;
}

.empty-hint {
    font-size: 1.3rem;
    color: rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

/* 单个硬币（绝对定位，由JS随机放置） */
.coin-card {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.coin-card:hover {
    transform: scale(1.1);
}

.coin-card img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

.coin-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #555;
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 12px;
    border-radius: 20px;
}

/* 答案区域 */
.answer-area {
    text-align: center;
    padding: 16px 24px;
    border-top: 2px dashed rgba(0, 0, 0, 0.08);
    border-bottom: 2px dashed rgba(0, 0, 0, 0.08);
}

.answer-text {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: 2px;
}

.answer-text.hidden {
    color: #ccc;
}

.answer-text.revealed {
    color: #2e7d32;
}

/* 底部控制区 */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 0 0 24px 24px;
}

.btn {
    border: 2px solid rgba(0, 0, 0, 0.15);
    color: #fff;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(1px) scale(0.98);
}

.btn-draw {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    border-color: #1565c0;
}

.btn-answer {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    border-color: #388e3c;
}