/* ===== BE MORE - CALISTHENICS GAMIFICATION =====
   Dragon Ball Z Inspired Design System – 3D Edition
   ================================================== */

:root {
    --db-orange: #FF6B00;
    --db-orange-light: #FF9A3C;
    --db-orange-dark: #CC5500;
    --db-blue: #1E3A8A;
    --db-blue-light: #3B82F6;
    --db-blue-dark: #0F1D45;
    --db-yellow: #FFD700;
    --db-yellow-light: #FFED4A;
    --db-red: #DC2626;
    --db-red-glow: #EF4444;
    --db-purple: #7C3AED;
    --db-silver: #C0C0C0;
    --db-gold: #FFD700;
    --db-green: #7CB342;

    --bg-primary: #050816;
    --bg-secondary: #0C1225;
    --bg-card: rgba(12, 18, 40, 0.8);
    --bg-card-solid: #0F1430;
    --bg-card-hover: rgba(20, 28, 55, 0.95);
    --bg-glass: rgba(12, 18, 40, 0.55);

    --text-primary: #FFFFFF;
    --text-secondary: #8892B0;
    --text-accent: #FF9A3C;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(255, 107, 0, 0.3);
    --shadow-glow: 0 0 25px rgba(255, 107, 0, 0.25), 0 0 50px rgba(255, 107, 0, 0.1);
    --shadow-blue: 0 0 25px rgba(59, 130, 246, 0.25);
    --shadow-yellow: 0 0 30px rgba(255, 215, 0, 0.35);
    --shadow-purple: 0 0 25px rgba(124, 58, 237, 0.25);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

    --radius: 16px;
    --radius-lg: 24px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --perspective: 1200px;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-energy {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,107,0,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 0% 100%, rgba(59,130,246,0.05) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 100% 50%, rgba(124,58,237,0.04) 0%, transparent 50%);
}
.bg-energy::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,107,0,0.06) 0%, transparent 70%);
    top: -300px;
    right: -300px;
    animation: float-orb 12s ease-in-out infinite;
}
.bg-energy::after {
    content: '';
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(124,58,237,0.05) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    animation: float-orb 15s ease-in-out infinite reverse;
}
@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -40px) scale(1.15); }
}

/* Starfield / Ki Particles Background */
.bg-energy .ki-bg-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 215, 0, 0.5);
    border-radius: 50%;
    animation: ki-twinkle var(--dur, 3s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes ki-twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(5, 8, 22, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 107, 0, 0.1);
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.nav-brand .logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: #000;
    background: linear-gradient(135deg, var(--db-orange), var(--db-yellow));
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.4), inset 0 -2px 4px rgba(0,0,0,0.2);
    position: relative;
}
.nav-brand .logo-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.25);
    animation: pulse-ring 2.5s ease-in-out infinite;
}
@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0; }
}
.nav-brand .brand-text {
    font-size: 1.35rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--db-orange), var(--db-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}
.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition);
    position: relative;
    letter-spacing: 0.3px;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--db-orange-light);
    background: rgba(255, 107, 0, 0.08);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--db-orange), var(--db-yellow));
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
}
.nav-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav-power-level {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 107, 0, 0.08);
    padding: 8px 16px;
    border-radius: 24px;
    border: 1px solid rgba(255, 107, 0, 0.15);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--db-orange-light);
    letter-spacing: 0.5px;
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: 2px solid rgba(255, 107, 0, 0.2);
    color: var(--db-orange-light);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 10px;
    transition: var(--transition);
}
.mobile-menu-btn:hover { background: rgba(255,107,0,0.1); }

/* ===== MAIN CONTENT ===== */
.main-content {
    position: relative;
    z-index: 1;
    padding-top: 72px;
    min-height: 100vh;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(255,107,0,0.08) 0%, transparent 55%);
    animation: hero-pulse 5s ease-in-out infinite;
}
@keyframes hero-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}
.hero-inner {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 2;
}
.hero-text {
    flex: 1;
    min-width: 0;
}
.hero-character {
    flex: 0 0 380px;
    perspective: var(--perspective);
}
.hero-character-img {
    width: 100%;
    max-width: 380px;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(255,107,0,0.3));
    animation: hero-float 4s ease-in-out infinite;
    transform-style: preserve-3d;
}
@keyframes hero-float {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-15px) rotateY(3deg); }
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.25);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--db-orange-light);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}
.hero h1 {
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
    letter-spacing: -0.5px;
}
.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--db-orange), var(--db-yellow), var(--db-orange-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-shift 3s ease-in-out infinite;
    text-shadow: none;
}
.gradient-text {
    background: linear-gradient(135deg, var(--db-orange), var(--db-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
@keyframes gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}
.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
    line-height: 1.7;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--db-orange), var(--db-orange-dark));
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-primary:hover::before { left: 100%; }

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--db-orange);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}
.btn-small { padding: 10px 18px; font-size: 0.85rem; }
.btn-gold {
    background: linear-gradient(135deg, var(--db-yellow), var(--db-orange));
    color: #000;
    font-weight: 800;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-gold:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 40px rgba(255, 215, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===== SECTIONS ===== */
.section {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.section-title {
    text-align: center;
    margin-bottom: 56px;
}
.section-title h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 12px;
}
.section-title p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ===== 3D CHARACTER CARDS ===== */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 32px;
    perspective: var(--perspective);
}
.character-card {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 32px 20px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    transform-style: preserve-3d;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 2px solid var(--border-subtle);
    overflow: hidden;
}
.character-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--card-color, var(--db-orange)), var(--card-color-end, var(--db-yellow)));
    opacity: 0;
    transition: var(--transition);
}
.character-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 50% 0%, var(--card-glow, rgba(255,107,0,0.06)), transparent 60%);
    pointer-events: none;
}
.character-card:hover {
    transform: translateY(-8px) rotateX(3deg) rotateY(-2deg);
    border-color: var(--card-color, var(--db-orange));
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), var(--shadow-glow);
}
.character-card:hover::before { opacity: 1; }
.character-card.selected {
    border-color: var(--card-color, var(--db-yellow));
    box-shadow: 0 0 40px var(--card-glow, rgba(255,215,0,0.2)), var(--shadow-card);
    transform: translateY(-8px) scale(1.02);
}
.character-card.selected::before { opacity: 1; }

