* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --surface-light: #F8FAFC;
    --surface-blue: #EEF2FF;
    --card-bg: #FFFFFF;
    --accent-primary: #3B82F6;
    --accent-success: #10B981;
    --accent-warning: #F59E0B;
    --accent-purple: #8B5CF6;
    --accent-pink: #EC4899;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-placeholder: #94A3B8;
    --divider: #E2E8F0;
    --input-bg: #F1F5F9;
    --shadow-ambient: rgba(0, 0, 0, 0.07);
    --shadow-spot: rgba(0, 0, 0, 0.05);
    
    --slime-primary: #4ECDC4;
    --slime-secondary: #44A08D;
    --slime-light: #7BE0D9;
    --slime-dark: #2D8B83;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    --gradient-slime: linear-gradient(135deg, var(--slime-primary) 0%, var(--slime-secondary) 100%);
    --gradient-purple: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
    --gradient-blue: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-purple) 100%);
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--surface-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 20%, rgba(78, 205, 196, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 18px;
}

.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease 0.8s forwards;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--divider);
    border-top-color: var(--slime-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

main {
    position: relative;
    z-index: 1;
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(78, 205, 196, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 0.6s ease;
    position: relative;
    z-index: 1;
}

.hero-decoration {
    position: absolute;
    font-size: 24px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
    pointer-events: none;
}

.hero-decoration:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.hero-decoration:nth-child(2) { top: 20%; right: 15%; animation-delay: 0.5s; }
.hero-decoration:nth-child(3) { bottom: 30%; left: 8%; animation-delay: 1s; }
.hero-decoration:nth-child(4) { bottom: 20%; right: 12%; animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-icon {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.slime-container {
    position: relative;
    width: 180px;
    height: 140px;
    margin: 0 auto;
}

.slime-shadow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(78, 205, 196, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: shadowPulse 2s ease-in-out infinite;
}

@keyframes shadowPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.6; }
    50% { transform: translateX(-50%) scale(1.1); opacity: 0.4; }
}

.slime {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    animation: slimeFloat 3s ease-in-out infinite;
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes slimeFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

.slime-body {
    width: 120px;
    height: 100px;
    background: linear-gradient(145deg, var(--slime-light) 0%, var(--slime-primary) 30%, var(--slime-secondary) 100%);
    border-radius: 50% 50% 45% 45%;
    position: relative;
    box-shadow: 
        0 15px 35px rgba(78, 205, 196, 0.4),
        inset 0 -15px 30px rgba(0, 0, 0, 0.1),
        inset 0 15px 30px rgba(255, 255, 255, 0.4);
    animation: slimeSquish 2.5s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes slimeSquish {
    0%, 100% { transform: scale(1) translateZ(0); }
    50% { transform: scale(0.98) translateZ(0); }
}

.slime-highlight {
    position: absolute;
    top: 12px;
    left: 18px;
    width: 35px;
    height: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50%;
    filter: blur(2px);
}

.slime-highlight::after {
    content: '';
    position: absolute;
    top: 30px;
    left: 8px;
    width: 15px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    filter: blur(1px);
}

.slime-cheek {
    position: absolute;
    width: 18px;
    height: 10px;
    background: rgba(255, 150, 150, 0.5);
    border-radius: 50%;
    bottom: 35px;
    filter: blur(2px);
}

.slime-cheek.left { left: 12px; }
.slime-cheek.right { right: 12px; }

.slime-face {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.slime-eye {
    position: absolute;
    width: 18px;
    height: 22px;
    background: linear-gradient(180deg, #2D3748 0%, #1A202C 100%);
    border-radius: 50%;
    top: 32px;
    will-change: transform;
    transform: translateZ(0);
}

.slime-eye.blinking {
    animation: heroEyeBlink 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes heroEyeBlink {
    0% { transform: scaleY(1) translateZ(0); }
    20% { transform: scaleY(0.1) translateZ(0); }
    40% { transform: scaleY(0.1) translateZ(0); }
    100% { transform: scaleY(1) translateZ(0); }
}

.slime-eye.left { left: 28px; }
.slime-eye.right { right: 28px; }

.eye-shine {
    position: absolute;
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
    top: 4px;
    right: 3px;
}

.eye-shine::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    top: 10px;
    left: 2px;
}

.slime-mouth {
    position: absolute;
    width: 20px;
    height: 10px;
    border: 3px solid #2D3748;
    border-top: none;
    border-radius: 0 0 20px 20px;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
}

.slime-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.slime-particles span {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--slime-light);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 3s ease-in-out infinite;
}

.slime-particles span:nth-child(1) { left: 10%; animation-delay: 0s; }
.slime-particles span:nth-child(2) { left: 30%; animation-delay: 0.5s; }
.slime-particles span:nth-child(3) { left: 50%; animation-delay: 1s; }
.slime-particles span:nth-child(4) { left: 70%; animation-delay: 1.5s; }
.slime-particles span:nth-child(5) { left: 90%; animation-delay: 2s; }

@keyframes particleFloat {
    0% { bottom: 40px; opacity: 0; transform: scale(0.5); }
    20% { opacity: 0.8; }
    100% { bottom: 120px; opacity: 0; transform: scale(0.2); }
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: var(--gradient-slime);
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 16px rgba(78, 205, 196, 0.4);
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.primary-btn:hover::before {
    opacity: 1;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(78, 205, 196, 0.5);
}

.primary-btn:active {
    transform: translateY(0) scale(0.98);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--slime-primary);
    color: white;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.secondary-btn:hover {
    background: var(--slime-secondary);
    transform: translateY(-1px);
}

.secondary-btn:active {
    transform: scale(0.98);
}

.quick-actions-section {
    padding: 60px 0;
    background: var(--surface-light);
    position: relative;
}

.quick-actions-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--divider), transparent);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--divider);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-ambient);
}

.quick-action-card:hover {
    transform: translateY(-4px);
    border-color: var(--slime-primary);
    box-shadow: 0 8px 24px var(--shadow-ambient);
}

.quick-action-icon {
    font-size: 36px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--surface-blue), var(--surface-light));
    border-radius: var(--radius-lg);
}

.quick-action-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.quick-action-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

.pet-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--surface-light) 0%, var(--surface-blue) 100%);
    position: relative;
}

.pet-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--divider), transparent);
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    display: inline-block;
    width: 100%;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--gradient-slime);
    border-radius: 2px;
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-hover {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-slime);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-normal);
    filter: blur(8px);
}

.glow-effect:hover::after {
    opacity: 0.5;
}

.pet-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 4px 16px var(--shadow-ambient);
}

.pet-display {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
    align-items: flex-start;
}

