/* Nintendo-Inspired Pokemon GO XP Tracker */
/* Featuring Nintendo's signature red, white, and playful design elements */

:root {
    /* Nintendo Color Palette */
    --nintendo-red: #E60012;
    --nintendo-red-light: #FF4757;
    --nintendo-red-dark: #C70011;
    --nintendo-white: #FFFFFF;
    --nintendo-light-gray: #F8F9FA;
    --nintendo-gray: #6C757D;
    --nintendo-dark: #343A40;
    --nintendo-blue: #007BFF;
    --nintendo-green: #28A745;
    --nintendo-yellow: #FFC107;
    --nintendo-orange: #FD7E14;
    
    /* Nintendo Gradients */
    --nintendo-primary-gradient: linear-gradient(135deg, var(--nintendo-red) 0%, var(--nintendo-red-light) 100%);
    --nintendo-card-gradient: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    --nintendo-shadow-light: 0 4px 20px rgba(230, 0, 18, 0.15);
    --nintendo-shadow-medium: 0 8px 30px rgba(230, 0, 18, 0.2);
    --nintendo-shadow-heavy: 0 15px 50px rgba(230, 0, 18, 0.25);
    
    /* Nintendo Borders */
    --nintendo-border-radius: 16px;
    --nintendo-border-radius-large: 24px;
    --nintendo-border-radius-small: 8px;
    
    /* Typography */
    --nintendo-font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Layout Heights */
    --header-height: 66px; /* 12px padding top + 12px padding bottom + ~42px content */
    --nav-height: 64px; /* 16px padding top + 16px padding bottom + ~32px content */
    --footer-height: 70px; /* 16px padding top + 16px padding bottom + ~38px content */
}

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

body {
    font-family: var(--nintendo-font-family);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--nintendo-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Accessibility utility */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0;
}

/* WIP Content Styling */
.wip-content {
    position: relative;
}

.wip-content > * {
    opacity: 0.4;
}

.wip-content::after {
    content: "Work in Progress";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(230, 0, 18, 0.1);
    color: var(--nintendo-red);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(230, 0, 18, 0.2);
    z-index: 10;
    opacity: 1;
    animation: wipPulse 2s ease-in-out infinite;
}

/* WIP Badge Animation Keyframes */
@keyframes wipPulse {
    0%, 100% {
        transform: scale(1);
        background: rgba(230, 0, 18, 0.1);
        box-shadow: 0 0 0 0 rgba(230, 0, 18, 0.3);
    }
    25% {
        transform: scale(1.05);
        background: rgba(230, 0, 18, 0.15);
    }
    50% {
        transform: scale(1.1);
        background: rgba(230, 0, 18, 0.2);
        box-shadow: 0 0 0 4px rgba(230, 0, 18, 0.1);
    }
    75% {
        transform: scale(1.05);
        background: rgba(230, 0, 18, 0.15);
    }
}

/* WIP Badge Responsive Positioning */
@media (max-width: 768px) {
    .wip-content::after {
        top: -10px;
        right: 50%;
        transform: translateX(50%);
        background: rgba(230, 0, 18, 0.15);
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 0.7rem;
        box-shadow: 0 2px 8px rgba(230, 0, 18, 0.2);
        opacity: 1;
        animation: wipPulseMobile 2s ease-in-out infinite;
    }
}