/* Card color variants */
.character-card[data-character="warrior"] {
    --card-color: var(--db-orange);
    --card-color-end: var(--db-yellow);
    --card-glow: rgba(255,107,0,0.12);
}
.character-card[data-character="defender"] {
    --card-color: var(--db-blue-light);
    --card-color-end: var(--db-green);
    --card-glow: rgba(59,130,246,0.12);
}
.character-card[data-character="speedster"] {
    --card-color: var(--db-yellow);
    --card-color-end: #FFF176;
    --card-glow: rgba(255,215,0,0.12);
}
.character-card[data-character="titan"] {
    --card-color: var(--db-purple);
    --card-color-end: var(--db-red);
    --card-glow: rgba(124,58,237,0.12);
}

.character-avatar {
    width: 180px;
    height: 220px;
    margin: 0 auto 16px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.character-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
    transition: var(--transition);
}
.character-card:hover .character-avatar img {
    filter: drop-shadow(0 8px 32px var(--card-glow, rgba(255,107,0,0.4)));
    transform: scale(1.05);
}
.character-card.selected .character-avatar img {
    filter: drop-shadow(0 0 30px var(--card-glow, rgba(255,215,0,0.5)));
    animation: char-selected-glow 2s ease-in-out infinite;
}
@keyframes char-selected-glow {
    0%, 100% { filter: drop-shadow(0 0 20px var(--card-glow, rgba(255,215,0,0.4))); }
    50% { filter: drop-shadow(0 0 40px var(--card-glow, rgba(255,215,0,0.7))); }
}

.character-card h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
    font-weight: 800;
    letter-spacing: 0.3px;
}
.character-card .char-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.character-card .char-bonus {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    background: rgba(255, 107, 0, 0.1);
    color: var(--db-orange-light);
    border: 1px solid rgba(255,107,0,0.15);
    letter-spacing: 0.3px;
}

/* ===== SETUP / ONBOARDING ===== */
.setup-screen {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}
.setup-container {
    max-width: 780px;
    width: 100%;
    text-align: center;
}
.setup-container h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 8px;
}
.setup-container .subtitle {
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-size: 1.05rem;
}
.input-group { margin-bottom: 28px; }
.input-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.input-group input {
    width: 100%;
    max-width: 420px;
    padding: 16px 22px;
    border-radius: var(--radius);
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 700;
    transition: var(--transition);
    outline: none;
}
.input-group input:focus {
    border-color: var(--db-orange);
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.12), var(--shadow-glow);
}
.input-group input::placeholder { color: rgba(255, 255, 255, 0.2); }

/* ===== DASHBOARD ===== */
.dashboard {
    padding: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}
.dash-welcome {
    display: flex;
    align-items: center;
    gap: 18px;
}
.dash-welcome .avatar-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    border: 3px solid rgba(255,107,0,0.3);
    background: linear-gradient(135deg, var(--db-orange), var(--db-yellow));
    display: flex;
    align-items: center;
    justify-content: center;
}
.dash-welcome .avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dash-welcome h2 {
    font-size: 1.5rem;
    font-weight: 800;
}
.dash-welcome .rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(255, 107, 0, 0.1);
    color: var(--db-orange-light);
    border: 1px solid rgba(255,107,0,0.15);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* ===== STATS CARDS ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
    perspective: var(--perspective);
}
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--db-orange), var(--db-yellow));
    opacity: 0;
    transition: var(--transition);
}
.stat-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px) rotateX(2deg);
    box-shadow: var(--shadow-card);
}
.stat-card:hover::after { opacity: 1; }
.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}
.stat-card .stat-value.orange { color: var(--db-orange); }
.stat-card .stat-value.blue { color: var(--db-blue-light); }
.stat-card .stat-value.yellow { color: var(--db-yellow); }
.stat-card .stat-value.red { color: var(--db-red-glow); }
.stat-card .stat-value.purple { color: var(--db-purple); }
.stat-card .stat-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ===== SCOUTER POWER LEVEL BAR ===== */
.power-level-section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 36px;
    border: 1px solid rgba(255, 107, 0, 0.12);
    position: relative;
    overflow: hidden;
}
.power-level-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--db-orange), var(--db-yellow), var(--db-orange));
    background-size: 200% auto;
    animation: gradient-shift 3s ease-in-out infinite;
}
/* Scouter corner decoration */
.power-level-section::after {
    content: '';
    position: absolute;
    top: 12px; right: 12px;
    width: 40px; height: 40px;
    border-top: 2px solid rgba(255,107,0,0.2);
    border-right: 2px solid rgba(255,107,0,0.2);
    border-radius: 0 8px 0 0;
    pointer-events: none;
}
.power-level-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.power-level-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.power-level-number {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--db-orange), var(--db-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.xp-bar-container {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    height: 18px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.04);
}
.xp-bar-fill {
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--db-orange), var(--db-yellow));
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 2%;
    box-shadow: 0 0 12px rgba(255,107,0,0.4);
}
.xp-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: shimmer 2.5s ease-in-out infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.xp-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===== EXERCISE CARDS (3D) ===== */
.exercise-section { margin-bottom: 36px; }
.exercise-section h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.exercise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    perspective: var(--perspective);
}
.exercise-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}
.exercise-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: radial-gradient(circle at 80% 20%, rgba(255,107,0,0.04), transparent 50%);
    pointer-events: none;
}
.exercise-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--db-orange), var(--db-yellow));
    opacity: 0;
    transition: var(--transition);
}
.exercise-card:hover {
    border-color: rgba(255,107,0,0.3);
    transform: translateY(-6px) rotateX(2deg);
    box-shadow: 0 16px 48px rgba(0,0,0,0.35), 0 0 20px rgba(255,107,0,0.1);
}
.exercise-card:hover::after { opacity: 1; }
.exercise-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.exercise-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: linear-gradient(135deg, rgba(255,107,0,0.12), rgba(255,107,0,0.04));
    border: 1px solid rgba(255,107,0,0.15);
    flex-shrink: 0;
}
.exercise-card-header h4 {
    font-size: 1.05rem;
    font-weight: 800;
}
.exercise-card-header .xp-badge {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    background: rgba(255, 215, 0, 0.1);
    color: var(--db-yellow);
    border: 1px solid rgba(255,215,0,0.15);
    white-space: nowrap;
}
.exercise-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.exercise-muscles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}
.muscle-tag {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.08);
    color: var(--db-blue-light);
    border: 1px solid rgba(59,130,246,0.12);
}
.exercise-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.exercise-input-row input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    outline: none;
    transition: var(--transition);
    text-align: center;
}
.exercise-input-row input:focus { border-color: var(--db-orange); box-shadow: 0 0 0 3px rgba(255,107,0,0.1); }
.exercise-input-row input::placeholder { color: rgba(255,255,255,0.15); font-weight: 400; }