.pet-stage {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    background: linear-gradient(180deg, #E8F5F3 0%, #D4EBE8 100%);
    border-radius: var(--radius-lg);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    contain: layout style;
}

.pet-stage .pet-ground {
    position: absolute;
    bottom: 15px;
    left: 50%;
    width: 60px;
    height: 10px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: all 0.2s ease;
}

.pet-slime {
    position: relative;
    cursor: pointer;
    transition: filter 0.3s ease;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    --pet-x: 0px;
    --pet-y: 0px;
    --pet-scale: 1;
}

.pet-slime:hover {
    filter: brightness(1.08);
}

.pet-slime.idle {
    animation: petFloat 2.5s ease-in-out infinite;
}

.pet-slime.jumping {
    animation: petJump 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pet-slime.falling {
    animation: petFall 0.35s ease-in;
}

.pet-slime.bouncing {
    animation: petBounce 0.45s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.pet-slime.happy-bounce {
    animation: petHappyBounce 0.7s ease-in-out;
}

.pet-slime.squish {
    animation: petSquish 0.25s ease-out;
}

.pet-slime.eating {
    animation: petEating 0.45s ease-in-out;
}

.pet-slime.physics-active {
    animation: none !important;
}

.pet-slime.physics-active.squish {
    animation: petSquishPhysics 0.25s ease-out !important;
}

.pet-slime.physics-active.happy-bounce {
    animation: petHappyBouncePhysics 0.7s ease-in-out !important;
}

@keyframes petJump {
    0% { transform: translateY(0); }
    15% { transform: translateY(5px); }
    40% { transform: translateY(-50px); }
    70% { transform: translateY(-35px); }
    100% { transform: translateY(0); }
}

@keyframes petFall {
    0% { transform: translateY(-30px); }
    60% { transform: translateY(5px); }
    100% { transform: translateY(0); }
}

@keyframes petBounce {
    0% { transform: translateY(0); }
    20% { transform: translateY(-20px); }
    40% { transform: translateY(0); }
    60% { transform: translateY(-10px); }
    80% { transform: translateY(0); }
    100% { transform: translateY(0); }
}

@keyframes petHappyBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(-5deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes petSquish {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

@keyframes petSquishPhysics {
    0% { transform: var(--pet-transform, translate(0, 0)) scale(1); }
    50% { transform: var(--pet-transform, translate(0, 0)) scale(0.92); }
    100% { transform: var(--pet-transform, translate(0, 0)) scale(1); }
}

@keyframes petHappyBouncePhysics {
    0%, 100% { transform: var(--pet-transform, translate(0, 0)) rotate(0deg); }
    25% { transform: var(--pet-transform, translate(0, 0)) rotate(-5deg); }
    50% { transform: var(--pet-transform, translate(0, 0)) rotate(0deg); }
    75% { transform: var(--pet-transform, translate(0, 0)) rotate(5deg); }
}

@keyframes petEating {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(0.95); }
    50% { transform: scale(1.03); }
    75% { transform: scale(0.97); }
}

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

.pet-slime-body {
    width: 80px;
    height: 65px;
    background: linear-gradient(145deg, var(--slime-light) 0%, var(--slime-primary) 40%, var(--slime-secondary) 100%);
    border-radius: 50% 50% 45% 45%;
    position: relative;
    box-shadow: 
        0 10px 25px rgba(78, 205, 196, 0.35),
        inset 0 -10px 20px rgba(0, 0, 0, 0.08),
        inset 0 10px 20px rgba(255, 255, 255, 0.35);
    transition: all 0.3s ease;
    will-change: transform;
    transform: translateZ(0);
}

.pet-slime-body::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    filter: blur(2px);
}

.pet-slime-pouch {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 15px;
    background: linear-gradient(145deg, #FCA5A5 0%, #EF4444 50%, #DC2626 100%);
    border-radius: 50% 50% 30% 30%;
    box-shadow: 
        inset 0 3px 6px rgba(255, 255, 255, 0.4),
        0 2px 8px rgba(239, 68, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.pouch-x {
    color: rgba(255, 255, 255, 0.9);
    font-size: 8px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.pet-slime-highlight {
    position: absolute;
    top: 8px;
    left: 12px;
    width: 22px;
    height: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50%;
    filter: blur(1px);
}

.pet-slime-cheek {
    position: absolute;
    width: 12px;
    height: 7px;
    background: rgba(255, 150, 150, 0.45);
    border-radius: 50%;
    bottom: 22px;
    filter: blur(1px);
}

.pet-slime-cheek.left { left: 8px; }
.pet-slime-cheek.right { right: 8px; }

.pet-slime-face {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.pet-slime-eye {
    position: absolute;
    width: 12px;
    height: 15px;
    background: linear-gradient(180deg, #2D3748 0%, #1A202C 100%);
    border-radius: 50%;
    top: 20px;
    will-change: transform;
    transform: translateZ(0);
    transition: transform 0.2s ease, width 0.2s ease, height 0.2s ease;
    transform-origin: center center;
}

.pet-slime-eye.left { left: 18px; }
.pet-slime-eye.right { right: 18px; }

.pet-slime-eye.blinking {
    animation: eyeBlink 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes eyeBlink {
    0% { transform: scaleY(1) translateZ(0); }
    20% { transform: scaleY(0.1) translateZ(0); }
    40% { transform: scaleY(0.1) translateZ(0); }
    100% { transform: scaleY(1) translateZ(0); }
}

.pet-eye-shine {
    position: absolute;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    top: 3px;
    right: 2px;
}

.pet-slime-mouth {
    position: absolute;
    width: 14px;
    height: 7px;
    border: 2px solid #2D3748;
    border-top: none;
    border-radius: 0 0 14px 14px;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: center center;
    transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease;
}

.pet-slime-mouth.happy {
    width: 18px;
    height: 10px;
    border-width: 2px;
}

.pet-slime-mouth.sad {
    border-radius: 14px 14px 0 0;
    border: 2px solid #2D3748;
    border-bottom: none;
    bottom: 18px;
}

.pet-slime-mouth.sleepy {
    width: 10px;
    height: 5px;
    border-radius: 50%;
    border: none;
    background: #2D3748;
}

.pet-ground {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 12px;
    background: radial-gradient(ellipse, rgba(78, 205, 196, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.pet-stage {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-stage::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(78, 205, 196, 0.1) 100%);
    border-radius: 50%;
}

.pet-stage.physics-enabled .pet-slime {
    position: absolute;
    transition: none;
}

.pet-stage.physics-enabled .pet-ground {
    position: absolute;
    bottom: 10px;
}

.pet-physics-particle {
    position: absolute;
    pointer-events: none;
    font-size: 16px;
    z-index: 100;
    animation: particleFade 1s ease-out forwards;
}

@keyframes particleFade {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.5);
    }
}

.pet-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(78, 205, 196, 0.3);
    animation: rippleExpand 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

.pet-emotion-bubble {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    white-space: nowrap;
    animation: bubblePop 0.3s ease-out;
    z-index: 50;
}

@keyframes bubblePop {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateX(-50%) scale(1.1);
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

.pet-eye-blink {
    animation: eyeBlink 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes eyeBlink {
    0% { transform: scaleY(1); }
    20% { transform: scaleY(0.1); }
    40% { transform: scaleY(0.1); }
    100% { transform: scaleY(1); }
}

.pet-slime-eye.blinking {
    animation: eyeBlink 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.pet-slime-eye.happy {
    transform: scaleY(0.6);
    border-radius: 50% 50% 0 0;
}

.pet-slime-eye.happy::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 3px;
    background: #2D3748;
    border-radius: 0 0 50% 50%;
}

.pet-slime-eye.confused {
    transform: scaleY(0.8);
}

.pet-slime-eye.confused.left {
    transform: scaleY(0.8) rotate(-10deg);
}

.pet-slime-eye.confused.right {
    transform: scaleY(0.8) rotate(10deg);
}

.pet-slime-eye.surprised {
    width: 14px;
    height: 16px;
}

.pet-slime-eye.surprised .pet-eye-shine {
    width: 6px;
    height: 6px;
}

.pet-slime-eye.sleepy {
    transform: scaleY(0.4);
}

.pet-slime-eye.angry {
    transform: rotate(-15deg);
}

.pet-slime-eye.angry.left {
    transform: rotate(15deg);
}

.pet-slime-eye.angry.right {
    transform: rotate(-15deg);
}

.pet-slime-eye.angry::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -2px;
    width: 16px;
    height: 4px;
    background: #2D3748;
    transform: rotate(-20deg);
    border-radius: 2px;
}

.pet-slime-eye.angry.right::before {
    transform: rotate(20deg);
    left: auto;
    right: -2px;
}

.pet-slime-mouth.happy {
    width: 20px;
    height: 12px;
    border-width: 2px;
}

.pet-slime-mouth.confused {
    width: 12px;
    height: 6px;
    border: none;
    background: #2D3748;
    border-radius: 0;
    transform: translateX(-50%) skewX(-10deg);
}

.pet-slime-mouth.surprised {
    width: 12px;
    height: 12px;
    border: none;
    background: #2D3748;
    border-radius: 50%;
    bottom: 19px;
}

.pet-slime-mouth.sleepy {
    width: 10px;
    height: 5px;
    border-radius: 50%;
    border: none;
    background: #2D3748;
}

.pet-slime-mouth.angry {
    width: 16px;
    height: 3px;
    border: none;
    background: #2D3748;
    border-radius: 2px;
    bottom: 20px;
    transform: translateX(-50%);
}

.pet-slime-cheek.blush {
    background: rgba(255, 100, 100, 0.6);
    width: 14px;
    height: 8px;
}

.pet-slime-cheek.pale {
    background: rgba(200, 200, 200, 0.3);
}

.pet-slime-body.excited {
    animation: bodyExcited 0.3s ease-in-out infinite;
}

@keyframes bodyExcited {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.pet-slime-body.tired {
    animation: bodyTired 2s ease-in-out infinite;
}

@keyframes bodyTired {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(2px); }
}

.pet-slime-body.angry-body {
    animation: bodyAngry 0.2s ease-in-out infinite;
}

@keyframes bodyAngry {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.pet-slime.wiggle {
    animation: petWiggle 0.5s ease-in-out;
}

@keyframes petWiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-8deg); }
    40% { transform: rotate(8deg); }
    60% { transform: rotate(-5deg); }
    80% { transform: rotate(5deg); }
}

.pet-slime.stretch {
    animation: petStretch 0.6s ease-in-out;
}

@keyframes petStretch {
    0% { transform: scale(1); }
    30% { transform: scale(0.95); }
    60% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.pet-slime.spin {
    animation: petSpin 0.8s ease-in-out;
}

@keyframes petSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(0.9); }
    100% { transform: rotate(360deg) scale(1); }
}

.pet-slime.dizzy {
    animation: petDizzy 1s ease-in-out;
}

@keyframes petDizzy {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    50% { transform: rotate(15deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

.pet-slime.celebrate {
    animation: petCelebrate 1s ease-in-out;
}

@keyframes petCelebrate {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    15% { transform: translateY(-20px) rotate(-10deg) scale(1.1); }
    30% { transform: translateY(0) rotate(10deg) scale(0.95); }
    45% { transform: translateY(-15px) rotate(-5deg) scale(1.05); }
    60% { transform: translateY(0) rotate(5deg) scale(1); }
    75% { transform: translateY(-8px) rotate(0deg) scale(1.02); }
}

.pet-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pet-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.pet-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.rename-btn {
    background: transparent;
    border: none;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    padding: 2px 6px;
    border-radius: 4px;
}

.rename-btn:hover {
    opacity: 1;
    background: rgba(78, 205, 196, 0.1);
}

.pet-level-badge {
    display: inline-block;
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.pet-exp-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pet-exp-bar {
    flex: 1;
    height: 6px;
    background: var(--input-bg);
    border-radius: 3px;
    overflow: hidden;
}

.pet-exp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--slime-primary), var(--slime-secondary));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.pet-exp-text {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.pet-mood {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.pet-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    width: 50px;
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: var(--input-bg);
    border-radius: 4px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.stat-fill.hunger {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.stat-fill.happiness {
    background: linear-gradient(90deg, #EC4899, #F472B6);
}

.stat-fill.energy {
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
}

.pet-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.pet-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--input-bg);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pet-action-btn:hover {
    background: var(--slime-primary);
    transform: translateY(-2px);
}

.pet-action-btn:hover .action-icon,
.pet-action-btn:hover .action-text {
    color: white;
}

.action-icon {
    font-size: 24px;
}

.action-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.pet-message {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 12px;
    background: var(--input-bg);
    border-radius: var(--radius-md);
}

.pet-inventory {
    margin-top: 16px;
    padding: 16px;
    background: var(--input-bg);
    border-radius: var(--radius-lg);
}

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

.inventory-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.inventory-coins {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-warning);
}

.inventory-items {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.inventory-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.inventory-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-ambient);
}

.inventory-item.empty {
    opacity: 0.5;
    cursor: not-allowed;
}

.inventory-item.empty:hover {
    transform: none;
    box-shadow: none;
}

.item-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.item-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--slime-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.inventory-item.empty .item-count {
    background: var(--text-placeholder);
}

.inventory-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.inventory-tab {
    flex: 1;
    padding: 8px 12px;
    background: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.inventory-tab.active {
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    color: white;
    border-color: transparent;
}

.inventory-content {
    position: relative;
}

.inventory-panel {
    display: none;
}

.inventory-panel.active {
    display: block;
}

.equipment-slots {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.equipment-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: var(--card-bg);
    border: 2px dashed var(--divider);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.equipment-slot:hover {
    border-color: var(--slime-primary);
    background: rgba(78, 205, 196, 0.05);
}

.equipment-slot.equipped {
    border-style: solid;
    border-color: var(--slime-primary);
    background: rgba(78, 205, 196, 0.1);
}

.slot-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.slot-name {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.slot-equipped {
    font-size: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.equipment-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.equipment-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: var(--card-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.equipment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-ambient);
    border-color: var(--slime-primary);
}

.equipment-item.equipped {
    border-color: var(--slime-primary);
    background: rgba(78, 205, 196, 0.1);
}

.equipment-item-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.equipment-item-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.equipment-item-stats {
    font-size: 9px;
    color: var(--slime-primary);
    margin-top: 2px;
}

.store-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.4);
}

.store-btn:active {
    transform: translateY(0);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--divider);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.rename-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--divider);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text-primary);
    background: var(--input-bg);
    outline: none;
    transition: border-color 0.2s ease;
}

.rename-input:focus {
    border-color: var(--slime-primary);
}

.rename-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.rename-error {
    font-size: 12px;
    color: #EF4444;
    margin-top: 8px;
    min-height: 16px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--divider);
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn.cancel {
    background: var(--input-bg);
    color: var(--text-secondary);
}

.modal-btn.cancel:hover {
    background: var(--divider);
}

.modal-btn.confirm {
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    color: white;
}

.modal-btn.confirm:hover {
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.store-modal {
    max-width: 450px;
}

.store-coins {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
    border-bottom: 1px solid var(--divider);
}

.store-coins-value {
    font-size: 18px;
    font-weight: 700;
    color: #F59E0B;
}

.store-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--divider);
}

.store-tab {
    flex: 1;
    padding: 10px;
    background: var(--input-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.store-tab.active {
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    color: white;
    border-color: transparent;
}

.store-content {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.store-panel {
    display: none;
}

.store-panel.active {
    display: block;
}

.store-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.store-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    background: var(--input-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.store-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-ambient);
    border-color: var(--slime-primary);
}

.store-item-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.store-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.store-item-desc {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 6px;
}

.store-item-price {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #F59E0B;
}

.rpg-battle-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.battle-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.player-panel, .boss-panel {
    padding: 12px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--divider);
}

.player-avatar-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.rpg-avatar {
    font-size: 32px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--slime-light), var(--slime-primary));
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.player-buffs {
    display: flex;
    gap: 4px;
}

.buff-icon {
    width: 20px;
    height: 20px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-blue);
    border-radius: 50%;
}

.player-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.player-stats-mini {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.player-stats-mini span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.boss-header-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.boss-icon-large {
    font-size: 28px;
}

.boss-info-text {
    display: flex;
    flex-direction: column;
}

.boss-name-large {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.boss-level-large {
    font-size: 11px;
    color: var(--text-secondary);
}

.boss-phase-indicator {
    margin-left: auto;
}

.phase-dots {
    display: flex;
    gap: 4px;
}

.phase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--divider);
    transition: all 0.3s ease;
}

.phase-dot.active {
    background: #8B5CF6;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

.boss-hp-bar {
    height: 20px;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 6px;
}

.boss-hp-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #EF4444, #F87171);
    transition: width 0.3s ease;
}

.boss-state-flags {
    display: flex;
    gap: 8px;
}

.state-flag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.1);
}

.state-flag.enrage {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.state-flag.shield {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.battle-arena-section {
    position: relative;
    height: 180px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arena-background {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.arena-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.rpg-enemy {
    position: relative;
    z-index: 2;
}

.enemy-sprite {
    font-size: 72px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    transition: all 0.3s ease;
}

.enemy-sprite.hit {
    animation: enemyHit 0.3s ease;
}

@keyframes enemyHit {
    0%, 100% { transform: translateX(0); filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)); }
    25% { transform: translateX(-10px); filter: drop-shadow(0 0 30px rgba(255, 0, 0, 0.5)); }
    75% { transform: translateX(10px); filter: drop-shadow(0 0 30px rgba(255, 0, 0, 0.5)); }
}

.enemy-sprite.attack {
    animation: enemyAttack 0.4s ease;
}

@keyframes enemyAttack {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.battle-arena-section.shake {
    animation: arenaShake 0.3s ease;
}

@keyframes arenaShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.rpg-battle-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.combo-display {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.combo-count {
    font-size: 28px;
    font-weight: 700;
    color: #F59E0B;
}

.combo-text {
    font-size: 12px;
    color: #FCD34D;
}

.energy-bar-container {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}

.energy-bar {
    height: 16px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.energy-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    transition: width 0.3s ease;
}

.battle-controls-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rpg-skill-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.rpg-skill {
    flex: 1;
    min-width: 60px;
    padding: 10px 8px;
    background: var(--card-bg);
    border: 2px solid var(--divider);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.rpg-skill:hover:not(:disabled) {
    border-color: var(--slime-primary);
    transform: translateY(-2px);
}

.rpg-skill:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rpg-skill.ultimate {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    border-color: rgba(139, 92, 246, 0.3);
}

.rpg-skill.ultimate:not(:disabled) {
    animation: ultimateGlow 2s infinite;
}

@keyframes ultimateGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.6); }
}

.skill-icon {
    font-size: 20px;
}

.skill-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.rpg-battle-log {
    padding: 10px;
    background: var(--surface-blue);
    border-radius: var(--radius-lg);
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

.rpg-battle-log .log-entry.warning {
    color: #F59E0B;
    font-weight: 600;
}

.rpg-battle-log .log-entry.player-action {
    color: var(--slime-primary);
}

.rpg-battle-log .log-entry.enemy-action {
    color: #EF4444;
}

.rpg-battle-log .log-entry.heal-action {
    color: #10B981;
}

.rpg-battle-log .log-entry.critical-action {
    color: #F59E0B;
    font-weight: 600;
}

.boss-select-section {
    padding: 12px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--divider);
}

.boss-select-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.boss-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.boss-btn {
    padding: 10px 8px;
    background: var(--surface-blue);
    border: 2px solid var(--divider);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.boss-btn.unlocked {
    border-color: var(--slime-primary);
}

.boss-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--slime-primary);
}

.boss-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.boss-btn .boss-icon {
    font-size: 24px;
}

.boss-btn .boss-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.boss-btn .boss-level {
    font-size: 10px;
    color: var(--text-secondary);
}

.battle-arena-v3 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.battle-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--radius-xl);
    padding: 12px 16px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.boss-info-compact {
    display: flex;
    align-items: center;
    gap: 12px;
}

.boss-icon-small {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.3));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(139, 92, 246, 0.5);
    flex-shrink: 0;
}

.boss-icon-small span {
    font-size: 28px;
}

.boss-meta {
    flex: 1;
    min-width: 0;
}

.boss-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.boss-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.boss-level {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    color: #C4B5FD;
}

.boss-hp-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.boss-hp-bar {
    flex: 1;
    height: 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.boss-hp-bar .hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #DC2626, #EF4444, #F87171);
    transition: width 0.3s ease;
    position: relative;
}

.boss-hp-bar .hp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
}

.boss-hp-text {
    font-size: 12px;
    color: #FCA5A5;
    white-space: nowrap;
}

.boss-status-flags {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.status-tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.status-tag.enrage {
    background: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.status-tag.shield {
    background: rgba(59, 130, 246, 0.3);
    color: #93C5FD;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.battle-stage-v3 {
    position: relative;
    height: 200px;
    background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.stage-bg {
    position: absolute;
    inset: 0;
}

.stage-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
}

.stage-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.arena-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(139, 92, 246, 0.6);
    border-radius: 50%;
    animation: particleFloat 4s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-20px) scale(1.5); opacity: 1; }
}

.boss-entity {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.boss-model {
    font-size: 80px;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
    transition: all 0.3s ease;
    animation: bossIdle 3s ease-in-out infinite;
}

@keyframes bossIdle {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.02); }
}