/* Text Logo Responsive Design */
@media (max-width: 768px) {
    .text-logo {
        gap: 1px;
    }
    
    .logo-poke {
        font-size: 14px;
        padding: 6px 10px;
        letter-spacing: -0.2px;
    }
    
    .logo-xplanner {
        font-size: 15px;
        padding: 6px 10px;
        padding-left: 32px;
        letter-spacing: 0.1px;
    }
    
    .logo-xplanner::before {
        font-size: 18px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .logo-section {
        gap: 8px;
    }
    
    .text-logo {
        gap: 0px;
    }
    
    .logo-poke {
        font-size: 12px;
        padding: 4px 8px;
        letter-spacing: -0.1px;
    }
    
    .logo-xplanner {
        font-size: 13px;
        padding: 4px 8px;
        padding-left: 28px;
        letter-spacing: 0px;
    }
    
    .logo-xplanner::before {
        font-size: 16px;
        left: 8px;
    }
}

/* Extra Small Mobile Screens - Under 418px */
@media (max-width: 418px) {
    .logo-section {
        gap: 4px;
    }
    
    .text-logo {
        gap: 0px;
    }
    
    .logo-poke {
        font-size: 10px;
        padding: 3px 6px;
        letter-spacing: -0.2px;
    }
    
    .logo-xplanner {
        font-size: 11px;
        padding: 3px 6px;
        padding-left: 24px;
        letter-spacing: -0.1px;
    }
    
    .logo-xplanner::before {
        font-size: 14px;
        left: 6px;
    }
   
}

/* Mobile WIP Badge Animation */
@keyframes wipPulseMobile {
    0%, 100% {
        transform: translateX(50%) scale(1);
        background: rgba(230, 0, 18, 0.15);
        box-shadow: 0 2px 8px rgba(230, 0, 18, 0.2);
    }
    25% {
        transform: translateX(50%) scale(1.05);
        background: rgba(230, 0, 18, 0.2);
    }
    50% {
        transform: translateX(50%) scale(1.1);
        background: rgba(230, 0, 18, 0.25);
        box-shadow: 0 4px 12px rgba(230, 0, 18, 0.3);
    }
    75% {
        transform: translateX(50%) scale(1.05);
        background: rgba(230, 0, 18, 0.2);
    }
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Nintendo-Style Header */
.nintendo-header {
    background: var(--nintendo-primary-gradient);
    color: white;
    padding: 12px 20px;
    box-shadow: var(--nintendo-shadow-medium);
    top: 0;
    z-index: 100;
    height: var(--header-height);
    box-sizing: border-box;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Custom Text Logo - Poké XPlanner */
.text-logo {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: var(--nintendo-font-family);
    font-weight: 800;
    user-select: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--nintendo-border-radius-small);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.text-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(230, 0, 18, 0.2);
}

.logo-poke {
    font-size: 16px;
    color: var(--nintendo-red);
    font-weight: 700;
    letter-spacing: -0.3px;
    background: var(--nintendo-white);
    padding: 4px 5px 4px 12px;
    border-radius: var(--nintendo-border-radius-small) 0 0 var(--nintendo-border-radius-small);
    transition: all 0.3s ease;
}

.logo-xplanner {
    font-size: 18px;
    color: var(--nintendo-dark);
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: none;
    background: var(--nintendo-white);
    padding: 8px 12px;
    border-radius: 0 var(--nintendo-border-radius-small) var(--nintendo-border-radius-small) 0;
    border: 2px solid var(--nintendo-red);
    border-left: none;
    position: relative;
    transition: all 0.3s ease;
}

/* Make XP bigger within XPlanner */
.logo-xplanner::before {
    content: "XP";
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    font-weight: 900;
    color: var(--nintendo-red);
    letter-spacing: -1px;
    transition: color 0.3s ease, text-shadow 0.3s ease, filter 0.3s ease;
    animation: xpPulse 2s ease-in-out infinite;
}

/* Ensure animation continues during ALL states - no interruption */
.logo-section .logo-xplanner::before,
.logo-section:hover .logo-xplanner::before,
.logo-section:active .logo-xplanner::before,
.logo-section:focus .logo-xplanner::before,
.logo-section:focus-within .logo-xplanner::before,
.text-logo .logo-xplanner::before,
.text-logo:hover .logo-xplanner::before,
.text-logo:active .logo-xplanner::before,
.text-logo:focus .logo-xplanner::before {
    animation: xpPulse 2s ease-in-out infinite !important;
}

/* Hide the original XP and adjust spacing */
.logo-xplanner {
    padding-left: 40px;
}

/* Enhanced hover effects for Poké XProject */
.text-logo:hover .logo-poke {
    background: var(--nintendo-red-light);
    color: var(--nintendo-white);
    transform: scale(1.05);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.text-logo:hover .logo-xplanner {
    background: var(--nintendo-light-gray);
    border-color: var(--nintendo-red-light);
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(230, 0, 18, 0.15);
}

.text-logo:hover .logo-xplanner::before {
    color: var(--nintendo-red-light);
    text-shadow: 0 2px 6px rgba(230, 0, 18, 0.3);
    filter: drop-shadow(0 0 4px rgba(230, 0, 18, 0.4));
    /* Keep the same animation, don't change transform in hover */
}

/* Add a subtle animation to the entire logo on hover */
.text-logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 18, 0.25);
}

/* Add a pulse effect to XP - consistent animation */
@keyframes xpPulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.1);
    }
}