.difficulty-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 4px;
}
.difficulty-stars .star {
    width: 10px; height: 10px;
    border-radius: 50%;
}
.difficulty-stars .star.filled {
    background: var(--db-orange);
    box-shadow: 0 0 6px rgba(255,107,0,0.4);
}
.difficulty-stars .star.empty { background: rgba(255,255,255,0.08); }

/* ===== QUEST CARD ===== */
.quest-card {
    background: linear-gradient(135deg, rgba(255,107,0,0.06), rgba(255,215,0,0.03));
    border: 1px solid rgba(255, 107, 0, 0.18);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}
.quest-card::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255,107,0,0.08), transparent 60%);
    pointer-events: none;
}
.quest-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.quest-header h3 { font-size: 1.15rem; font-weight: 800; }
.quest-header .quest-badge {
    padding: 5px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(255, 215, 0, 0.12);
    color: var(--db-yellow);
    border: 1px solid rgba(255,215,0,0.15);
}
.quest-exercises {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.quest-exercise-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.04);
}
.quest-exercise-item .reps-count {
    color: var(--db-orange-light);
    font-weight: 900;
}

/* ===== DRAGON BALL ACHIEVEMENTS ===== */
.achievements-section { margin-bottom: 36px; }
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 16px;
    perspective: var(--perspective);
}
.achievement-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    transform-style: preserve-3d;
    position: relative;
}
.achievement-card.earned {
    border-color: rgba(255, 215, 0, 0.25);
    background: linear-gradient(135deg, rgba(255,215,0,0.05), var(--bg-card-solid));
}
.achievement-card.earned:hover {
    transform: translateY(-6px) rotateX(5deg) rotateY(-3deg);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3), var(--shadow-yellow);
}
.achievement-card.earned .dragon-ball {
    animation: db-float 3s ease-in-out infinite;
}
@keyframes db-float {
    0%, 100% { transform: translateY(0); filter: drop-shadow(0 4px 8px rgba(255,165,0,0.3)); }
    50% { transform: translateY(-6px); filter: drop-shadow(0 12px 16px rgba(255,165,0,0.5)); }
}
.achievement-card:not(.earned) { opacity: 0.35; }
.dragon-ball {
    width: 65px;
    height: 65px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FFF9C4, #FFE082, #FF9800, #E65100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    position: relative;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.3), inset 0 -4px 8px rgba(0,0,0,0.15);
}
.dragon-ball::after {
    content: '';
    position: absolute;
    top: 8px; left: 14px;
    width: 16px; height: 10px;
    background: rgba(255,255,255,0.45);
    border-radius: 50%;
    transform: rotate(-30deg);
}
.achievement-card h4 { font-size: 0.85rem; font-weight: 800; margin-bottom: 4px; }
.achievement-card p { font-size: 0.75rem; color: var(--text-secondary); }

/* ===== FEATURE CARDS (Landing) ===== */
.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 50% 0%, var(--feat-glow, rgba(255,107,0,0.06)), transparent 60%);
    pointer-events: none;
}
.feature-card:hover {
    transform: translateY(-8px) rotateX(3deg);
    border-color: var(--feat-color, rgba(255,107,0,0.2));
    box-shadow: var(--shadow-card);
}
.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--feat-bg-start, rgba(255,107,0,0.1)), var(--feat-bg-end, rgba(255,107,0,0.03)));
    border: 1px solid var(--feat-border, rgba(255,107,0,0.12));
    box-shadow: 0 4px 16px var(--feat-shadow, rgba(255,107,0,0.1));
}
.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== LEVEL PROGRESSION TRACK ===== */
.level-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--db-orange) transparent;
}
.level-track::-webkit-scrollbar { height: 6px; }
.level-track::-webkit-scrollbar-thumb { background: var(--db-orange); border-radius: 3px; }
.level-track::-webkit-scrollbar-track { background: transparent; }
.level-node {
    flex: 0 0 120px;
    background: var(--bg-card);
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
}
.level-node:hover {
    border-color: var(--db-orange);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}
.level-node .lvl-num {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.level-node .lvl-name {
    font-weight: 800;
    font-size: 0.82rem;
    margin-bottom: 4px;
}
.level-node .lvl-xp {
    font-size: 0.7rem;
    color: var(--db-orange-light);
    font-weight: 700;
}

/* ===== AURA EFFECTS ===== */
.aura-none { box-shadow: none; }
.aura-white { box-shadow: 0 0 25px rgba(255,255,255,0.15); }
.aura-blue {
    box-shadow: 0 0 30px rgba(59,130,246,0.3);
    animation: aura-blue 2s ease-in-out infinite;
}
@keyframes aura-blue {
    0%, 100% { box-shadow: 0 0 30px rgba(59,130,246,0.3); }
    50% { box-shadow: 0 0 50px rgba(59,130,246,0.5); }
}
.aura-blue-pulse {
    box-shadow: 0 0 30px rgba(59,130,246,0.35);
    animation: aura-blue 1.5s ease-in-out infinite;
}
.aura-yellow {
    box-shadow: 0 0 35px rgba(255,215,0,0.4);
    animation: aura-yellow 1.5s ease-in-out infinite;
}
@keyframes aura-yellow {
    0%, 100% { box-shadow: 0 0 35px rgba(255,215,0,0.4); }
    50% { box-shadow: 0 0 60px rgba(255,215,0,0.65); }
}
.aura-yellow-intense {
    box-shadow: 0 0 40px rgba(255,215,0,0.5);
    animation: aura-yellow 1.2s ease-in-out infinite;
}
.aura-electric {
    box-shadow: 0 0 35px rgba(255,215,0,0.5);
    animation: aura-electric 0.8s ease-in-out infinite;
}
@keyframes aura-electric {
    0%, 100% { box-shadow: 0 0 35px rgba(255,215,0,0.5); }
    25% { box-shadow: 0 0 50px rgba(100,180,255,0.6); }
    50% { box-shadow: 0 0 55px rgba(255,215,0,0.7); }
    75% { box-shadow: 0 0 40px rgba(100,180,255,0.5); }
}
.aura-gold-fire {
    box-shadow: 0 0 50px rgba(255,165,0,0.6);
    animation: aura-fire 1s ease-in-out infinite;
}
@keyframes aura-fire {
    0%, 100% { box-shadow: 0 0 50px rgba(255,165,0,0.6); }
    50% { box-shadow: 0 0 70px rgba(255,100,0,0.8); }
}
.aura-red-god {
    box-shadow: 0 0 50px rgba(220,38,38,0.5);
    animation: aura-god 1.5s ease-in-out infinite;
}
@keyframes aura-god {
    0%, 100% { box-shadow: 0 0 50px rgba(220,38,38,0.5); }
    50% { box-shadow: 0 0 70px rgba(220,38,38,0.8); }
}
.aura-silver-ultra {
    box-shadow: 0 0 60px rgba(192,192,192,0.5);
    animation: aura-ultra 1s ease-in-out infinite;
}
@keyframes aura-ultra {
    0%, 100% { box-shadow: 0 0 60px rgba(192,192,192,0.5); }
    33% { box-shadow: 0 0 70px rgba(100,180,255,0.6); }
    66% { box-shadow: 0 0 65px rgba(192,192,192,0.7); }
}

/* ===== LEVEL UP OVERLAY ===== */
.level-up-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.level-up-overlay.active { opacity: 1; pointer-events: all; }
.level-up-content {
    text-align: center;
    animation: level-up-entrance 0.7s ease-out;
    max-width: 500px;
    padding: 40px;
}
@keyframes level-up-entrance {
    0% { transform: scale(0.3) rotate(-10deg); opacity: 0; }
    60% { transform: scale(1.08) rotate(2deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
.level-up-content h2 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--db-yellow), var(--db-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: 2px;
}
.level-up-content .new-rank {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--db-orange-light);
    margin-bottom: 8px;
}
.level-up-content .transformation-img {
    width: 200px;
    height: 240px;
    margin: 24px auto;
    filter: drop-shadow(0 0 40px rgba(255,215,0,0.5));
    animation: level-up-pulse 1.2s ease-in-out infinite;
}
.level-up-content .transformation-emoji {
    font-size: 5rem;
    margin: 24px 0;
    display: block;
    animation: level-up-pulse 1.2s ease-in-out infinite;
}
@keyframes level-up-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 30px rgba(255,215,0,0.4)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 50px rgba(255,215,0,0.7)); }
}
.level-up-content p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 1.05rem;
}