.boss-model.hit {
    animation: bossHit 0.3s ease;
}

@keyframes bossHit {
    0%, 100% { transform: translateX(0); filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3)); }
    25% { transform: translateX(-15px); filter: drop-shadow(0 0 40px rgba(255, 0, 0, 0.8)); }
    75% { transform: translateX(15px); filter: drop-shadow(0 0 40px rgba(255, 0, 0, 0.8)); }
}

.boss-model.attack {
    animation: bossAttack 0.4s ease;
}

@keyframes bossAttack {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.damage-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 15;
}

.effects-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.damage-number {
    position: absolute;
    font-size: 24px;
    font-weight: 900;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    animation: damageFloat 1s ease-out forwards;
    pointer-events: none;
}

.damage-number.player {
    color: #FCA5A5;
}

.damage-number.enemy {
    color: #FCD34D;
}

.damage-number.critical {
    font-size: 32px;
    color: #F59E0B;
    animation: criticalFloat 1s ease-out forwards;
}

.damage-number.heal {
    color: #6EE7B7;
}

@keyframes damageFloat {
    0% { transform: translateY(0) scale(0.5); opacity: 1; }
    50% { transform: translateY(-30px) scale(1.2); opacity: 1; }
    100% { transform: translateY(-60px) scale(1); opacity: 0; }
}