/* Remove the conflicting hover animation rule - keep consistent 2s animation */

/* Comprehensive animation protection - ensure XP pulse never stops */
.logo-xplanner::before {
    animation-play-state: running !important;
    animation-fill-mode: none !important;
}

/* Force animation to continue during any user interaction */
.logo-section:hover .logo-xplanner::before,
.logo-section:active .logo-xplanner::before,
.logo-section:focus .logo-xplanner::before,
.logo-section:visited .logo-xplanner::before {
    animation-play-state: running !important;
}

/* Legacy logo styles - keeping for compatibility */
.logo-circle {
    width: 70px;
    height: 42px;
    background: var(--nintendo-white);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    display: none; /* Hidden now */
}

.pogo-logo {
 width: 60px;
    height: 45px;
    object-fit: contain;
}

.logo-fallback {
    font-size: 22px;
    display: none;
}

.pogo-logo:not([src]), .pogo-logo[src=""] {
    display: none;
}

.pogo-logo:not([src]) + .logo-fallback, 
.pogo-logo[src=""] + .logo-fallback {
    display: block;
}

.title-group {
    display: none; /* Hidden - using new text logo instead */
    flex-direction: column;
}

.app-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Red Champion Player Badge Design */
#playerDisplay.player-badge-pill-lv1 {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
}

#playerDisplay.player-badge-pill-lv1:hover {
    transform: translateY(-1px);
    background: none;
}

.pill-badge-lv1 {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pill-level-red {
    background: linear-gradient(135deg, var(--nintendo-red) 0%, var(--nintendo-red-dark) 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-weight: 800;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 6px rgba(230, 0, 18, 0.4);
}

.pill-divider-lv1 {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.4);
}

.pill-name-lv1 {
    color: white;
    font-weight: 700;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Info Icon and Tooltip */
.info-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 12px;
}

.info-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
}

.info-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: inherit;
}

.info-icon:hover {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.2);
}

.tooltip {
    position: fixed;
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.95), rgba(10, 10, 15, 0.98));
    backdrop-filter: blur(16px);
    color: var(--nintendo-white);
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10001;
    box-shadow: 
        0 12px 36px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(230, 0, 18, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-shadow: none;
    pointer-events: none;
    --arrow-left: 50%;
    letter-spacing: 0.4px;
    line-height: 1.3;
}

.tooltip-highlight {
    color: var(--nintendo-red);
    font-weight: 800;
    text-shadow: 0 0 8px rgba(230, 0, 18, 0.3);
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: var(--arrow-left);
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: rgba(15, 15, 20, 0.98);
    filter: drop-shadow(0 -3px 6px rgba(0, 0, 0, 0.15));
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: var(--arrow-left);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: rgba(230, 0, 18, 0.08);
    margin-bottom: 2px;
}

/* Nintendo-Style Navigation */
.nintendo-nav {
    background: var(--nintendo-white);
    padding: 16px 24px;
    border-bottom: 3px solid var(--nintendo-light-gray);
    position: sticky;
    top: var(--header-height);
    z-index: 101; /* Higher than header to prevent overlap */
    height: var(--nav-height);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Visibility Classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.desktop-user-info {
    display: block;
}

/* Modern Hamburger Menu - In Header */
.hamburger-menu {
    display: none; /* Hidden by default, shown only on mobile */
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    cursor: pointer;
    padding: 6px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1px;
    transition: all 0.3s ease;
    margin: 0;
    transform-origin: center;
}

/* Remove active state transformations - keep hamburger as 3 lines always */
.hamburger-menu.active .hamburger-line:nth-child(1),
.hamburger-menu.active .hamburger-line:nth-child(2),
.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: none;
    opacity: 1;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.hamburger-menu:hover .hamburger-line {
    background: rgba(255, 255, 255, 1);
}

/* Modern Menu Overlay - Base Styles */
.menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modern Menu Content Styles */
.menu-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 1001;
    will-change: transform;
}