/* ===== ACHIEVEMENT POPUP ===== */
.achievement-popup {
    position: fixed;
    top: 90px; right: 24px;
    z-index: 9998;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 300px;
    transform: translateX(130%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), var(--shadow-yellow);
}
.achievement-popup.show { transform: translateX(0); }
.achievement-popup .popup-icon { font-size: 2.2rem; }
.achievement-popup .popup-text h4 { font-size: 0.92rem; font-weight: 800; color: var(--db-yellow); }
.achievement-popup .popup-text p { font-size: 0.82rem; color: var(--text-secondary); }

/* ===== XP FLOAT ANIMATION ===== */
.xp-float {
    position: fixed;
    z-index: 9997;
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--db-yellow);
    pointer-events: none;
    animation: xp-float-up 1.8s ease-out forwards;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}
@keyframes xp-float-up {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    50% { opacity: 1; transform: translateY(-50px) scale(1.3); }
    100% { opacity: 0; transform: translateY(-100px) scale(0.7); }
}

/* ===== ATTACK FLASH ===== */
.attack-flash {
    position: fixed;
    inset: 0;
    z-index: 9996;
    pointer-events: none;
    opacity: 0;
}
.attack-flash.active { animation: attack-flash-anim 0.5s ease-out; }
@keyframes attack-flash-anim {
    0% { opacity: 0; background: radial-gradient(circle at 50% 50%, rgba(255,215,0,0.4), transparent 60%); }
    30% { opacity: 1; }
    100% { opacity: 0; }
}

/* ===== KI PARTICLES ===== */
.ki-particle {
    position: fixed;
    width: 6px; height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9995;
    animation: ki-particle-anim 1.2s ease-out forwards;
}
@keyframes ki-particle-anim {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0) translateY(-80px); }
}

/* ===== SCREENS ===== */
.screen { display: none; animation: fadeInUp 0.5s ease-out; }
.screen.active { display: block; }

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 48px 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.footer .footer-brand { font-weight: 900; color: var(--db-orange); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255,107,0,0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,107,0,0.4); }

/* =============================================================
   RESPONSIVE DESIGN - Mobile First Approach
   ============================================================= */

/* ===== TABLET (max-width: 1024px) ===== */
@media (max-width: 1024px) {
    .hero-inner { gap: 40px; }
    .hero-character { flex: 0 0 300px; }
    .hero-character-img { max-width: 300px; }
    .section { padding: 60px 20px; }
    .dashboard { padding: 28px 20px; }
    .exercise-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .level-up-content h2 { font-size: 2.8rem; }
    .level-up-content { padding: 32px 24px; }
}

/* ===== TABLET PORTRAIT / LARGE PHONE (max-width: 900px) ===== */
@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }
    .hero-character { flex: 0 0 auto; }
    .hero-character-img { max-width: 260px; }
    .hero p { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero { padding: 40px 20px; min-height: auto; }

    .character-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }

    .quest-card { padding: 22px; }
    .quest-header h3 { font-size: 1.05rem; }

    .power-level-section { padding: 22px; }
    .power-level-number { font-size: 1.4rem; }

    .level-up-content h2 { font-size: 2.5rem; }
    .level-up-content .transformation-img { width: 160px; height: 200px; }

    /* Flying Dragon Balls kleiner */
    .flying-db { width: 24px; height: 24px; }

    /* Scouter HUD repositionieren */
    .scouter-hud { width: 220px; }
    .scouter-value { font-size: 1.8rem; }
}