@keyframes criticalFloat {
    0% { transform: translateY(0) scale(0.5) rotate(-5deg); opacity: 1; }
    30% { transform: translateY(-20px) scale(1.5) rotate(5deg); opacity: 1; }
    100% { transform: translateY(-80px) scale(1) rotate(0deg); opacity: 0; }
}

.player-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1) 0%, rgba(68, 160, 141, 0.1) 100%);
    border-radius: var(--radius-xl);
    padding: 10px 14px;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.player-avatar-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, var(--slime-light), var(--slime-primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 2px 12px rgba(78, 205, 196, 0.4);
    flex-shrink: 0;
}

.player-bars-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-bar {
    height: 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}

.stat-bar .bar-fill {
    height: 100%;
    transition: width 0.3s ease;
    position: relative;
}

.stat-bar .bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
}

.stat-bar.hp .bar-fill {
    background: linear-gradient(90deg, #10B981, #34D399, #6EE7B7);
}

.stat-bar.mp .bar-fill {
    background: linear-gradient(90deg, #3B82F6, #60A5FA, #93C5FD);
}

.stat-bar.energy .bar-fill {
    background: linear-gradient(90deg, #8B5CF6, #A78BFA, #C4B5FD);
}

.stat-bar .bar-label {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stat-bar .bar-value {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.player-stats-mini {
    display: flex;
    gap: 10px;
    margin-left: auto;
    font-size: 11px;
    color: var(--text-secondary);
}

.player-stats-mini span {
    display: flex;
    align-items: center;
    gap: 2px;
}

.player-stats-mini span span {
    font-weight: 600;
    color: var(--text-primary);
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.skill-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 2px;
}

.skill-tile:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--slime-primary);
    box-shadow: 0 4px 16px rgba(78, 205, 196, 0.3);
}

.skill-tile:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.skill-tile .skill-icon {
    font-size: 20px;
}

.skill-tile .skill-name {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.skill-tile .skill-cost {
    font-size: 9px;
    padding: 1px 4px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
    color: #93C5FD;
}

.skill-tile .skill-cost.free {
    background: rgba(16, 185, 129, 0.3);
    color: #6EE7B7;
}

.skill-tile .skill-cost.max {
    background: rgba(139, 92, 246, 0.3);
    color: #C4B5FD;
}

.skill-tile.ultimate {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    border-color: rgba(139, 92, 246, 0.4);
}

.skill-tile.ultimate:not(:disabled) {
    animation: ultimateReady 2s ease-in-out infinite;
}

@keyframes ultimateReady {
    0%, 100% { box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 25px rgba(139, 92, 246, 0.6); }
}

.battle-log {
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.battle-log .log-text {
    font-size: 13px;
    color: #fff;
}

.boss-selector {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 12px;
    border: 1px solid var(--divider);
}

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

.selector-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.selector-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.boss-list-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.boss-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: linear-gradient(135deg, rgba(0,0,0,0.05), rgba(0,0,0,0.02));
    border: 2px solid var(--divider);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 2px;
}

.boss-tile.unlocked {
    border-color: var(--slime-primary);
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(68, 160, 141, 0.05));
}

.boss-tile.locked {
    opacity: 0.6;
}

.boss-tile:hover:not(.locked) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.boss-tile .tile-icon {
    font-size: 24px;
}

.boss-tile .tile-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.boss-tile .tile-level {
    font-size: 9px;
    color: var(--text-secondary);
}

.boss-tile .lock-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .battle-stage-v3 {
        height: 160px;
    }
    
    .boss-model {
        font-size: 60px;
    }
    
    .skill-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .boss-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .player-status-bar {
        flex-wrap: wrap;
    }
    
    .player-stats-mini {
        width: 100%;
        justify-content: center;
        margin-top: 6px;
    }
}

.quick-actions-section {
    display: none;
}

.boss-card .card-hp {
    font-size: 10px;
    color: #EF4444;
    margin-top: 4px;
}

.boss-card .lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.rpg-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rpg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--input-bg);
    border-radius: var(--radius-lg);
}

.rpg-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rpg-avatar-wrapper {
    position: relative;
}

.rpg-avatar {
    font-size: 36px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--slime-light), var(--slime-primary));
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
    transition: transform 0.3s ease;
}

.rpg-avatar.shake {
    animation: avatarShake 0.3s ease;
}

@keyframes avatarShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.player-buffs, .enemy-buffs {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    gap: 2px;
}

.buff-icon {
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 50%;
    border: 1px solid var(--divider);
    animation: buffPulse 1.5s ease-in-out infinite;
}

@keyframes buffPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.rpg-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.rpg-bar {
    height: 18px;
    background: var(--card-bg);
    border-radius: 9px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--divider);
}

.rpg-bar .bar-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 8px;
}

.rpg-bar.hp-bar .bar-fill {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

.rpg-bar.mp-bar .bar-fill {
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
}

.rpg-bar.energy-bar .bar-fill {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.rpg-bar.energy-bar .bar-fill.full {
    animation: energyGlow 1s ease-in-out infinite;
}

@keyframes energyGlow {
    0%, 100% { box-shadow: 0 0 5px #F59E0B; }
    50% { box-shadow: 0 0 15px #F59E0B, 0 0 25px #F59E0B; }
}

.rpg-bar.enemy-hp-bar .bar-fill {
    background: linear-gradient(90deg, #DC2626, #F87171);
}

.rpg-bar .bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.rpg-stats-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.rpg-stat {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.rpg-stat span:last-child {
    color: var(--slime-primary);
}

.rpg-battle-arena {
    position: relative;
    height: 320px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10px;
}

.boss-info-panel {
    width: calc(100% - 20px);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
}

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

.boss-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.boss-icon-large {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.boss-details {
    display: flex;
    flex-direction: column;
}

.boss-name-large {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.boss-level-large {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.boss-phase-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phase-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.phase-dots {
    display: flex;
    gap: 4px;
}

.phase-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.phase-dot.active {
    background: #10B981;
    border-color: #10B981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.phase-dot.passed {
    background: #F59E0B;
    border-color: #F59E0B;
}

.boss-hp-container {
    margin-bottom: 8px;
}

.boss-hp-bar {
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.hp-segments {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
}

.hp-segment {
    height: 100%;
    border-right: 2px solid rgba(0, 0, 0, 0.5);
}

.hp-segment:last-child {
    border-right: none;
}

.boss-hp-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #DC2626 0%, #EF4444 50%, #F87171 100%);
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.boss-hp-bar .bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
}

.boss-hp-bar .bar-fill.enraged {
    background: linear-gradient(90deg, #7C2D12 0%, #DC2626 50%, #EF4444 100%);
    animation: enragedPulse 1s ease-in-out infinite;
}

@keyframes enragedPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.boss-hp-bar .bar-fill.low-hp {
    animation: lowHpFlash 0.5s ease-in-out infinite;
}

@keyframes lowHpFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hp-change-indicator {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    width: 0;
    transition: width 0.3s ease;
    pointer-events: none;
}

.boss-hp-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    padding: 0 4px;
}

.boss-hp-text span {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hp-percent {
    color: #FBBF24 !important;
}

.boss-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 24px;
}

.boss-buffs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.boss-buffs .buff-icon {
    width: 24px;
    height: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 4px;
    animation: buffPulse 1.5s ease-in-out infinite;
}

.boss-state-flags {
    display: flex;
    gap: 6px;
}

.state-flag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    animation: flagPulse 1s ease-in-out infinite;
}

.state-flag.enrage {
    background: linear-gradient(135deg, #DC2626, #991B1B);
    color: white;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.state-flag.shield {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    color: white;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

@keyframes flagPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.flag-icon {
    font-size: 12px;
}

.boss-skill-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(239, 68, 68, 0.3));
    border: 1px solid rgba(245, 158, 11, 0.5);
    border-radius: var(--radius-md);
    margin-top: 8px;
    animation: skillPreviewPulse 1s ease-in-out infinite;
}

@keyframes skillPreviewPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.6); }
}

.skill-preview-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-preview-icon {
    font-size: 20px;
}

.skill-preview-name {
    font-size: 12px;
    font-weight: 700;
    color: #FBBF24;
}

.arena-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.arena-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.arena-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-20px) scale(1.5); opacity: 0.6; }
}

.rpg-enemy-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.rpg-enemy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: enemyIdle 2s ease-in-out infinite;
}

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

.rpg-enemy.attacking {
    animation: enemyAttack 0.5s ease-out;
}

@keyframes enemyAttack {
    0% { transform: translateY(0) scale(1); }
    30% { transform: translateY(30px) scale(1.2); }
    100% { transform: translateY(0) scale(1); }
}

.rpg-enemy.hurt {
    animation: enemyHurt 0.3s ease-out;
}

@keyframes enemyHurt {
    0%, 100% { transform: translateX(0); filter: brightness(1); }
    25% { transform: translateX(-10px); filter: brightness(2); }
    75% { transform: translateX(10px); filter: brightness(0.5); }
}

.enemy-sprite {
    font-size: 64px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.enemy-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.enemy-level {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: -4px;
}

.rpg-battle-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.battle-effect {
    position: absolute;
    font-size: 32px;
    animation: effectPop 0.6s ease-out forwards;
}

@keyframes effectPop {
    0% { transform: scale(0) rotate(-10deg); opacity: 1; }
    50% { transform: scale(1.5) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg) translateY(-30px); opacity: 0; }
}

.damage-number {
    position: absolute;
    font-size: 24px;
    font-weight: 900;
    animation: damageFloat 1s ease-out forwards;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.damage-number.player {
    color: #EF4444;
}

.damage-number.enemy {
    color: #FBBF24;
}

.damage-number.heal {
    color: #10B981;
}

.damage-number.critical {
    font-size: 32px;
    color: #F59E0B;
    animation: damageFloatCritical 1s ease-out forwards;
}

@keyframes damageFloatCritical {
    0% { transform: translateY(0) scale(0.5) rotate(-10deg); opacity: 1; }
    30% { transform: translateY(-10px) scale(1.5) rotate(5deg); opacity: 1; }
    100% { transform: translateY(-50px) scale(1) rotate(0deg); opacity: 0; }
}

@keyframes damageFloat {
    0% { transform: translateY(0) scale(0.5); opacity: 1; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
    100% { transform: translateY(-50px) scale(1); opacity: 0; }
}

.combo-display {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: comboAppear 0.3s ease;
}

@keyframes comboAppear {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.combo-count {
    font-size: 48px;
    font-weight: 900;
    color: #F59E0B;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.8), 0 4px 8px rgba(0, 0, 0, 0.5);
    animation: comboPulse 0.5s ease infinite;
}

@keyframes comboPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.combo-text {
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}

.rpg-passive-panel {
    padding: 12px 16px;
    background: var(--input-bg);
    border-radius: var(--radius-lg);
}

.rpg-passive-panel h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.passive-skills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.passive-skill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: var(--card-bg);
    border: 2px solid var(--divider);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.passive-skill:hover {
    border-color: var(--slime-primary);
}

.passive-skill.active {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}

.passive-icon {
    font-size: 20px;
}

.passive-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
}

.passive-skill.active .passive-name {
    color: #10B981;
}

.rpg-skills-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rpg-skill-bar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.rpg-skill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 6px;
    background: var(--input-bg);
    border: 2px solid var(--divider);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.rpg-skill:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--slime-primary);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.2);
}

.rpg-skill:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rpg-skill.on-cooldown {
    background: var(--divider);
    border-color: transparent;
}

.rpg-skill.on-cooldown::after {
    content: attr(data-cooldown);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 900;
    color: var(--text-primary);
}

.rpg-skill.ultimate {
    border-color: #F59E0B;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.1), transparent);
}

.rpg-skill.ultimate.ready {
    animation: ultimateGlow 1s ease-in-out infinite;
}

@keyframes ultimateGlow {
    0%, 100% { box-shadow: 0 0 5px #F59E0B; }
    50% { box-shadow: 0 0 20px #F59E0B, 0 0 30px #F59E0B; }
}

.skill-icon {
    font-size: 20px;
}

.skill-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
}

.skill-cost {
    font-size: 9px;
    color: var(--text-secondary);
    background: var(--divider);
    padding: 1px 4px;
    border-radius: 4px;
}

.rpg-skill-cooldowns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cooldown-indicator {
    padding: 4px 8px;
    background: var(--divider);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-secondary);
}

.rpg-boss-select {
    padding: 16px;
    background: var(--input-bg);
    border-radius: var(--radius-lg);
}

.rpg-boss-select h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.defeated-count {
    color: #10B981;
    font-size: 12px;
}

.boss-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.boss-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--card-bg);
    border: 2px solid var(--divider);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.boss-btn.unlocked {
    border-color: var(--slime-primary);
}