/* Prevent initial slide animation on page load */
body.page-loading .menu-content {
    transition: none !important;
}

.menu-overlay.show .menu-content {
    transform: translateX(0);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Removed menu trainer section - user details only in header now */

.trainer-settings-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white; /* White background */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #E60012; /* Red icon color */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.trainer-settings-btn:hover {
    background: rgba(255, 255, 255, 0.9); /* Slightly transparent white on hover */
    border-color: #E60012; /* Red border on hover */
    transform: rotate(90deg);
}

/* Menu Navigation */
.menu-navigation {
    padding: 24px 20px;
    border-bottom: 1px solid #e9ecef;
}

.menu-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--nintendo-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
}

.menu-nav-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--nintendo-dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.menu-nav-item:hover {
    background: rgba(230, 0, 18, 0.08);
    color: var(--nintendo-red);
}

.menu-nav-item.active {
    background: var(--nintendo-red);
    color: white;
    font-weight: 600;
}

.nav-text {
    flex: 1;
}

/* Quick Actions */
.menu-quick-actions {
    padding: 20px;
}

.quick-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(230, 0, 18, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(230, 0, 18, 0.1);
}

.quick-info-item .info-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(230, 0, 18, 0.1);
    border-radius: 50%;
    color: var(--nintendo-red);
}

.info-text {
    font-size: 12px;
    color: var(--nintendo-gray);
    line-height: 1.4;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.nav-pills {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.nav-pill {
    background: var(--nintendo-light-gray);
    border: none;
    border-radius: var(--nintendo-border-radius-large);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--nintendo-font-family);
    font-weight: 600;
    font-size: 15px;
    color: var(--nintendo-gray);
}

.nav-pill:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-pill.active {
    background: var(--nintendo-primary-gradient);
    color: white;
    box-shadow: var(--nintendo-shadow-light);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 15px 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    min-height: calc(100vh - var(--header-height) - var(--nav-height) - var(--footer-height));
    box-sizing: border-box;
}

.content-section {
    display: none;
    width: 100%;
    min-height: 500px;
}

.content-section.active {
    display: block;
}

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

.section-hero {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    background: var(--nintendo-primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}
#currentLevelLabel{
    margin-top: 10px;
}

.section-description {
    font-size: 14px;
    color: var(--nintendo-gray);
    font-weight: 500;
    margin-bottom: 12px;
    margin-top: 6px;
}

/* Nintendo Cards */
.nintendo-grid {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}

.nintendo-card.half-width {
    flex: 0 1 calc(50% - 9px);
    min-width: 280px;
}

/* Results card positioning */
.nintendo-card.results-card {
    flex: 0 1 calc(50% - 9px);
    min-width: 280px;
}

.nintendo-card {
    background: var(--nintendo-card-gradient);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

.nintendo-card:hover {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(230, 0, 18, 0.2);
}

.nintendo-card.full-width {
    grid-column: 1 / -1;
}

.nintendo-card.primary-card {
    border-color: var(--nintendo-red);
    background: linear-gradient(145deg, #fff 0%, #fff5f5 100%);
}

.card-header {
    padding: 18px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--nintendo-light-gray);
}

.card-title-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

/* Prevent unwanted wrapping between title and small tag/badge blocks */
.card-title-group > h3 + .event-badge,
.card-title-group > h3 + .page-actions,
.card-title-group > h3 + span.event-badge {
    margin-left: 12px;
    flex-shrink: 0;
}

/* Generic badge styling (if missing) */
.event-badge {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    background: var(--nintendo-red, #d6001a);
    color: #fff;
    padding: 4px 10px;
    border-radius: 24px;
    white-space: nowrap;
    line-height: 1;
}

/* Page actions container (Lucky Egg + button) */
.page-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Tighten header layout on small screens and keep title + badge on same line */
@media (max-width: 640px) {
    .card-header {
        flex-wrap: nowrap !important;
        display: flex !important;
    }
    .card-title-group {
        flex-wrap: nowrap !important;
        gap: 8px;
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
    }
    .card-title-group h3 {
        flex: 1 1 auto !important;
        white-space: nowrap !important;
       
        margin: 0 !important;
        min-width: 0 !important;
    }
    /* Ensure badge / actions never wrap below title */
    .card-title-group .event-badge,
    .card-title-group .page-actions {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        margin-left: 8px !important;
    }
    
    /* Specific fixes for XP Celebration */
    #events .card-title-group {
        flex-wrap: nowrap !important;
    }
    
    #events .card-title-group h3 {
        white-space: nowrap !important;
       
    }
    
    #events .event-badge,
    #events .page-actions {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
}

/* XP Celebration specific adjustments */
#events .progress-overview-stats .overview-top-row {
    width: 100%;
}

