/* ============================================================
   home.css — 主菜单样式
   ============================================================ */

#scene-home {
    z-index: 10;
}

/* ---------- 背景层 ---------- */
.home-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: var(--z-background);
}

/* ---------- 氛围层 ---------- */
.home-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-ambient);
    pointer-events: none;
}

.home-ambient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-ambient);
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 80%, rgba(60, 20, 60, 0.15) 0%, transparent 60%);
}

/* ---------- 装饰层 ---------- */
.home-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-decoration);
    pointer-events: none;
}

/* 符文边框 */
.rune-border {
    position: absolute;
    left: 0;
    width: 100%;
    height: 20px;
    opacity: 0.15;
    color: var(--accent-gold);
    font-family: var(--font-en);
    font-size: var(--text-sm);
    letter-spacing: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

.rune-border.top {
    top: 8px;
}

.rune-border.bottom {
    bottom: 8px;
}

/* 角落装饰 */
.corner-decoration {
    position: absolute;
    width: 60px;
    height: 60px;
    border-color: var(--border-gold);
    opacity: 0.3;
}

.corner-decoration.top-left {
    top: 20px;
    left: 20px;
    border-top: 1px solid;
    border-left: 1px solid;
}

.corner-decoration.top-right {
    top: 20px;
    right: 20px;
    border-top: 1px solid;
    border-right: 1px solid;
}

.corner-decoration.bottom-left {
    bottom: 20px;
    left: 20px;
    border-bottom: 1px solid;
    border-left: 1px solid;
}

.corner-decoration.bottom-right {
    bottom: 20px;
    right: 20px;
    border-bottom: 1px solid;
    border-right: 1px solid;
}

/* ---------- 主内容层 ---------- */
.home-content {
    position: relative;
    z-index: var(--z-content);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
}

/* ---------- 标题 ---------- */
.home-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.game-title {
    font-family: var(--font-cn);
    font-weight: 900;
    font-size: var(--text-5xl);
    color: var(--text-gold);
    letter-spacing: 16px;
    text-shadow:
        0 0 30px rgba(180, 140, 80, 0.3),
        0 0 60px rgba(100, 60, 30, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.5);
    animation: titleBreathe 3s ease-in-out infinite;
    line-height: 1.3;
}

@keyframes titleBreathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.game-subtitle {
    font-family: var(--font-en);
    font-size: var(--text-lg);
    color: var(--text-muted);
    letter-spacing: 8px;
    margin-top: var(--spacing-sm);
    position: relative;
}

.game-subtitle::before,
.game-subtitle::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--border-gold);
    vertical-align: middle;
    margin: 0 var(--spacing-md);
}

/* ---------- 按钮区域 ---------- */
.home-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.menu-btn {
    width: 300px;
    height: 58px;
    background: linear-gradient(135deg, rgba(20, 10, 8, 0.85), rgba(30, 15, 10, 0.75));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    color: var(--text-gold);
    font-family: var(--font-cn);
    font-size: var(--text-lg);
    font-weight: 600;
    letter-spacing: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    opacity: 0;
    transform: translateY(40px);
    animation: btnSlideIn 0.5s ease-out forwards;
}

.menu-btn:nth-child(1) { animation-delay: 0.2s; }
.menu-btn:nth-child(2) { animation-delay: 0.3s; }
.menu-btn:nth-child(3) { animation-delay: 0.4s; }
.menu-btn:nth-child(4) { animation-delay: 0.5s; }
.menu-btn:nth-child(5) { animation-delay: 0.6s; }
.menu-btn:nth-child(6) { animation-delay: 0.7s; }


@keyframes btnSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-icon {
    font-size: var(--text-xl);
    transition: transform var(--transition-fast);
}

.menu-btn:hover {
    border-color: rgba(180, 140, 80, 0.8);
    background: linear-gradient(135deg, rgba(30, 18, 12, 0.9), rgba(40, 22, 15, 0.8));
    transform: translateY(-4px);
    box-shadow:
        0 4px 20px var(--shadow-gold),
        inset 0 0 30px rgba(180, 140, 80, 0.05);
}

.menu-btn:hover .btn-icon {
    transform: rotate(5deg) scale(1.1);
}

.menu-btn:active {
    transform: scale(0.97);
    border-color: var(--accent-gold);
    background: linear-gradient(135deg, rgba(15, 8, 5, 0.95), rgba(20, 10, 8, 0.85));
}

/* ---------- 底部状态栏 ---------- */
.home-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-lg) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: var(--z-content);
    pointer-events: none;
}

.footer-left,
.footer-right {
    pointer-events: auto;
}

.settings-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-muted);
    font-size: var(--text-sm);
    transition: all var(--transition-normal);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
}

.settings-btn:hover {
    color: var(--text-gold);
    transform: rotate(90deg);
}

.version-text {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-family: var(--font-en);
    letter-spacing: 1px;
}

/* ============================================================
   怪物图鉴样式
   ============================================================ */