.boss-btn.unlocked:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.3);
    background: linear-gradient(145deg, rgba(78, 205, 196, 0.1), transparent);
}

.boss-btn:not(.unlocked) {
    opacity: 0.5;
    cursor: not-allowed;
}

.boss-btn.defeated {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}

.boss-icon {
    font-size: 28px;
}

.boss-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.boss-level {
    font-size: 10px;
    color: var(--text-secondary);
}

.boss-hp-info {
    font-size: 9px;
    color: var(--text-tertiary);
}

.rpg-battle-log-container {
    background: var(--input-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.rpg-battle-log-container h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 10px 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--divider);
}

.rpg-battle-log {
    padding: 12px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    max-height: 120px;
    overflow-y: auto;
}

.log-entry {
    padding: 4px 0;
    border-bottom: 1px solid var(--divider);
    animation: logSlide 0.3s ease;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.player-action {
    color: var(--slime-primary);
}

.log-entry.enemy-action {
    color: #EF4444;
}

.log-entry.heal-action {
    color: #10B981;
}

.log-entry.critical-action {
    color: #F59E0B;
    font-weight: 700;
}

@keyframes logSlide {
    0% { transform: translateX(-10px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.rpg-rewards {
    padding: 20px;
    background: linear-gradient(145deg, rgba(78, 205, 196, 0.1), rgba(78, 205, 196, 0.05));
    border-radius: var(--radius-lg);
    border: 2px solid var(--slime-primary);
    text-align: center;
}

.rpg-rewards h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.battle-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.battle-stat-item {
    padding: 10px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
}

.battle-stat-label {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.battle-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--slime-primary);
}

.reward-items {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
}

.reward-icon {
    font-size: 28px;
}

.reward-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--slime-primary);
}

.games-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--surface-blue) 0%, var(--surface-light) 100%);
    position: relative;
}

.games-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--divider), transparent);
}

.game-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    box-shadow: 0 4px 20px var(--shadow-ambient);
    border: 1px solid var(--divider);
}

.game-tabs::-webkit-scrollbar {
    display: none;
}

.game-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.game-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 0;
}

.game-tab > * {
    position: relative;
    z-index: 1;
}

.tab-icon {
    font-size: 26px;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-text {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

.game-tab:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px var(--shadow-ambient);
    border-color: var(--slime-primary);
}

.game-tab:hover .tab-icon {
    transform: scale(1.15) rotate(-5deg);
}

.game-tab:active {
    transform: translateY(-1px) scale(0.98);
}

.game-tab.active {
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 24px rgba(78, 205, 196, 0.4);
}

.game-tab.active::before {
    opacity: 1;
}

.game-tab.active .tab-icon {
    transform: scale(1.2);
}

.game-card {
    display: none;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    animation: cardIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid var(--divider);
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--slime-primary), var(--slime-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card.active::before {
    opacity: 1;
}

.game-card.active {
    display: block;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.game-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
    padding-bottom: 12px;
}

.game-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--slime-primary), var(--slime-secondary));
    border-radius: 2px;
}

.calculator-wrapper {
    max-width: 280px;
    margin: 0 auto;
}

.calc-display {
    margin-bottom: 16px;
}