/* List / task summary potential wrapping fixes */
.task-summary-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.task-summary-cards .task-card {

    min-width: 140px;
}

/* Level up tasks section styling */
.tasks-card__title-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 12px;
}

.tasks-card__subtitle {
    font-size: 12px;
    color: var(--nintendo-gray);
    margin-left: 8px;
    flex-shrink: 0;
}

.level-indicator {
    background: var(--nintendo-red);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Level up tasks accordion header */
.tasks-card__accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    padding: 16px 20px;
    cursor: pointer;
}

/* Dashboard level up section */
.dashboard-levelup-section .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

/* Mobile responsive fixes for level up tasks and XP celebration */
@media (max-width: 640px) {
    /* Level up tasks title group */
    .tasks-card__title-group {
        flex-wrap: nowrap;
        min-width: 0;
    }
    
    .tasks-card__title-group h3 {
        flex: 1 1 auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    
    .tasks-card__subtitle {
        display: none; /* Hide subtitle on very small screens */
    }
    
    /* Dashboard level up card header */
    .dashboard-levelup-section .card-header {
        flex-wrap: nowrap !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .dashboard-levelup-section .card-header h3 {
        flex: 1 1 auto !important;
        white-space: nowrap !important;
        margin: 0 !important;
        min-width: 0 !important;
    }
    
    .dashboard-levelup-section .level-indicator {
        margin-left: 8px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    /* XP celebration list items */
    #events .remaining-summary-content .simple-stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    #events .task-summary-cards .task-card {
        min-width: 120px;
        flex: 1 1 calc(50% - 6px);
    }
    
    /* Research pages list items */
    #events .research-pages .page-item {
        padding: 12px 16px;
    }
    
    #events .research-pages .page-header {
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    #events .research-pages .page-title {
        flex: 1 1 auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Avoid awkward bullet wrapping in template activities / celebration lists */
.template-activities .template-activity,
#events .remaining-summary-content .simple-stat-label,
#events .remaining-summary-content .simple-stat-number {
    white-space: nowrap;
}

/* Allow wrapping again above mobile breakpoint if needed for readability */
@media (min-width: 641px) {
    .template-activities .template-activity { white-space: normal; }
    .tasks-card__subtitle { display: inline; }
}

.card-title-group h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--nintendo-dark);
    margin: 0;
    max-width: 65%;
}

/* Prominent Level Badge - Right corner positioning */
.level-badge {
    background: var(--nintendo-primary-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: var(--nintendo-border-radius);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--nintendo-shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-content {
    padding: 10px 24px 24px;
}

/* Input Styling */
.input-group {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--nintendo-dark);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.nintendo-input, .nintendo-select {
    width: 100%;
    padding: 16px 20px;
    border: 3px solid var(--nintendo-light-gray);
    border-radius: var(--nintendo-border-radius);
    font-size: 16px;
    font-family: var(--nintendo-font-family);
    font-weight: 600;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 58px; /* Fixed height for consistent appearance */
}

.nintendo-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' fill='%23666' viewBox='0 0 24 24'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 50px; /* Extra padding for dropdown arrow */
}

/* Remove spinner arrows from number inputs */
.nintendo-input[type="number"]::-webkit-outer-spin-button,
.nintendo-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nintendo-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.nintendo-input:focus, .nintendo-select:focus {
    outline: none;
    border-color: var(--nintendo-red);
    box-shadow: 0 0 0 4px rgba(230, 0, 18, 0.1);
    transform: translateY(-2px);
}

/* Nintendo Buttons */
.nintendo-button {
    background: var(--nintendo-primary-gradient);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    color: white;
    font-family: var(--nintendo-font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 3px 12px rgba(230, 0, 18, 0.2);
    width: 100%;
}

.nintendo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 18, 0.3);
}