/* ===== PHONE (max-width: 768px) ===== */
@media (max-width: 768px) {
    /* Navigation */
    .navbar {
        padding: 0 16px;
        height: 60px;
    }
    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0; right: 0; bottom: 0;
        background: rgba(5, 8, 22, 0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        padding: 20px 16px;
        border-bottom: 1px solid rgba(255,107,0,0.1);
        z-index: 999;
        overflow-y: auto;
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 16px 18px;
        font-size: 1rem;
        border-radius: 14px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }
    .nav-stats { display: none; }
    .nav-brand .brand-text { font-size: 1.15rem; }
    .nav-brand .logo-icon { width: 38px; height: 38px; font-size: 15px; }

    /* Main Content */
    .main-content { padding-top: 60px; }

    /* Hero */
    .hero {
        padding: 32px 16px;
        min-height: auto;
    }
    .hero h1 { font-size: 1.85rem; line-height: 1.12; margin-bottom: 14px; }
    .hero p { font-size: 0.95rem; margin-bottom: 28px; line-height: 1.6; }
    .hero-badge { font-size: 0.78rem; padding: 6px 16px; margin-bottom: 18px; }
    .hero-character-img { max-width: 220px; }

    /* Dashboard */
    .dashboard { padding: 20px 16px; }
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .dash-welcome { gap: 14px; }
    .dash-welcome .avatar-circle { width: 56px; height: 56px; }
    .dash-welcome h2 { font-size: 1.3rem; }

    /* Stats */
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .stat-card { padding: 18px 16px; }
    .stat-card .stat-value { font-size: 1.6rem; }
    .stat-card .stat-label { font-size: 0.7rem; }

    /* Power Level */
    .power-level-section { padding: 20px 16px; margin-bottom: 28px; }
    .power-level-header { margin-bottom: 14px; }
    .power-level-header h3 { font-size: 1rem; }
    .power-level-number { font-size: 1.3rem; }
    .xp-bar-container { height: 14px; }
    .xp-info { font-size: 0.75rem; }

    /* Exercise Cards */
    .exercise-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .exercise-card { padding: 20px 16px; }
    .exercise-icon { width: 44px; height: 44px; font-size: 1.3rem; border-radius: 12px; }
    .exercise-card-header { gap: 12px; margin-bottom: 12px; }
    .exercise-card-header h4 { font-size: 0.95rem; }
    .exercise-card-header .xp-badge { padding: 4px 10px; font-size: 0.7rem; }
    .exercise-description { font-size: 0.82rem; }
    .exercise-input-row input {
        padding: 12px 14px;
        font-size: 0.95rem;
        min-height: 48px;
    }
    .exercise-input-row .btn {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Character Cards */
    .character-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .character-card { padding: 24px 14px 20px; }
    .character-avatar { width: 130px; height: 160px; }
    .character-card h3 { font-size: 1.05rem; }
    .character-card .char-desc { font-size: 0.8rem; }
    .character-card .char-bonus { font-size: 0.7rem; padding: 4px 12px; }

    /* Quest */
    .quest-card { padding: 18px 16px; margin-bottom: 28px; }
    .quest-header { gap: 10px; margin-bottom: 12px; }
    .quest-header h3 { font-size: 1rem; }
    .quest-header .quest-badge { font-size: 0.72rem; padding: 4px 12px; }
    .quest-exercises { gap: 8px; }
    .quest-exercise-item { padding: 8px 14px; font-size: 0.82rem; }

    /* Achievements */
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .achievement-card { padding: 18px 12px; }
    .dragon-ball { width: 52px; height: 52px; margin-bottom: 10px; }
    .achievement-card h4 { font-size: 0.78rem; }
    .achievement-card p { font-size: 0.68rem; }

    /* Feature Cards */
    .feature-card { padding: 28px 18px; }
    .feature-icon { width: 60px; height: 60px; font-size: 1.6rem; margin-bottom: 14px; }
    .feature-card h3 { font-size: 0.95rem; }
    .feature-card p { font-size: 0.82rem; }

    /* Level Track */
    .level-node { flex: 0 0 105px; padding: 14px 10px; }
    .level-node .lvl-name { font-size: 0.75rem; }

    /* Sections */
    .section { padding: 40px 16px; }
    .section-title { margin-bottom: 36px; }
    .section-title h2 { font-size: 1.5rem; }
    .section-title p { font-size: 0.9rem; }

    /* Setup */
    .setup-screen { padding: 24px 16px; }
    .setup-container h1 { font-size: 1.7rem; }
    .setup-container .subtitle { font-size: 0.95rem; margin-bottom: 28px; }
    .input-group input { padding: 14px 18px; font-size: 1rem; max-width: 100%; }

    /* Level Up */
    .level-up-content { padding: 28px 20px; max-width: 90vw; }
    .level-up-content h2 { font-size: 2.2rem; letter-spacing: 1px; }
    .level-up-content .new-rank { font-size: 1.2rem; }
    .level-up-content .transformation-img { width: 140px; height: 170px; margin: 16px auto; }
    .level-up-content p { font-size: 0.92rem; margin-bottom: 22px; }

    /* Achievement Popup */
    .achievement-popup {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
        min-width: auto;
        max-width: none;
    }

    /* Footer */
    .footer { padding: 32px 16px; font-size: 0.8rem; }

    /* Scouter HUD - unten zentriert auf Mobile */
    .scouter-hud {
        width: 240px;
        left: 50% !important;
        top: auto !important;
        bottom: 24px;
        transform: scale(0.7) translateX(-50%);
    }
    .scouter-hud.active {
        transform: scale(1) translateX(-50%);
    }

    /* Kamehameha Overlay Mobile */
    .kamehameha-scene { height: 350px; max-width: 100vw; padding: 0 16px; }
    .kamehameha-character { width: 120px; height: 160px; left: 5%; }
    .kame-letter { font-size: 1.8rem; }
    .kamehameha-beam { height: 16px; }
    .kamehameha-overlay.firing .kamehameha-beam { height: 28px; }

    /* Power Up Overlay Mobile */
    .powerup-scene { width: 280px; height: 380px; }
    .powerup-character img { width: 180px; height: 240px; }

    /* Flying Dragon Balls */
    .flying-db { width: 22px; height: 22px; }
}

/* ===== SMALL PHONE (max-width: 480px) ===== */
@media (max-width: 480px) {
    /* Hero */
    .hero h1 { font-size: 1.55rem; }
    .hero p { font-size: 0.88rem; }
    .hero-character-img { max-width: 180px; }
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    /* Stats 1 Column */
    .stats-row { grid-template-columns: 1fr; gap: 10px; }
    .stat-card { padding: 16px 14px; }
    .stat-card .stat-value { font-size: 1.5rem; }

    /* Character Cards 1 Column */
    .character-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .character-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 16px;
        gap: 16px;
    }
    .character-avatar {
        width: 80px;
        height: 100px;
        margin: 0;
        flex-shrink: 0;
    }
    .character-card h3 { font-size: 1rem; margin-bottom: 4px; }
    .character-card .char-desc { font-size: 0.78rem; margin-bottom: 6px; }
    .character-card .char-bonus { font-size: 0.68rem; }

    /* Achievements 2 cols */
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .achievement-card { padding: 14px 10px; }
    .dragon-ball { width: 44px; height: 44px; margin-bottom: 8px; }
    .achievement-card h4 { font-size: 0.72rem; }

    /* Quest */
    .quest-card { padding: 16px 14px; }
    .quest-exercises { flex-direction: column; gap: 6px; }
    .quest-exercise-item { width: 100%; }

    /* Exercise Card */
    .exercise-card { padding: 16px 14px; }
    .exercise-icon { width: 40px; height: 40px; font-size: 1.1rem; }
    .exercise-card-header h4 { font-size: 0.9rem; }
    .exercise-muscles { gap: 4px; }
    .muscle-tag { padding: 3px 8px; font-size: 0.65rem; }
    .exercise-input-row { gap: 8px; }
    .exercise-input-row input { padding: 10px 12px; }

    /* Dashboard */
    .dash-welcome .avatar-circle { width: 50px; height: 50px; }
    .dash-welcome h2 { font-size: 1.15rem; }
    .dash-welcome .rank-badge { font-size: 0.72rem; padding: 4px 10px; }

    /* Power Level */
    .power-level-section { padding: 16px 14px; }
    .power-level-header h3 { font-size: 0.92rem; }

    /* Level Up */
    .level-up-content h2 { font-size: 1.8rem; }
    .level-up-content .new-rank { font-size: 1.05rem; }
    .level-up-content .transformation-img { width: 120px; height: 150px; }
    .level-up-content p { font-size: 0.85rem; }

    /* Kamehameha */
    .kamehameha-scene { height: 300px; }
    .kamehameha-character { width: 100px; height: 130px; }
    .kame-letter { font-size: 1.4rem; }
    .kamehameha-progress { left: 5%; right: 5%; }

    /* Power Up */
    .powerup-scene { width: 240px; height: 320px; }
    .powerup-character img { width: 150px; height: 200px; }

    /* Setup */
    .setup-container h1 { font-size: 1.45rem; }

    /* Feature Cards */
    .feature-card { padding: 22px 16px; }
    .feature-icon { width: 52px; height: 52px; font-size: 1.4rem; }

    /* Section titles */
    .section-title h2 { font-size: 1.3rem; }
    .section { padding: 32px 14px; }

    /* Toast */
    .toast {
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(100px);
        text-align: center;
        white-space: normal;
    }
    .toast.show { transform: translateX(0) translateY(0); }

    /* Flying Dragon Balls noch kleiner */
    .flying-db { width: 18px; height: 18px; }
}