.calc-display input {
    width: 100%;
    height: 64px;
    background: linear-gradient(145deg, var(--input-bg), var(--card-bg));
    border: 2px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 0 20px;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calc-display input:focus {
    border-color: var(--slime-primary);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.05),
        0 0 0 3px rgba(78, 205, 196, 0.15);
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    height: 56px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.calc-btn.num {
    background: linear-gradient(145deg, #FFFFFF, var(--input-bg));
    color: var(--text-primary);
    border: 1px solid var(--divider);
}

.calc-btn.num:hover {
    background: linear-gradient(145deg, var(--input-bg), #FFFFFF);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.calc-btn.func {
    background: linear-gradient(145deg, #FEF3C7, #FDE68A);
    color: #D97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.calc-btn.func:hover {
    background: linear-gradient(145deg, #FDE68A, #FCD34D);
    transform: translateY(-1px);
}

.calc-btn.op {
    background: linear-gradient(145deg, #CCFBF1, #99F6E4);
    color: #0D9488;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.calc-btn.op:hover {
    background: linear-gradient(145deg, #99F6E4, #5EEAD4);
    transform: translateY(-1px);
}

.calc-btn.equals {
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    color: white;
    grid-column: span 2;
    border: none;
}

.calc-btn.equals:hover {
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.4);
    transform: translateY(-2px);
}

.calc-btn:active {
    transform: scale(0.95) translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.game-2048-wrapper,
.memory-wrapper,
.puzzle-wrapper,
.typing-wrapper,
.color-wrapper {
    max-width: 320px;
    margin: 0 auto;
}

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

.score-group {
    display: flex;
    gap: 10px;
}

.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 18px;
    background: linear-gradient(145deg, var(--input-bg), var(--card-bg));
    border-radius: var(--radius-md);
    min-width: 75px;
    border: 1px solid var(--divider);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.score-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 14px;
    background: linear-gradient(145deg, var(--input-bg), rgba(0, 0, 0, 0.03));
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
    border: 1px solid var(--divider);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.grid-cell {
    aspect-ratio: 1;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.grid-cell[data-value="2"] { 
    background: linear-gradient(145deg, #F8FAFC, #F1F5F9); 
    color: var(--text-secondary); 
}
.grid-cell[data-value="4"] { 
    background: linear-gradient(145deg, #E2E8F0, #CBD5E1); 
    color: var(--text-primary); 
}
.grid-cell[data-value="8"] { 
    background: linear-gradient(145deg, #FED7AA, #FDBA74); 
    color: #C2410C; 
}
.grid-cell[data-value="16"] { 
    background: linear-gradient(145deg, #FDBA74, #FB923C); 
    color: #C2410C; 
}
.grid-cell[data-value="32"] { 
    background: linear-gradient(145deg, #FB923C, #F97316); 
    color: white; 
}
.grid-cell[data-value="64"] { 
    background: linear-gradient(145deg, #F97316, #EA580C); 
    color: white; 
}
.grid-cell[data-value="128"] { 
    background: linear-gradient(145deg, #FDE047, #FACC15); 
    color: #854D0E; 
    font-size: 18px; 
}
.grid-cell[data-value="256"] { 
    background: linear-gradient(145deg, #FACC15, #EAB308); 
    color: #854D0E; 
    font-size: 18px; 
}
.grid-cell[data-value="512"] { 
    background: linear-gradient(145deg, #EAB308, #CA8A04); 
    color: white; 
    font-size: 16px; 
}
.grid-cell[data-value="1024"] { 
    background: linear-gradient(145deg, #A3E635, #84CC16); 
    color: #365314; 
    font-size: 14px; 
}
.grid-cell[data-value="2048"] { 
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary)); 
    color: white; 
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.game-hint {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    padding: 10px;
    background: var(--input-bg);
    border-radius: var(--radius-md);
}

.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 14px;
    background: linear-gradient(145deg, var(--input-bg), rgba(0, 0, 0, 0.03));
    border-radius: var(--radius-lg);
    border: 1px solid var(--divider);
}

.memory-card {
    aspect-ratio: 1;
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    box-shadow: 0 3px 8px rgba(78, 205, 196, 0.25);
}

.memory-card:hover {
    transform: scale(1.05) rotateY(5deg);
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.35);
}

.memory-card.flipped {
    background: linear-gradient(145deg, var(--card-bg), var(--input-bg));
    color: var(--text-primary);
    transform: rotateY(180deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.memory-card.matched {
    background: linear-gradient(145deg, #10B981, #059669);
    color: white;
    animation: matchPulse 0.4s ease;
}

@keyframes matchPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.typing-area {
    margin-bottom: 12px;
}

.typing-text {
    padding: 18px;
    background: linear-gradient(145deg, var(--input-bg), var(--card-bg));
    border-radius: var(--radius-lg);
    font-size: 18px;
    line-height: 1.9;
    margin-bottom: 14px;
    min-height: 90px;
    border: 1px solid var(--divider);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.03);
}

.typing-text .correct {
    color: #10B981;
    font-weight: 600;
}

.typing-text .incorrect {
    color: #EF4444;
    text-decoration: underline;
    background: rgba(239, 68, 68, 0.1);
    padding: 0 2px;
    border-radius: 2px;
}

.typing-text .current {
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    color: white;
    padding: 0 4px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(78, 205, 196, 0.3);
}

.typing-input {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    background: var(--card-bg);
    border: 2px solid var(--divider);
    border-radius: var(--radius-lg);
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.typing-input:focus {
    border-color: var(--slime-primary);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.03),
        0 0 0 3px rgba(78, 205, 196, 0.15);
}

.color-display {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    background: linear-gradient(145deg, var(--input-bg), var(--card-bg));
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    border: 1px solid var(--divider);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.color-word {
    font-size: 40px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.color-option {
    padding: 16px;
    background: linear-gradient(145deg, var(--card-bg), var(--input-bg));
    border: 2px solid var(--divider);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.color-option:hover {
    border-color: var(--slime-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.2);
}

.color-option.correct {
    background: linear-gradient(145deg, #D1FAE5, #A7F3D0);
    border-color: #10B981;
    color: #065F46;
}

.color-option.correct {
    background: #D1FAE5;
    border-color: var(--accent-success);
    color: var(--accent-success);
}

.color-option.incorrect {
    background: linear-gradient(145deg, #FEE2E2, #FECACA);
    border-color: #EF4444;
    color: #DC2626;
}

.puzzle-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 14px;
    background: linear-gradient(145deg, var(--input-bg), rgba(0, 0, 0, 0.03));
    border-radius: var(--radius-lg);
    border: 1px solid var(--divider);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.puzzle-piece {
    aspect-ratio: 1;
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 3px 8px rgba(78, 205, 196, 0.25);
}

.puzzle-piece:hover:not(.empty) {
    background: linear-gradient(145deg, var(--slime-secondary), #4FD1C5);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.35);
}

.puzzle-piece.empty {
    background: transparent;
    cursor: default;
    box-shadow: none;
}

.reaction-wrapper,
.sequence-wrapper {
    background: linear-gradient(145deg, var(--card-bg), var(--input-bg));
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--divider);
}

.reaction-area {
    height: 160px;
    background: linear-gradient(145deg, var(--input-bg), var(--card-bg));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 14px;
    user-select: none;
    border: 2px solid var(--divider);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

.reaction-area.waiting {
    background: linear-gradient(145deg, #FCA5A5, #EF4444);
    border-color: #DC2626;
    color: white;
}

.reaction-area.ready {
    background: linear-gradient(145deg, #6EE7B7, #10B981);
    border-color: #059669;
    color: white;
    animation: readyPulse 0.5s ease infinite;
}

@keyframes readyPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
}

.reaction-area.too-early {
    background: linear-gradient(145deg, #FCD34D, #F59E0B);
    border-color: #D97706;
    color: white;
}

.reaction-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.reaction-area.waiting .reaction-text,
.reaction-area.ready .reaction-text,
.reaction-area.too-early .reaction-text {
    color: white;
}

.sequence-display {
    height: 90px;
    background: linear-gradient(145deg, var(--input-bg), var(--card-bg));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border: 1px solid var(--divider);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sequence-text {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 10px;
}

.sequence-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.sequence-btn {
    padding: 18px;
    background: linear-gradient(145deg, var(--slime-primary), var(--slime-secondary));
    border: none;
    border-radius: var(--radius-md);
    font-size: 22px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 3px 8px rgba(78, 205, 196, 0.25);
}

.sequence-btn:hover {
    background: linear-gradient(145deg, var(--slime-secondary), #4FD1C5);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.35);
}

.sequence-btn:active {
    transform: scale(0.95) translateY(0);
}

.sequence-btn.correct {
    background: linear-gradient(145deg, #10B981, #059669);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.35);
}

.sequence-btn.wrong {
    background: linear-gradient(145deg, #EF4444, #DC2626);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35);
}

.sequence-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.about-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--surface-light) 0%, var(--surface-blue) 100%);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--divider), transparent);
}

.about-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: 0 4px 20px var(--shadow-ambient);
    border: 1px solid var(--divider);
}

.about-item {
    margin-bottom: 24px;
}

.about-item:last-child {
    margin-bottom: 0;
}

.about-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--slime-dark);
    margin-bottom: 8px;
}

.about-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-item ul {
    list-style: none;
    padding: 0;
}

.about-item li {
    position: relative;
    padding-left: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-item li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--slime-primary);
    border-radius: 50%;
}

.achievements-section,
.daily-section,
.collection-section,
.leaderboard-section,
.tips-section {
    padding: 80px 0;
    position: relative;
}

.data-center-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--surface-blue) 0%, var(--surface-light) 100%);
    position: relative;
}

.data-center-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--divider), transparent);
}

.data-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.data-tab {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 2px solid var(--divider);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.data-tab:hover {
    border-color: var(--slime-primary);
    color: var(--slime-primary);
}

.data-tab.active {
    background: var(--slime-primary);
    color: white;
    border-color: var(--slime-primary);
}

.data-panels {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: 0 4px 20px var(--shadow-ambient);
    border: 1px solid var(--divider);
}

.data-panel {
    display: none;
}

.data-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.achievement-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 24px;
}

.achievement-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.achievement-stat .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--slime-primary);
}

.achievement-stat .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.achievement-tabs,
.collection-tabs,
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.achievement-tab,
.collection-tab,
.leaderboard-tab {
    padding: 8px 16px;
    background: var(--input-bg);
    border: 1px solid var(--divider);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.achievement-tab.active,
.collection-tab.active,
.leaderboard-tab.active {
    background: var(--slime-primary);
    color: white;
    border-color: var(--slime-primary);
}

.achievement-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--divider);
    transition: all 0.2s ease;
}

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

.achievement-item.unlocked {
    border-color: var(--slime-primary);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent);
}

.achievement-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--input-bg);
    border-radius: var(--radius-md);
}

.achievement-item.unlocked .achievement-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.achievement-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.achievement-reward {
    font-size: 10px;
    color: var(--slime-primary);
    font-weight: 500;
}

.achievement-progress {
    width: 100%;
    height: 4px;
    background: var(--divider);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.achievement-progress-fill {
    height: 100%;
    background: var(--slime-primary);
    transition: width 0.3s ease;
}

.daily-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.daily-streak {
    display: flex;
    align-items: center;
    gap: 8px;
}

.streak-icon {
    font-size: 24px;
}

.streak-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--slime-primary);
}

.streak-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.daily-rewards {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rewards-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.rewards-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--slime-primary);
}

.daily-checkin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.checkin-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 48px;
    background: linear-gradient(135deg, var(--slime-primary), #059669);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.checkin-btn.checked {
    background: var(--divider);
    color: var(--text-secondary);
    cursor: default;
}

.checkin-btn.checked:hover {
    transform: none;
    box-shadow: none;
}

.checkin-icon {
    font-size: 20px;
}

.checkin-progress {
    width: 100%;
    max-width: 300px;
    text-align: center;
}

.checkin-progress .progress-bar {
    height: 8px;
    background: var(--divider);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.checkin-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--slime-primary), #34D399);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.daily-tasks {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.tasks-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--input-bg);
    border-radius: var(--radius-md);
}

.task-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
}

.task-info {
    flex: 1;
}

.task-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.task-progress {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.task-reward {
    padding: 6px 12px;
    background: var(--slime-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-reward:disabled {
    background: var(--divider);
    color: var(--text-secondary);
    cursor: default;
}

.task-reward.completed {
    background: #10B981;
}

.collection-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
}

.collection-stat,
.collection-progress {
    font-size: 13px;
    color: var(--text-secondary);
}

.collection-stat strong,
.collection-progress strong {
    color: var(--slime-primary);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.collection-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--divider);
    transition: all 0.2s ease;
    cursor: pointer;
}

.collection-item:hover {
    border-color: var(--slime-primary);
    transform: translateY(-2px);
}

.collection-item.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.collection-item-icon {
    font-size: 32px;
}

.collection-item-name {
    font-size: 11px;
    color: var(--text-primary);
    text-align: center;
}

.collection-item.locked .collection-item-name {
    color: var(--text-secondary);
}

.leaderboard-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.my-rank {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), transparent);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.rank-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.rank-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--slime-primary);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--input-bg);
    border-radius: var(--radius-md);
}

.leaderboard-item.top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), transparent);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.leaderboard-item.top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), transparent);
    border: 1px solid rgba(192, 192, 192, 0.3);
}