.nintendo-button:active {
    transform: translateY(0px);
    box-shadow: 0 3px 12px rgba(230, 0, 18, 0.2);
}

.nintendo-button.secondary {
    background: linear-gradient(135deg, var(--nintendo-gray) 0%, #5a6268 100%);
}

.button-text {
    font-weight: 600;
}

/* Level Up Message */
.level-up-message {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: var(--nintendo-border-radius);
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.15);
    animation: slideInUp 0.5s ease;
}

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

/* Compact Next Level Progress Bar */
.next-level-progress-compact {
    margin-top: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 2px solid #007bff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.compact-next-level {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.compact-level-title {
    font-weight: 700;
    color: #007bff;
    min-width: 100px;
    flex-shrink: 0;
}

.compact-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.compact-progress-bar {
    height: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    flex: 1;
    min-width: 100px;
}

.compact-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #4dabf7 100%);
    border-radius: 4px;
    transition: width 0.6s ease-in-out;
}

.compact-percentage {
    font-weight: 700;
    color: #007bff;
    min-width: 35px;
    text-align: right;
    font-size: 0.85rem;
}

.compact-xp {
    font-weight: 600;
    color: #6c757d;
    min-width: 120px;
    text-align: right;
    font-size: 0.85rem;
}

/* Progress Ring */
/* Progress Display - Clean Design */
.progress-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.progress-percentage {
    font-size: 24px;
    font-weight: 800;
    color: var(--nintendo-red);
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    max-width: 200px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(230, 0, 18, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--nintendo-primary-gradient);
    border-radius: 4px;
    transition: width 0.8s ease;
    width: 0%;
}

/* Progress Stats - Clean Row Design */
.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(230, 0, 18, 0.05);
    border-radius: var(--nintendo-border-radius);
    border-left: 4px solid var(--nintendo-red);
    transition: all 0.3s ease;
}

.stat-row:hover {
    background: rgba(230, 0, 18, 0.1);
    transform: translateX(4px);
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--nintendo-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--nintendo-dark);
}

/* Target Date Inline */
.target-date-inline {
    font-size: 14px;
    font-weight: 500;
    color: var(--nintendo-blue);
    margin-left: 8px;
}

/* Remove old target date display styles */

/* Empty States */
.empty-state.nintendo-style {
    text-align: center;
    padding: 48px 24px;
    color: var(--nintendo-gray);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.empty-state h4 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--nintendo-dark);
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
}

/* Nintendo Modal */
.nintendo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
}

.nintendo-modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: modalFadeIn 0.3s ease;
    padding: 0;
    box-sizing: border-box;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.nintendo-modal-content {
    background: white;
    border-radius: var(--nintendo-border-radius-large);
    width: 90%;
    max-width: 500px;
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 1002;
    box-shadow: var(--nintendo-shadow-heavy);
    border: 3px solid var(--nintendo-red);
    animation: modalSlideIn 0.4s ease;
    margin: 20px;
    transition: height 0.3s ease;
}

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

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

@keyframes modalContentResize {
    from {
        transform: scale(0.98);
    }
    to {
        transform: scale(1);
    }
}

.nintendo-modal-header {
    background: var(--nintendo-primary-gradient);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title-group {
    display: flex;
    align-items: center;
}

.nintendo-modal-header h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
}

.modal-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    min-width: 60px;
    height: 36px;
    border: none;
    border-radius: var(--nintendo-border-radius-small);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    padding: 0 12px;
}

/* Close button variant (SVG only) */
.icon-button.close-btn {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    color: var(--nintendo-dark);
}
.icon-button.close-btn svg {
    stroke: currentColor;
}
.icon-button.close-btn:hover {
    background: rgba(0,0,0,0.06);
    color: var(--nintendo-red);
    transform: scale(1.08);
    max-width: 36px;
}