/* ===== VERY SMALL PHONE (max-width: 360px) ===== */
@media (max-width: 360px) {
    .hero h1 { font-size: 1.35rem; }
    .hero p { font-size: 0.82rem; }
    .hero-character-img { max-width: 150px; }
    .navbar { padding: 0 12px; }
    .nav-brand .brand-text { font-size: 1rem; letter-spacing: 1px; }
    .dashboard { padding: 16px 12px; }
    .exercise-card { padding: 14px 12px; }
    .stat-card .stat-value { font-size: 1.3rem; }
    .section { padding: 28px 12px; }
    .level-up-content h2 { font-size: 1.5rem; }
    .quest-card { padding: 14px 12px; }
    .character-card { padding: 14px 12px; gap: 12px; }
    .character-avatar { width: 70px; height: 85px; }
}

/* ===== LANDSCAPE PHONE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { min-height: auto; padding: 20px 24px; }
    .hero-inner { gap: 24px; }
    .hero-character-img { max-width: 200px; }
    .hero h1 { font-size: 1.6rem; margin-bottom: 10px; }
    .hero p { margin-bottom: 18px; font-size: 0.88rem; }
    .level-up-content { padding: 20px; }
    .level-up-content h2 { font-size: 2rem; }
    .level-up-content .transformation-img { width: 100px; height: 130px; margin: 10px auto; }
    .kamehameha-scene { height: 250px; }
    .powerup-scene { width: 200px; height: 260px; }
    .powerup-character img { width: 120px; height: 170px; }
}

/* ===== LARGE DESKTOP (min-width: 1400px) ===== */
@media (min-width: 1400px) {
    .hero-inner { max-width: 1300px; gap: 80px; }
    .hero-character { flex: 0 0 420px; }
    .hero-character-img { max-width: 420px; }
    .section { max-width: 1300px; }
    .dashboard { max-width: 1300px; }
    .exercise-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .exercise-card:hover { transform: none; box-shadow: none; }
    .exercise-card:hover::after { opacity: 0; }
    .character-card:hover { transform: none; box-shadow: none; }
    .character-card:hover::before { opacity: 0; }
    .stat-card:hover { transform: none; box-shadow: none; }
    .stat-card:hover::after { opacity: 0; }
    .feature-card:hover { transform: none; }
    .level-node:hover { transform: none; }
    .btn-primary:hover { transform: none; }
    .btn-secondary:hover { transform: none; }
    .btn-gold:hover { transform: none; }

    /* Active state for tap feedback */
    .exercise-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    .character-card:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }
    .btn:active {
        transform: scale(0.96);
        transition: transform 0.1s ease;
    }
    .stat-card:active {
        transform: scale(0.97);
    }

    /* Bigger touch targets */
    .nav-links a { min-height: 48px; }
    .btn { min-height: 48px; }
    .exercise-input-row input { min-height: 48px; }
    .exercise-input-row .btn { min-height: 48px; }
    .quest-exercise-item { min-height: 44px; }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .scroll-reveal { opacity: 1; transform: none; }
    .hero-character-img { animation: none !important; }
    .bg-energy::before, .bg-energy::after { animation: none; }
}

/* ===== SAFE AREA INSETS (Notch/Dynamic Island) ===== */
@supports (padding-top: env(safe-area-inset-top)) {
    .navbar {
        padding-top: env(safe-area-inset-top);
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
        height: calc(60px + env(safe-area-inset-top));
    }
    @media (max-width: 768px) {
        .main-content { padding-top: calc(60px + env(safe-area-inset-top)); }
        .nav-links { top: calc(60px + env(safe-area-inset-top)); }
    }
    .footer {
        padding-bottom: max(48px, calc(24px + env(safe-area-inset-bottom)));
    }
    .toast {
        bottom: max(24px, calc(16px + env(safe-area-inset-bottom)));
    }
    .kamehameha-progress {
        bottom: max(8%, calc(16px + env(safe-area-inset-bottom)));
    }
}

/* =============================================================
   ADVANCED EFFECTS & ANIMATIONS
   ============================================================= */

/* ===== SCREEN SHAKE ===== */
@keyframes screen-shake {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    10% { transform: translate(-4px, -2px) rotate(-0.5deg); }
    20% { transform: translate(4px, 2px) rotate(0.5deg); }
    30% { transform: translate(-3px, 3px) rotate(-0.3deg); }
    40% { transform: translate(3px, -3px) rotate(0.3deg); }
    50% { transform: translate(-2px, 2px) rotate(-0.2deg); }
    60% { transform: translate(2px, -1px) rotate(0.2deg); }
    70% { transform: translate(-1px, 1px) rotate(-0.1deg); }
    80% { transform: translate(1px, -1px) rotate(0.1deg); }
}
body.screen-shake { animation: screen-shake 0.4s ease-in-out infinite; }