.leaderboard-item.top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), transparent);
    border: 1px solid rgba(205, 127, 50, 0.3);
}

.leaderboard-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--card-bg);
    border-radius: 50%;
}

.leaderboard-item.top-1 .leaderboard-rank {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
}

.leaderboard-item.top-2 .leaderboard-rank {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: white;
}

.leaderboard-item.top-3 .leaderboard-rank {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    color: white;
}

.leaderboard-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--card-bg);
    border-radius: 50%;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.leaderboard-score {
    font-size: 11px;
    color: var(--text-secondary);
}

.leaderboard-badge {
    font-size: 16px;
}

.tips-carousel {
    position: relative;
    overflow: hidden;
}

.tips-carousel .tip-card {
    display: none;
    padding: 24px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--divider);
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow-ambient);
}

.tips-carousel .tip-card.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tips-carousel .tip-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.tips-carousel .tip-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.tips-carousel .tip-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tips-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.tip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--divider);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tip-dot.active {
    background: var(--slime-primary);
    width: 24px;
    border-radius: 4px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.tip-card {
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--divider);
    transition: all 0.2s ease;
}

.tip-card:hover {
    border-color: var(--slime-primary);
    transform: translateY(-2px);
}

.tip-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.tip-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tip-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.tip-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tip-list li {
    font-size: 12px;
    color: var(--text-primary);
    padding: 6px 0;
    padding-left: 16px;
    position: relative;
}

.tip-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--slime-primary);
}

.footer {
    background: var(--card-bg);
    padding: 40px 0 24px;
    border-top: 1px solid var(--divider);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.footer-tagline {
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--slime-primary);
}

.footer-bottom {
    padding-top: 16px;
    border-top: 1px solid var(--divider);
}

.icp-record {
    font-size: 12px;
    color: var(--text-placeholder);
    text-align: center;
}

.icp-record a {
    color: var(--slime-primary);
    text-decoration: none;
}

.game-completion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

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

.game-completion-box {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.completion-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.completion-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.completion-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.completion-btn {
    padding: 12px 32px;
    background: var(--slime-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.completion-btn:hover {
    background: var(--slime-secondary);
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.adventure-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.adventure-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    font-weight: 600;
    color: #E2E8F0;
    padding: 14px 20px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: var(--radius-md);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.adventure-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.adventure-stats .stat-hp { color: #F87171; }
.adventure-stats .stat-atk { color: #FBBF24; }
.adventure-stats .stat-def { color: #60A5FA; }

.adventure-area {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-height: 320px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid rgba(148, 163, 184, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.adventure-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
        linear-gradient(225deg, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.adventure-area::after {
    display: none;
}

.adventure-map {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 2px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.adventure-cell {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.15s ease;
    border: 1px solid rgba(71, 85, 105, 0.3);
    position: relative;
}

.adventure-cell.empty {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(71, 85, 105, 0.2);
}

.adventure-cell.wall {
    background: linear-gradient(145deg, #374151, #1f2937);
    border-color: rgba(55, 65, 81, 0.5);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 -1px 2px rgba(255, 255, 255, 0.05);
}

.adventure-cell.wall::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.1) 3px,
        rgba(0, 0, 0, 0.1) 6px
    );
    border-radius: 2px;
}

.adventure-cell.treasure {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.25));
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 
        0 0 12px rgba(251, 191, 36, 0.2),
        inset 0 0 8px rgba(251, 191, 36, 0.1);
}

.adventure-cell.treasure::before {
    content: '✦';
    position: absolute;
    font-size: 8px;
    color: rgba(251, 191, 36, 0.6);
    top: 2px;
    right: 2px;
}

.adventure-cell.monster {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.2));
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 
        0 0 10px rgba(239, 68, 68, 0.15),
        inset 0 0 6px rgba(239, 68, 68, 0.08);
}

.adventure-cell.boss {
    background: linear-gradient(145deg, rgba(139, 0, 139, 0.15), rgba(75, 0, 130, 0.25));
    border-color: rgba(139, 0, 139, 0.5);
    box-shadow: 
        0 0 15px rgba(139, 0, 139, 0.3),
        inset 0 0 10px rgba(139, 0, 139, 0.15);
    animation: bossPulse 2s infinite;
}

@keyframes bossPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(139, 0, 139, 0.3); }
    50% { box-shadow: 0 0 25px rgba(139, 0, 139, 0.5); }
}

.adventure-cell.event {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.2));
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 
        0 0 12px rgba(59, 130, 246, 0.2),
        inset 0 0 8px rgba(59, 130, 246, 0.1);
    animation: eventGlow 3s infinite;
}

@keyframes eventGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(59, 130, 246, 0.2); }
    50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
}

.adventure-cell.exit {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.25));
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 
        0 0 15px rgba(16, 185, 129, 0.25),
        inset 0 0 10px rgba(16, 185, 129, 0.1);
}

.adventure-player {
    position: absolute;
    font-size: 22px;
    z-index: 10;
    transition: left 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                top 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 0 12px rgba(78, 205, 196, 0.9));
    will-change: left, top;
}

.adventure-player.moving {
    animation: playerBounce 0.18s ease;
}

@keyframes playerBounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

.adventure-player.attacking {
    animation: playerAttack 0.3s ease;
}

@keyframes playerAttack {
    0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    25% { transform: translate(-50%, -50%) scale(1.2) rotate(-10deg); }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(10deg); }
    75% { transform: translate(-50%, -50%) scale(1.1) rotate(-5deg); }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

.adventure-player.hurt {
    animation: playerHurt 0.4s ease;
}

@keyframes playerHurt {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(78, 205, 196, 0.9)); }
    25%, 75% { filter: drop-shadow(0 0 20px rgba(239, 68, 68, 1)) brightness(1.5); }
    50% { filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.8)); }
}

.adventure-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.adventure-row {
    display: flex;
    gap: 8px;
}

.adventure-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, #1e293b, #0f172a);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.adventure-btn:hover {
    background: linear-gradient(145deg, #334155, #1e293b);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-color: rgba(100, 116, 139, 0.4);
}

.adventure-btn:active {
    transform: scale(0.92) translateY(0);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.adventure-log {
    text-align: center;
    font-size: 14px;
    color: var(--text-primary);
    padding: 14px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: var(--radius-md);
    min-height: 48px;
    border: 1px solid rgba(71, 85, 105, 0.3);
    transition: all 0.3s ease;
}

.adventure-log.success {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    border-color: rgba(16, 185, 129, 0.4);
    color: #6EE7B7;
}

.adventure-log.warning {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    border-color: rgba(251, 191, 36, 0.4);
    color: #FCD34D;
}

.adventure-log.danger {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
    border-color: rgba(239, 68, 68, 0.4);
    color: #FCA5A5;
}

.damage-popup {
    position: absolute;
    font-size: 16px;
    font-weight: bold;
    pointer-events: none;
    animation: damageFloat 0.8s ease-out forwards;
    z-index: 100;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.damage-popup.player { color: #EF4444; }
.damage-popup.monster { color: #F59E0B; }
.damage-popup.heal { color: #10B981; }

@keyframes damageFloat {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-30px) scale(0.8); }
}

.fishing-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fishing-area {
    position: relative;
    width: 100%;
    height: 220px;
    background: linear-gradient(180deg, 
        #87CEEB 0%, 
        #5BA3D9 20%,
        #1E90FF 40%, 
        #0066CC 60%,
        #004080 80%,
        #002855 100%
    );
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid rgba(59, 130, 246, 0.3);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
}

.fishing-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    pointer-events: none;
}

.fishing-area::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 100% 20% at 50% 0%, rgba(255, 255, 255, 0.2), transparent),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M0 50 Q25 45 50 50 T100 50' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 100% 100%, 200px 20px;
    animation: waterWave 8s linear infinite;
    pointer-events: none;
}

@keyframes waterWave {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 0 0, -200px 0; }
}

.fishing-water {
    position: relative;
    width: 100%;
    height: 180px;
}

.fishing-fish {
    position: absolute;
    font-size: 36px;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    will-change: transform, left, top;
}

.fishing-fish.visible {
    opacity: 1;
}