/* Hide close and cancel buttons during first-time setup */
.modal.first-time-setup .icon-button.close-btn,
.modal.first-time-setup .modal-footer .nintendo-button.secondary {
    display: none !important;
}

/* Disable backdrop clicking during first-time setup */
.modal.first-time-setup .modal-backdrop {
    pointer-events: none;
    cursor: default;
}

.icon-button.wide {
    min-width: 80px;
    padding: 0 16px;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.icon-button.danger:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffcccc;
}

/* Inline share snapshot controls */
.share-inline-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 12px;
}
.snapshot-inline-btn, .download-inline-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #222;
    border: 1px solid #333;
    color: #ff4a3d;
    font-size: 22px;
    padding: 0;
}
.snapshot-inline-btn:hover, .download-inline-btn:hover {
    transform: scale(1.05);
    background: #2d2d2d;
    border-color: #444;
}
.inline-snapshot-preview {
    margin-top: 16px;
}
.inline-snapshot-preview .snapshot-placeholder {
    font-size: 12px;
    opacity: 0.6;
}

/* Snapshot hover trigger */
/* Plain snapshot icon (absolute) */
.user-profile-card { position: relative; }
.snapshot-hover-trigger {
    position: absolute;
    bottom: 10px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: url('../images/snapshot.png') center/72% no-repeat;
    background-color: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    opacity: 0.45;
    padding: 0;
    filter: none;
    transition: transform .18s ease;
    z-index: 5;
}
.snapshot-hover-trigger:hover,
.snapshot-hover-trigger:focus-visible {
    transform: scale(1.08);
    opacity: 1;
}
.snapshot-hover-trigger:active { transform: scale(0.95); }

/* Snapshot Modal Specific */
.snapshot-modal-content {
    max-width: 600px;
    width: 600px;
}
.snapshot-preview-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: #111;
    border: 2px solid #222;
    border-radius: 12px;
    position: relative;
}
#snapshotModalCanvas {
    background: #111;
    display: block;
}
#snapshotModal .snapshot-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    font-weight: 600;
}
#snapshotModal .icon-button.close-btn {
    color: var(--nintendo-dark);
}
#snapshotModal .icon-button.close-btn:hover {
    color: var(--nintendo-red);
}

.nintendo-modal-body {
    padding: 24px;
    transition: height 0.4s ease;
}

.modal-body {
    padding: 24px;
}

.nintendo-form-group {
    margin-bottom: 24px;
}

.nintendo-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.nintendo-form-group.half-width {
    flex: 1;
    margin-bottom: 0;
}

.field-hint {
    font-size: 0.8rem;
    color: var(--nintendo-gray);
    margin-top: 4px;
    font-style: italic;
}

.nintendo-label {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--nintendo-dark);
    margin-bottom: 8px;
}

.nintendo-advanced {
    border: 2px solid var(--nintendo-light-gray);
    border-radius: var(--nintendo-border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.advanced-header {
    background: var(--nintendo-light-gray);
    padding: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.advanced-header:hover {
    background: #e9ecef;
}

.advanced-label {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--nintendo-dark);
}

.advanced-toggle {
    transition: transform 0.3s ease;
}

.nintendo-advanced.expanded .advanced-toggle {
    transform: rotate(180deg);
}

.advanced-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    padding: 0 20px 0 20px;
}

.nintendo-advanced.expanded .advanced-content {
    max-height: 200px;
    padding: 20px;
}

.nintendo-modal-footer {
    padding: 20px 24px;
    border-top: 2px solid var(--nintendo-light-gray);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.nintendo-modal-footer .nintendo-button {
    width: auto;
    min-width: 120px;
}

/* Reset Section Styles */
.reset-section {
    margin-top: 15px;
    text-align: center;
    padding-top: 10px;
}

.reset-section a {
    color: #dc3545;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: inline-block;
}

.reset-section a:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #b02a37;
    text-decoration: underline;
}

.reset-section a:active {
    background-color: rgba(220, 53, 69, 0.2);
}

/* Team Selection Styles */
.team-selection {
    display: flex;
    gap: 12px;
}

.team-option {
    position: relative;
    flex: 1;
}

.nintendo-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.team-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 2px solid var(--nintendo-light-gray);
    border-radius: var(--nintendo-border-radius);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 1000;
    font-size: 14px;
    text-align: center;
    min-height: 48px;
}