/* ===== SCROLL REVEAL ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}
/* Stagger children */
.scroll-reveal:nth-child(2) { transition-delay: 0.08s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.16s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.24s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.32s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.40s; }
.scroll-reveal:nth-child(7) { transition-delay: 0.48s; }

/* ===== SCOUTER HUD ===== */
.scouter-hud {
    position: fixed;
    z-index: 9990;
    width: 260px;
    opacity: 0;
    transform: scale(0.7) translateX(-20px);
    transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
}
.scouter-hud.active {
    opacity: 1;
    transform: scale(1) translateX(0);
}
.scouter-frame {
    background: rgba(0, 255, 100, 0.04);
    border: 1.5px solid rgba(0, 255, 100, 0.25);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}
.scouter-scanline {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0,255,100,0.6), transparent);
    animation: scouter-scan 2s linear infinite;
}
@keyframes scouter-scan {
    0% { top: 0; }
    100% { top: 100%; }
}
.scouter-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,255,100,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,100,0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}
.scouter-corners span {
    position: absolute;
    width: 14px; height: 14px;
    border-color: rgba(0,255,100,0.4);
    border-style: solid;
}
.sc-tl { top: 6px; left: 6px; border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.sc-tr { top: 6px; right: 6px; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.sc-bl { bottom: 6px; left: 6px; border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.sc-br { bottom: 6px; right: 6px; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }
.scouter-data { position: relative; z-index: 2; }
.scouter-label {
    font-size: 0.65rem;
    color: rgba(0,255,100,0.6);
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 6px;
}
.scouter-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: #00FF64;
    text-shadow: 0 0 20px rgba(0,255,100,0.5);
    font-family: 'Inter', monospace;
    line-height: 1;
    margin-bottom: 10px;
}
.scouter-bar-wrap {
    height: 6px;
    background: rgba(0,255,100,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.scouter-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #00FF64, #00CC50);
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 0 8px rgba(0,255,100,0.5);
}
.scouter-sub {
    font-size: 0.6rem;
    color: rgba(0,255,100,0.4);
    letter-spacing: 2px;
    font-weight: 600;
}

/* ===== KAMEHAMEHA OVERLAY ===== */
.kamehameha-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.kamehameha-overlay.active { opacity: 1; pointer-events: all; }
.kamehameha-scene {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kamehameha-character {
    position: absolute;
    left: 10%;
    bottom: 10%;
    width: 160px;
    height: 200px;
    z-index: 3;
    animation: kame-char-charge 1.5s ease-in-out infinite;
}
@keyframes kame-char-charge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}
.kamehameha-character img { width: 100%; height: 100%; object-fit: contain; }

.kamehameha-charge-orb {
    position: absolute;
    left: 32%;
    top: 45%;
    z-index: 4;
}
.charge-core {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, white, #64B5F6, #1565C0);
    box-shadow: 0 0 30px rgba(100,180,255,0.8), 0 0 60px rgba(100,180,255,0.4);
    animation: charge-pulse 0.5s ease-in-out infinite;
}
@keyframes charge-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(100,180,255,0.8); }
    50% { transform: scale(1.3); box-shadow: 0 0 50px rgba(100,180,255,1); }
}
.charge-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    border: 2px solid rgba(100,180,255,0.4);
    animation: charge-ring-expand 1.5s ease-out infinite;
}
.charge-ring-1 { width: 50px; height: 50px; animation-delay: 0s; }
.charge-ring-2 { width: 50px; height: 50px; animation-delay: 0.5s; }
.charge-ring-3 { width: 50px; height: 50px; animation-delay: 1s; }
@keyframes charge-ring-expand {
    0% { width: 30px; height: 30px; opacity: 0.8; }
    100% { width: 120px; height: 120px; opacity: 0; }
}

.kamehameha-beam {
    position: absolute;
    left: 38%;
    top: 45%;
    width: 0;
    height: 20px;
    background: linear-gradient(90deg, white, #64B5F6, #1565C0, transparent);
    border-radius: 0 20px 20px 0;
    z-index: 3;
    transition: width 0.3s ease-out, height 0.3s ease;
    box-shadow: 0 0 30px rgba(100,180,255,0.6), 0 0 60px rgba(100,180,255,0.3);
}
.kamehameha-overlay.firing .kamehameha-beam {
    width: 65%;
    height: 35px;
    box-shadow: 0 0 60px rgba(100,180,255,1), 0 0 120px rgba(100,180,255,0.5);
}
.kamehameha-overlay.firing .charge-core {
    transform: scale(2);
    box-shadow: 0 0 80px rgba(100,180,255,1);
}

.kamehameha-text {
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    z-index: 5;
}
.kame-letter {
    font-size: 2.5rem;
    font-weight: 900;
    color: #64B5F6;
    text-shadow: 0 0 20px rgba(100,180,255,0.8);
    opacity: 0;
    transform: translateY(20px);
    animation: kame-letter-in 0.3s ease-out forwards;
    animation-delay: calc(var(--i) * 0.12s);
}
@keyframes kame-letter-in {
    to { opacity: 1; transform: translateY(0); }
}
.kamehameha-overlay.firing .kame-letter {
    color: white;
    text-shadow: 0 0 30px rgba(100,180,255,1), 0 0 60px rgba(100,180,255,0.5);
}

.kamehameha-progress {
    position: absolute;
    bottom: 8%;
    left: 10%;
    right: 10%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    z-index: 5;
}
.kamehameha-progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #1565C0, #64B5F6, white);
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(100,180,255,0.6);
}