.fishing-fish.caught {
    animation: fishCaught 0.5s ease-out forwards;
}

@keyframes fishCaught {
    0% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.3) translateY(-20px); }
    100% { transform: scale(0.8) translateY(-100px); opacity: 0; }
}

.fishing-hook {
    position: absolute;
    left: 50%;
    top: 0;
    font-size: 28px;
    transform: translateX(-50%);
    transition: top 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 5;
}

.fishing-hook.casting {
    animation: hookCast 0.4s ease-out;
}

@keyframes hookCast {
    0% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(15deg); }
    50% { transform: translateX(-50%) rotate(-10deg); }
    75% { transform: translateX(-50%) rotate(5deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

.fishing-hook.bite {
    animation: hookBite 0.15s ease-in-out infinite;
}

@keyframes hookBite {
    0%, 100% { transform: translateX(-50%) rotate(-5deg); }
    50% { transform: translateX(-50%) rotate(5deg); }
}

.fishing-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 12px;
    backdrop-filter: blur(4px);
}

.fishing-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        #10B981 0%, 
        #34D399 30%,
        #FBBF24 60%, 
        #F59E0B 80%,
        #EF4444 100%
    );
    border-radius: 6px;
    width: 0%;
    transition: width 0.08s linear;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.fishing-bar.catching {
    animation: fishingBarPulse 0.3s ease infinite;
}

@keyframes fishingBarPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
    50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.8); }
}

.fishing-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.fishing-btn.catching {
    background: linear-gradient(145deg, #F59E0B, #D97706);
    animation: btnPulse 0.4s ease infinite;
    color: white;
}

@keyframes btnPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6); }
}

.fishing-bubbles {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.fishing-bubble {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: bubbleRise 1.5s ease-out forwards;
}

@keyframes bubbleRise {
    0% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: translateY(-80px) scale(0.5); 
    }
}

.fishing-ripple {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: rippleExpand 1s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% { 
        width: 0; 
        height: 0; 
        opacity: 1; 
    }
    100% { 
        width: 100px; 
        height: 100px; 
        opacity: 0; 
    }
}

.fishing-hint {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px;
    background: var(--input-bg);
    border-radius: var(--radius-sm);
}

@media (max-width: 400px) {
    .hero-icon {
        width: 100%;
    }
    
    .slime-container {
        width: 160px;
        height: 140px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .game-tabs {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        padding: 8px;
    }
    
    .game-tab {
        padding: 10px 4px;
    }
    
    .tab-icon {
        font-size: 22px;
    }
    
    .tab-text {
        font-size: 9px;
    }
    
    .game-card {
        padding: 20px;
    }
    
    .calc-btn {
        height: 48px;
        font-size: 16px;
    }
    
    .grid-cell {
        font-size: 16px;
    }
    
    .pet-display {
        flex-direction: column;
        align-items: center;
    }
    
    .pet-stage {
        width: 120px;
        height: 120px;
    }
    
    .pet-stage .pet-ground {
        width: 50px;
        height: 8px;
        bottom: 12px;
    }
    
    .pet-info {
        width: 100%;
        text-align: center;
    }
    
    .pet-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 600px;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .section-title {
        font-size: 28px;
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }
.scroll-reveal.delay-4 { transition-delay: 0.4s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease forwards;
}

.animate-scale {
    animation: scaleIn 0.5s ease forwards;
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(78, 205, 196, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
    }
}

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

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

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-section {
        padding: 40px 0 60px;
    }
    
    .hero-icon {
        width: 100%;
    }
    
    .slime-container {
        width: 160px;
        height: 140px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .primary-btn {
        padding: 14px 32px;
        font-size: 15px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .pet-card {
        padding: 16px;
    }
    
    .pet-stage {
        width: 140px;
        height: 140px;
    }
    
    .pet-stage .pet-ground {
        width: 60px;
        height: 10px;
        bottom: 15px;
    }
    
    .pet-slime {
        width: 80px;
        height: 70px;
    }
    
    .pet-name {
        font-size: 18px;
    }
    
    .pet-mood {
        font-size: 13px;
    }
    
    .stat-label {
        font-size: 11px;
        width: 45px;
    }
    
    .stat-bar {
        height: 8px;
    }
    
    .pet-action-btn {
        padding: 10px 8px;
    }
    
    .action-icon {
        font-size: 22px;
    }
    
    .action-text {
        font-size: 11px;
    }
    
    .inventory-items {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
    }
    
    .inventory-item {
        padding: 6px 2px;
    }
    
    .item-icon {
        font-size: 20px;
    }
    
    .item-count {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .game-tabs {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 10px;
        margin-bottom: 16px;
    }
    
    .game-tab {
        padding: 12px 6px;
    }
    
    .tab-icon {
        font-size: 24px;
    }
    
    .tab-text {
        font-size: 10px;
    }
    
    .game-card {
        padding: 16px;
    }
    
    .game-header h3 {
        font-size: 16px;
    }
    
    .calc-display {
        font-size: 28px;
        padding: 16px;
    }
    
    .calc-btn {
        height: 52px;
        font-size: 18px;
    }
    
    .grid-cell {
        font-size: 18px;
    }
    
    .memory-card {
        height: 70px;
        font-size: 24px;
    }
    
    .typing-text {
        font-size: 18px;
    }
    
    .typing-input {
        font-size: 18px;
        padding: 12px;
    }
    
    .reaction-area {
        height: 200px;
    }
    
    .reaction-text {
        font-size: 18px;
    }
    
    .sequence-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .color-word {
        font-size: 36px;
    }
    
    .color-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .puzzle-board {
        gap: 3px;
    }
    
    .puzzle-cell {
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .hero-icon {
        width: 100%;
    }
    
    .slime-container {
        width: 160px;
        height: 140px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 26px;
    }
    
    .hero-subtitle {
        font-size: 12px;
    }
    
    .pet-stage {
        width: 120px;
        height: 120px;
    }
    
    .pet-slime {
        width: 65px;
        height: 55px;
    }
    
    .game-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 8px;
    }
    
    .game-tab {
        min-width: 52px;
        flex-shrink: 0;
        padding: 8px 6px;
    }
    
    .tab-icon {
        font-size: 20px;
    }
    
    .tab-text {
        font-size: 9px;
    }
    
    .inventory-items {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .memory-card {
        height: 60px;
        font-size: 20px;
    }
    
    .sequence-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .pet-action-btn {
        min-height: 56px;
    }
    
    .game-tab {
        min-height: 48px;
    }
    
    .calc-btn {
        min-height: 56px;
    }
    
    .color-btn {
        min-height: 48px;
    }
    
    .sequence-btn {
        min-width: 56px;
        min-height: 56px;
    }
    
    .memory-card {
        min-height: 70px;
    }
    
    .inventory-item {
        min-height: 50px;
    }
    
    .achievements-section,
    .daily-section,
    .collection-section,
    .leaderboard-section,
    .tips-section {
        padding: 50px 0;
    }
    
    .achievement-stats {
        gap: 20px;
    }
    
    .achievement-stat .stat-value {
        font-size: 22px;
    }
    
    .achievement-list {
        grid-template-columns: 1fr;
    }
    
    .achievement-item {
        padding: 10px;
    }
    
    .achievement-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .daily-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .daily-checkin {
        padding: 16px;
    }
    
    .checkin-btn {
        padding: 12px 32px;
        font-size: 14px;
    }
    
    .collection-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .collection-item {
        padding: 12px 6px;
    }
    
    .collection-item-icon {
        font-size: 24px;
    }
    
    .collection-item-name {
        font-size: 10px;
    }
    
    .leaderboard-item {
        padding: 10px;
    }
    
    .leaderboard-avatar {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .tip-card {
        padding: 16px;
    }
    
    .tip-icon {
        font-size: 24px;
    }
    
    .tip-title {
        font-size: 14px;
    }
    
    .hero-decoration {
        display: none;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    
    .data-tabs {
        gap: 4px;
    }
    
    .data-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .data-panels {
        padding: 12px;
    }
    
    .tips-carousel .tip-card {
        padding: 16px;
    }
    
    .tips-carousel .tip-icon {
        font-size: 36px;
    }
    
    .tips-carousel .tip-title {
        font-size: 16px;
    }
    
    .tips-carousel .tip-desc {
        font-size: 13px;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .quick-action-card {
        padding: 16px;
    }
    
    .quick-action-icon {
        font-size: 28px;
        width: 48px;
        height: 48px;
    }
    
    .quick-action-content h3 {
        font-size: 14px;
    }
    
    .quick-action-content p {
        font-size: 12px;
    }
    
    .battle-top-section {
        grid-template-columns: 1fr;
    }
    
    .boss-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rpg-skill-bar {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }
    
    .rpg-skill {
        min-width: auto;
    }
    
    .battle-arena-section {
        height: 150px;
    }
    
    .enemy-sprite {
        font-size: 56px;
    }
    
    .battle-stage {
        grid-template-columns: 1fr;
    }
    
    .boss-sprite-container {
        height: 200px;
    }
    
    .enemy-model {
        font-size: 72px;
    }
    
    .boss-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skill-row {
        flex-wrap: wrap;
    }
    
    .skill-btn {
        min-width: calc(25% - 6px);
    }
}

.touch-feedback {
    position: relative;
    overflow: hidden;
}

.touch-feedback::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, opacity 0.3s;
    opacity: 0;
}

.touch-feedback:active::after {
    width: 200%;
    height: 200%;
    opacity: 1;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.safe-area-top {
    padding-top: env(safe-area-inset-top, 0);
}

.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}