.monster-collection-panel {
    padding: 0;
    color: #d4c9a8;
    font-family: var(--font-cn, serif);
}

.monster-collection-panel .collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #3a2a1a;
    background: rgba(0,0,0,0.3);
}

.monster-collection-panel .collection-header h2 {
    margin: 0;
    font-size: 20px;
    color: #d4c9a8;
    letter-spacing: 4px;
}

.monster-collection-body {
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
}

/* 标签栏 */
.collection-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.collection-tab {
    padding: 6px 16px;
    background: rgba(0,0,0,0.4);
    border: 1px solid #3a2a1a;
    border-radius: 4px;
    color: #a09880;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    font-family: var(--font-cn, serif);
}

.collection-tab:hover {
    border-color: #6a5a4a;
    color: #d4c9a8;
    background: rgba(30,20,10,0.5);
}

.collection-tab.active {
    border-color: #d4c9a8;
    color: #d4c9a8;
    background: rgba(60,40,20,0.4);
}

/* 怪物网格 */
.monster-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

/* 怪物卡片 */
.monster-collection-card {
    background: linear-gradient(135deg, #1a1010 0%, #2a1a1a 100%);
    border: 1px solid #3a2a1a;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.monster-collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    border-color: #6a5a4a;
}

.monster-card-image {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid #2a1a1a;
    padding: 4px;
    position: relative;
}

.monster-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.monster-collection-card:hover .monster-card-image img {
    transform: scale(1.08);
}


.monster-card-info {
    padding: 8px 10px;
}

.monster-card-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monster-card-id {
    font-size: 11px;
    color: #6a5a4a;
    margin-bottom: 4px;
}

.monster-floor-tag {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    background: rgba(60,40,20,0.4);
    border: 1px solid #3a2a1a;
    border-radius: 3px;
    color: #a09880;
    margin-bottom: 4px;
}

.monster-floor-tag.boss-tag {
    background: rgba(100,60,0,0.3);
    border-color: #ff8800;
    color: #ffaa00;
}

.monster-card-stats {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #a09880;
}

.monster-card-click-hint {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 10px;
    color: #4a3a2a;
    opacity: 0;
    transition: opacity 0.3s;
}

.monster-collection-card:hover .monster-card-click-hint {
    opacity: 1;
}

.collection-empty {
    text-align: center;
    padding: 40px;
    color: #6a5a4a;
    font-size: 14px;
}

/* 怪物详情弹窗 */
.monster-detail-panel {
    padding: 0;
    color: #d4c9a8;
    font-family: var(--font-cn, serif);
}

.detail-header {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #3a2a1a;
    background: rgba(0,0,0,0.3);
}

.detail-image-container {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0,0,0,0.3);
    border: 1px solid #3a2a1a;
    padding: 4px;
}

.detail-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.detail-header-info {
    flex: 1;
    min-width: 0;
}

.detail-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 4px;
}

.detail-id {
    font-size: 12px;
    color: #6a5a4a;
    margin-bottom: 8px;
}

.detail-desc {
    font-size: 13px;
    color: #a09880;
    line-height: 1.6;
    margin-bottom: 12px;
}

.detail-stats-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid #2a1a1a;
    border-radius: 4px;
    font-size: 12px;
}

.detail-stat .stat-icon {
    font-size: 14px;
}

.detail-stat .stat-label {
    color: #6a5a4a;
}

.detail-stat .stat-value {
    color: #d4c9a8;
    font-weight: bold;
}

.detail-body {
    padding: 16px 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 16px;
}

.detail-section-title {
    font-size: 14px;
    font-weight: bold;
    color: #b44aff;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #2a1a1a;
}

.detail-mechanic {
    font-size: 13px;
    color: #ffaa00;
    padding: 6px 10px;
    background: rgba(100,60,0,0.15);
    border: 1px solid rgba(255,170,0,0.2);
    border-radius: 4px;
}

.detail-skill-item {
    padding: 6px 10px;
    background: rgba(0,0,0,0.2);
    border: 1px solid #2a1a1a;
    border-radius: 4px;
    margin-bottom: 6px;
}

.detail-skill-item .skill-name {
    font-size: 13px;
    color: #e8a84a;
    font-weight: bold;
    margin-bottom: 2px;
}

.detail-skill-item .skill-desc {
    font-size: 12px;
    color: #8a7a6a;
    line-height: 1.5;
}

.detail-phase-item {
    display: flex;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.2);
    border: 1px solid #2a1a1a;
    border-radius: 4px;
    margin-bottom: 6px;
}

.detail-phase-item .phase-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.detail-phase-item .phase-info {
    flex: 1;
}

.detail-phase-item .phase-name {
    font-size: 13px;
    color: #ff8800;
    font-weight: bold;
    margin-bottom: 2px;
}

.detail-phase-item .phase-desc {
    font-size: 12px;
    color: #8a7a6a;
    line-height: 1.5;
}

.detail-reward {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #a09880;
}