/* ===== POWER UP TRANSFORMATION OVERLAY ===== */
.powerup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}
.powerup-overlay.active { opacity: 1; pointer-events: all; }
.powerup-scene {
    position: relative;
    width: 350px;
    height: 450px;
}
.powerup-character {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.powerup-character img {
    width: 220px;
    height: 300px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px var(--aura-color, #FFD700));
    animation: powerup-char 0.15s ease-in-out infinite;
}
@keyframes powerup-char {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px) translateY(-1px); }
    75% { transform: translateX(2px) translateY(1px); }
}
.powerup-overlay.peak .powerup-character img {
    filter: drop-shadow(0 0 50px var(--aura-color, #FFD700)) brightness(1.3);
}
.powerup-overlay.explode .powerup-character img {
    filter: drop-shadow(0 0 80px white) brightness(2);
    transition: filter 0.3s ease;
}

.powerup-aura {
    position: absolute;
    inset: -30%;
    z-index: 2;
}
.aura-layer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    opacity: 0;
}
.powerup-overlay.active .aura-layer-1 {
    background: radial-gradient(ellipse at 50% 60%, var(--aura-color, #FFD700), transparent 60%);
    opacity: 0.15;
    animation: aura-grow-1 2s ease-out forwards;
}
.powerup-overlay.active .aura-layer-2 {
    background: radial-gradient(ellipse at 50% 60%, var(--aura-color, #FFD700), transparent 50%);
    opacity: 0;
    animation: aura-grow-2 2s ease-out 0.5s forwards;
}
.powerup-overlay.active .aura-layer-3 {
    background: radial-gradient(ellipse at 50% 60%, white, transparent 40%);
    opacity: 0;
    animation: aura-grow-3 2s ease-out 1s forwards;
}
@keyframes aura-grow-1 { to { opacity: 0.35; transform: scale(1.1); } }
@keyframes aura-grow-2 { to { opacity: 0.25; transform: scale(1.2); } }
@keyframes aura-grow-3 { to { opacity: 0.15; transform: scale(1.3); } }

.powerup-overlay.peak .aura-layer-1 { opacity: 0.6; animation: aura-peak 0.3s ease-in-out infinite; }
.powerup-overlay.peak .aura-layer-2 { opacity: 0.4; }
.powerup-overlay.peak .aura-layer-3 { opacity: 0.3; }
@keyframes aura-peak {
    0%, 100% { transform: scale(1.1); opacity: 0.5; }
    50% { transform: scale(1.25); opacity: 0.7; }
}

/* Lightning bolts */
.powerup-lightning {
    position: absolute;
    inset: -20%;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
}
.powerup-overlay.active .powerup-lightning {
    animation: lightning-flash 0.15s ease-in-out infinite;
    animation-delay: 1s;
    opacity: 1;
}
.lightning-svg { width: 100%; height: 100%; }
.lightning-bolt { stroke-dasharray: 600; stroke-dashoffset: 600; animation: lightning-draw 0.8s linear infinite; }
.lightning-bolt-2 { stroke-dasharray: 600; stroke-dashoffset: 600; animation: lightning-draw 0.8s linear infinite 0.4s; }
@keyframes lightning-draw {
    0% { stroke-dashoffset: 600; opacity: 0; }
    10% { opacity: 0.7; }
    50% { stroke-dashoffset: 0; opacity: 0.7; }
    51% { opacity: 0; }
    100% { opacity: 0; }
}
@keyframes lightning-flash {
    0%, 100% { opacity: 0; }
    5%, 15% { opacity: 0.8; }
    10% { opacity: 0; }
}

/* Floating rocks */
.powerup-rocks { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.rock {
    position: absolute;
    width: 12px; height: 12px;
    background: #5D4037;
    border-radius: 3px;
    transform: rotate(45deg);
    opacity: 0;
}
.powerup-overlay.active .rock {
    animation: rock-float 2s ease-out forwards;
}
.rock-1 { bottom: 5%; left: 20%; animation-delay: 0.5s !important; }
.rock-2 { bottom: 8%; left: 40%; animation-delay: 0.7s !important; width: 8px; height: 8px; }
.rock-3 { bottom: 3%; left: 60%; animation-delay: 0.9s !important; }
.rock-4 { bottom: 6%; left: 75%; animation-delay: 1.1s !important; width: 10px; height: 10px; }
.rock-5 { bottom: 10%; left: 30%; animation-delay: 1.3s !important; width: 6px; height: 6px; }
.rock-6 { bottom: 4%; left: 55%; animation-delay: 0.8s !important; width: 14px; height: 14px; }
@keyframes rock-float {
    0% { opacity: 0; transform: translateY(0) rotate(45deg); }
    30% { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-200px) rotate(180deg); }
}

/* Shockwave */
.powerup-shockwave {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(0);
    width: 300px; height: 300px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    z-index: 4;
    pointer-events: none;
}
.powerup-overlay.explode .powerup-shockwave {
    animation: shockwave 0.8s ease-out forwards;
}
@keyframes shockwave {
    0% { transform: translate(-50%,-50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(4); opacity: 0; }
}

/* ===== COMBAT HIT IMPACT ===== */
.combat-impact {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    animation: combat-impact-anim 0.6s ease-out forwards;
}
@keyframes combat-impact-anim {
    0% { transform: translate(-50%, -50%) scale(0) rotate(0); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(15deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.5) rotate(25deg); opacity: 0; }
}

/* ===== FLYING DRAGON BALLS ===== */
.flying-db-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0; height: 0;
    pointer-events: none;
    z-index: 1;
}
.flying-db {
    position: absolute;
    width: 32px;
    height: 32px;
    animation: orbit-fly var(--orbit-duration, 15s) linear infinite;
    animation-delay: var(--orbit-delay, 0s);
}
.flying-db img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(255,165,0,0.5));
}
@keyframes orbit-fly {
    from {
        transform: rotate(var(--orbit-offset, 0deg)) translateX(var(--orbit-radius, 150px)) rotate(calc(-1 * var(--orbit-offset, 0deg)));
    }
    to {
        transform: rotate(calc(var(--orbit-offset, 0deg) + 360deg)) translateX(var(--orbit-radius, 150px)) rotate(calc(-1 * var(--orbit-offset, 0deg) - 360deg));
    }
}

/* ===== EXERCISE CARD ENERGY BAR (Kamehameha style) ===== */
.exercise-card .energy-bar-mini {
    height: 3px;
    background: rgba(255,255,255,0.04);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
}
.exercise-card .energy-bar-mini .energy-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, #1565C0, #64B5F6, white);
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 0 8px rgba(100,180,255,0.4);
}

/* ===== ANIMATED CHARACTER ON HERO (breathing animation) ===== */
.hero-character-img {
    animation: hero-breathe 4s ease-in-out infinite, hero-float 6s ease-in-out infinite !important;
}
@keyframes hero-breathe {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(255,107,0,0.3)); }
    50% { filter: drop-shadow(0 0 50px rgba(255,107,0,0.5)); }
}
@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ===== STAT CARD COUNTER ANIMATION ===== */
.stat-card .stat-value {
    transition: transform 0.3s ease;
}
.stat-card:hover .stat-value {
    transform: scale(1.08);
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 9999;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.9rem;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease;
    opacity: 0;
    white-space: nowrap;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.success {
    background: rgba(0,200,80,0.15);
    border-color: rgba(0,200,80,0.3);
    color: #4ADE80;
}
.toast.warning {
    background: rgba(255,170,0,0.15);
    border-color: rgba(255,170,0,0.3);
    color: #FBBF24;
}
.toast.error {
    background: rgba(220,38,38,0.15);
    border-color: rgba(220,38,38,0.3);
    color: #F87171;
}