.team-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Team-specific text colors */
.team-label.valor .team-name {
    color: #ff5252;
}

.team-label.mystic .team-name {
    color: #26c6da;
}

.team-label.instinct .team-name {
    color: #ffb300;
}

/* Selected state - highlight border with theme color */
.nintendo-radio:checked + .team-label.valor {
    border-color: #ff5252;
    box-shadow: 0 0 0 1px rgba(255, 82, 82, 0.3);
}

.nintendo-radio:checked + .team-label.mystic {
    border-color: #26c6da;
    box-shadow: 0 0 0 1px rgba(38, 198, 218, 0.3);
}

.nintendo-radio:checked + .team-label.instinct {
    border-color: #ffb300;
    box-shadow: 0 0 0 1px rgba(255, 179, 0, 0.3);
}

/* Footer Styles */
.app-footer {
    background: var(--nintendo-card-gradient);
    border-top: 3px solid var(--nintendo-red);
    padding: 16px 0;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(230, 0, 18, 0.1);
    flex-shrink: 0;
    min-height: var(--footer-height);
    box-sizing: border-box;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: calc(var(--footer-height) - 32px);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--nintendo-gray);
    flex: 0 1 auto;
    white-space: nowrap;
}

.footer-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0; /* Allow text to wrap */
}

.copyright-text {
    font-size: 0.8rem;
    color: #999;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
    hyphens: auto;
}

.footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 1 auto;
    white-space: nowrap;
}

.made-with {
    font-weight: 500;
}

.heart-icon {
    font-size: 1.2rem;
    animation: heartbeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(230, 0, 18, 0.3));
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

.creator-name {
    font-weight: 700;
    color: var(--nintendo-dark);
    background: linear-gradient(135deg, var(--nintendo-red), var(--nintendo-red-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.kofi-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--nintendo-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.kofi-link:hover {
    color: #FF5E5B;
    transform: translateX(2px);
}

.kofi-link:hover .kofi-text {
    color: #FF5E5B;
}

.kofi-text {
    font-weight: 600;
}

.kofi-icon {
    font-size: 1.1rem;
    animation: steam 2s ease-in-out infinite;
}

@keyframes steam {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-1px) rotate(1deg);
    }
    75% {
        transform: translateY(-1px) rotate(-1deg);
    }
}

/* Footer responsive styles */
@media (max-width: 968px) {
    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 0 16px;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        flex: none;
        justify-content: center;
        width: 100%;
    }
    
    .copyright-text {
        font-size: 0.75rem;
        order: 2;
        line-height: 1.3;
        max-width: 100%;
        padding: 0 8px;
    }
    
    .footer-left {
        order: 1;
        font-size: 0.9rem;
    }
    
    .footer-right {
        order: 3;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .app-footer {
        padding: 12px 0;
    }
    
    .footer-content {
        gap: 8px;
        padding: 0 12px;
    }
    
    .copyright-text {
        font-size: 0.7rem;
        line-height: 1.2;
        word-spacing: -1px;
    }
    
    .footer-left,
    .footer-right {
        font-size: 0.85rem;
    }
    
    .heart-icon,
    .kofi-icon {
        font-size: 1rem;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: var(--nintendo-primary-gradient);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: var(--nintendo-shadow-medium);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    border: 3px solid var(--nintendo-white);
}

.scroll-to-top.visible {
    opacity: 0.3; /* Transparent by default when visible */
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    opacity: 1; /* Full opacity on hover */
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--nintendo-shadow-heavy);
    background: linear-gradient(135deg, var(--nintendo-red-light) 0%, var(--nintendo-red) 100%);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1.05);
    transition: all 0.1s ease;
}

.scroll-to-top::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--nintendo-primary-gradient);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-to-top:hover::before {
    opacity: 0.3;
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}