/* Core Reset & Variables */
:root {
    --bg-main: #0b0b12;
    --bg-glass: rgba(18, 18, 29, 0.65);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-hover: rgba(255, 255, 255, 0.12);
    --font-family: 'Outfit', sans-serif;
    
    /* Rarity Colors */
    --color-common: #b5c2c9;
    --color-rare: #3498db;
    --color-epic: #9b59b6;
    --color-mystic: #fd79a8;
    --color-legendary: #f1c40f;
    --color-divine: #00d2d3;
    --color-godly: #e74c3c;
    --color-og: #2ecc71;
    --color-secret: #8e44ad; /* Default secret color, but brown for the pet */
    --color-secret-brown: #a0522d; /* Sienna brown */
    --color-secret-text: #e67e22; /* Warm orange/brown */

    /* Glows */
    --glow-common: 0 0 10px rgba(181, 194, 201, 0.3);
    --glow-rare: 0 0 15px rgba(52, 152, 219, 0.5);
    --glow-epic: 0 0 15px rgba(155, 89, 182, 0.6);
    --glow-mystic: 0 0 20px rgba(253, 121, 168, 0.7);
    --glow-legendary: 0 0 25px rgba(241, 196, 15, 0.8);
    --glow-divine: 0 0 30px rgba(0, 210, 211, 0.9);
    --glow-godly: 0 0 35px rgba(231, 76, 60, 1), 0 0 15px rgba(231, 76, 60, 0.5);
    --glow-og: 0 0 25px rgba(46, 204, 113, 0.8);
    --glow-secret: 0 0 40px rgba(160, 82, 45, 1), 0 0 20px rgba(230, 126, 34, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 10% 20%, rgba(26, 21, 44, 0.8) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(13, 27, 42, 0.8) 0px, transparent 50%),
        radial-gradient(at 50% 80%, rgba(35, 15, 30, 0.8) 0px, transparent 50%);
    background-attachment: fixed;
    color: #f5f6fa;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Layout */
.game-container {
    width: 100%;
    max-width: 1400px;
    height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.glow-text {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ff66b2, #ffb3d9, #00d2d3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 102, 178, 0.3));
}

.stats-bar {
    display: flex;
    gap: 20px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a0a8c0;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
}

.text-secret {
    color: var(--color-secret-text);
    text-shadow: 0 0 8px rgba(230, 126, 34, 0.4);
}

/* Main Grid */
.game-main {
    flex: 1;
    display: grid;
    grid-template-columns: 350px 1fr 380px;
    gap: 20px;
    min-height: 0; /* Important for grid scrolling */
}

/* Glass Panels */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.glass-card:hover {
    border-color: var(--border-glass-hover);
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-glass);
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Left Panel: Stats & Inventory */
.left-panel {
    display: flex;
    flex-direction: column;
}

.rarity-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-glass);
}

.rarity-stat {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.rarity-stat .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* Assign colors dynamically to stats */
.rarity-stat.common { color: var(--color-common); }
.rarity-stat.common .dot { background: var(--color-common); }

.rarity-stat.rare { color: var(--color-rare); }
.rarity-stat.rare .dot { background: var(--color-rare); }

.rarity-stat.epic { color: var(--color-epic); }
.rarity-stat.epic .dot { background: var(--color-epic); }

.rarity-stat.mystic { color: var(--color-mystic); }
.rarity-stat.mystic .dot { background: var(--color-mystic); }

.rarity-stat.legendary { color: var(--color-legendary); }
.rarity-stat.legendary .dot { background: var(--color-legendary); }

.rarity-stat.divine { color: var(--color-divine); }
.rarity-stat.divine .dot { background: var(--color-divine); }

.rarity-stat.godly { color: var(--color-godly); }
.rarity-stat.godly .dot { background: var(--color-godly); }

.rarity-stat.og { color: var(--color-og); }
.rarity-stat.og .dot { background: var(--color-og); }

.rarity-stat.secret { 
    color: var(--color-secret-text); 
    background: rgba(160, 82, 45, 0.1); 
    border-color: rgba(160, 82, 45, 0.3);
}
.rarity-stat.secret .dot { background: var(--color-secret-text); }

.inventory-container {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    min-height: 0;
}

.inventory-container h3 {
    font-size: 14px;
    color: #a0a8c0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.empty-inventory {
    font-size: 13px;
    color: #6c758f;
    text-align: center;
    padding: 40px 10px;
    line-height: 1.5;
}

/* Inventory Item design */
.inv-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s, background-color 0.2s;
}

.inv-item:hover {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.04);
}

.inv-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inv-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inv-icon-wrapper .pet-avatar-svg {
    width: 28px !important;
    height: 28px !important;
    filter: none !important;
}

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

.inv-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.inv-rarity {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inv-count {
    font-size: 12px;
    color: #a0a8c0;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.inv-rarity.common { color: var(--color-common); }
.inv-rarity.rare { color: var(--color-rare); }
.inv-rarity.epic { color: var(--color-epic); }
.inv-rarity.mystic { color: var(--color-mystic); }
.inv-rarity.legendary { color: var(--color-legendary); }
.inv-rarity.divine { color: var(--color-divine); }
.inv-rarity.godly { color: var(--color-godly); }
.inv-rarity.og { color: var(--color-og); }
.inv-rarity.secret { color: var(--color-secret-text); text-shadow: 0 0 4px rgba(230,126,34,0.3); }

.panel-actions {
    padding: 15px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-top: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.1);
}

/* Center stage: Hatch Hint (Desktop) */
.center-panel {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hatch-arena-placeholder {
    text-align: center;
    max-width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 30px;
}

.hatch-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #6c758f;
    font-size: 15px;
}

.hand-icon {
    width: 32px;
    height: 32px;
    margin-top: 10px;
    animation: hand-bounce 1s infinite alternate;
}

@keyframes hand-bounce {
    0% { transform: translateY(0); opacity: 0.5; }
    100% { transform: translateY(8px); opacity: 1; }
}

/* Right Panel: Shop & Interactive Egg Card */
.right-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.egg-card-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    overflow-x: auto;
    padding: 10px 4px 16px 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Premium horizontal scrollbar style */
.egg-card-container::-webkit-scrollbar {
    height: 6px;
}
.egg-card-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
.egg-card-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.egg-card-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.egg-card {
    position: relative;
    flex: 0 0 240px;
    width: 240px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.magma-egg-card {
    border-color: rgba(255, 90, 0, 0.15) !important;
}

.magma-egg-card:hover {
    border-color: rgba(255, 90, 0, 0.4) !important;
    box-shadow: 0 15px 40px rgba(255, 90, 0, 0.25) !important;
}

.magma-cost {
    background: linear-gradient(135deg, #ff9900, #ff3300) !important;
    box-shadow: 0 4px 15px rgba(255, 60, 0, 0.4) !important;
}

.ice-egg-card {
    border-color: rgba(52, 152, 219, 0.2) !important;
}

.ice-egg-card:hover {
    border-color: rgba(52, 152, 219, 0.5) !important;
    box-shadow: 0 15px 40px rgba(52, 152, 219, 0.25) !important;
}

.ice-cost {
    background: linear-gradient(135deg, #a9cce3, #3498db) !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4) !important;
}

.nature-egg-card {
    border-color: rgba(46, 204, 113, 0.2) !important;
}

.nature-egg-card:hover {
    border-color: rgba(46, 204, 113, 0.5) !important;
    box-shadow: 0 15px 40px rgba(46, 204, 113, 0.25) !important;
}

.nature-cost {
    background: linear-gradient(135deg, #abebc6, #2ecc71) !important;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4) !important;
}

.golden-egg-card {
    border-color: rgba(241, 196, 15, 0.2) !important;
}

.golden-egg-card:hover {
    border-color: rgba(241, 196, 15, 0.5) !important;
    box-shadow: 0 15px 40px rgba(241, 196, 15, 0.25) !important;
}

.golden-cost {
    background: linear-gradient(135deg, #ffe259, #ffa751) !important;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.4) !important;
}

.galaxy-egg-card {
    border-color: rgba(160, 68, 255, 0.2) !important;
}

.galaxy-egg-card:hover {
    border-color: rgba(160, 68, 255, 0.5) !important;
    box-shadow: 0 15px 40px rgba(160, 68, 255, 0.3) !important;
}

.galaxy-cost {
    background: linear-gradient(135deg, #a044ff, #00ffff) !important;
    box-shadow: 0 4px 15px rgba(160, 68, 255, 0.5) !important;
}

.egg-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 102, 178, 0.3);
    box-shadow: 0 15px 40px rgba(255, 102, 178, 0.15);
}

.egg-card:active {
    transform: scale(0.96) translateY(-2px);
}

.egg-glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 102, 178, 0.25) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    transition: transform 0.4s;
}

.egg-card:hover .egg-glow-effect {
    transform: translate(-50%, -50%) scale(1.3);
}

.egg-wrapper {
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.cat-egg-svg {
    width: 160px;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

.egg-card:hover .cat-egg-svg {
    transform: rotate(2deg);
}

.egg-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.egg-desc {
    font-size: 13px;
    color: #a0a8c0;
    margin-bottom: 15px;
}

.egg-cost {
    display: inline-block;
    padding: 6px 20px;
    background: linear-gradient(135deg, #ff66b2, #cc0066);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 102, 178, 0.4);
}

/* Hatch Overlay (Cinematic Screen) */
.hatch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.hatch-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.overlay-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 10, 0.95);
    backdrop-filter: blur(10px);
}

.hatch-sequence {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.anim-egg-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s ease;
}

/* Animations */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

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

/* Shake animation triggered before crack */
.egg-shake-fast {
    animation: shake-fast 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake-fast {
    10%, 90% { transform: translate3d(-2px, 0, 0) rotate(-1deg); }
    20%, 80% { transform: translate3d(4px, 0, 0) rotate(2deg); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0) rotate(-3deg); }
    40%, 60% { transform: translate3d(6px, 0, 0) rotate(3deg); }
}

.egg-shake-extreme {
    animation: shake-extreme 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake-extreme {
    10%, 90% { transform: translate3d(-4px, 2px, 0) rotate(-2deg) scale(1.05); }
    20%, 80% { transform: translate3d(8px, -2px, 0) rotate(4deg) scale(1.1); }
    30%, 50%, 70% { transform: translate3d(-12px, 3px, 0) rotate(-6deg) scale(1.15); }
    40%, 60% { transform: translate3d(12px, -3px, 0) rotate(6deg) scale(1.2); }
}

/* Large Egg on Hatch Screen */
.large-egg {
    width: 220px;
    height: auto;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6));
    transform-origin: bottom center;
}

/* Egg Shell Parts (Left and Right Splitting) */
#egg-shell-left, #egg-shell-right, #egg-shell-paw {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.egg-split #egg-shell-left {
    transform: translate(-50px, -20px) rotate(-25deg);
    opacity: 0;
}

.egg-split #egg-shell-right {
    transform: translate(50px, -20px) rotate(25deg);
    opacity: 0;
}

.egg-split #egg-shell-paw {
    opacity: 0;
    transform: translate(37px, 75px) scale(0) rotate(45deg);
}

/* Pet Reveal Card */
.pet-reveal-card {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 90%;
    max-width: 420px;
    padding: 35px 30px;
    background: rgba(20, 20, 32, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    z-index: 20;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.pet-reveal-card.show {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

.pet-avatar-wrapper {
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
}

.pet-avatar-svg {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.pet-details {
    margin-bottom: 30px;
}

.reveal-rarity {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reveal-name {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.reveal-chance {
    font-size: 13px;
    color: #a0a8c0;
}

/* Rarity specific Reveal Styling */
.pet-reveal-card.common { border-color: rgba(181, 194, 201, 0.3); box-shadow: var(--glow-common); }
.pet-reveal-card.common .reveal-rarity { background: rgba(181, 194, 201, 0.1); color: var(--color-common); }

.pet-reveal-card.rare { border-color: rgba(52, 152, 219, 0.3); box-shadow: var(--glow-rare); }
.pet-reveal-card.rare .reveal-rarity { background: rgba(52, 152, 219, 0.1); color: var(--color-rare); }

.pet-reveal-card.epic { border-color: rgba(155, 89, 182, 0.3); box-shadow: var(--glow-epic); }
.pet-reveal-card.epic .reveal-rarity { background: rgba(155, 89, 182, 0.1); color: var(--color-epic); }

.pet-reveal-card.mystic { border-color: rgba(253, 121, 168, 0.3); box-shadow: var(--glow-mystic); }
.pet-reveal-card.mystic .reveal-rarity { background: rgba(253, 121, 168, 0.1); color: var(--color-mystic); }

.pet-reveal-card.legendary { border-color: rgba(241, 196, 15, 0.3); box-shadow: var(--glow-legendary); }
.pet-reveal-card.legendary .reveal-rarity { background: rgba(241, 196, 15, 0.1); color: var(--color-legendary); }

.pet-reveal-card.divine { border-color: rgba(0, 210, 211, 0.4); box-shadow: var(--glow-divine); }
.pet-reveal-card.divine .reveal-rarity { background: rgba(0, 210, 211, 0.1); color: var(--color-divine); }

.pet-reveal-card.godly { 
    border-color: rgba(231, 76, 60, 0.5); 
    box-shadow: var(--glow-godly); 
    animation: idle-shake 4s infinite ease-in-out;
}
.pet-reveal-card.godly .reveal-rarity { background: rgba(231, 76, 60, 0.15); color: var(--color-godly); }

.pet-reveal-card.og { 
    border-color: rgba(46, 204, 113, 0.5); 
    box-shadow: var(--glow-og);
    font-family: 'Courier New', Courier, monospace; 
}
.pet-reveal-card.og .reveal-rarity { background: rgba(46, 204, 113, 0.15); color: var(--color-og); }

.pet-reveal-card.secret { 
    border-color: rgba(160, 82, 45, 0.5); 
    box-shadow: var(--glow-secret);
    background: linear-gradient(135deg, rgba(30, 15, 10, 0.9), rgba(15, 10, 5, 0.9));
}
.pet-reveal-card.secret .reveal-rarity { 
    background: rgba(160, 82, 45, 0.25); 
    color: var(--color-secret-text); 
    border-color: rgba(230, 126, 34, 0.3);
}
.pet-reveal-card.secret .reveal-name {
    background: linear-gradient(90deg, #d35400, #f39c12, #d35400);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine-text 3s linear infinite;
}

@keyframes shine-text {
    to { background-position: 200% center; }
}

@keyframes idle-shake {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-2px) rotate(0.5deg); }
    75% { transform: translateY(2px) rotate(-0.5deg); }
}

/* Canvas/Overlay Particle containers */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    animation: particle-fly 1.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes particle-fly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Sparkles overlay */
.sparkle {
    position: absolute;
    background: white;
    clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
    animation: sparkle-glow var(--duration) ease-in-out infinite;
}

@keyframes sparkle-glow {
    0%, 100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
    50% { transform: translate(var(--sx), var(--sy)) scale(var(--scale)); opacity: 1; }
}

/* Buttons */
.btn {
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ff66b2, #cc0066);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 102, 178, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 178, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #a0a8c0;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-collect {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 800;
    border-radius: 16px;
}

/* Sound Toast */
.sound-consent-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(18, 18, 29, 0.95);
    border: 1px solid rgba(255, 102, 178, 0.2);
    border-radius: 30px;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sound-consent-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Responsive / Mobile Styling */
@media (max-width: 1024px) {
    .game-main {
        grid-template-columns: 1fr 1fr;
    }
    .center-panel {
        display: none; /* Only show in overlays */
    }
}

@media (max-width: 768px) {
    .game-container {
        height: auto;
        min-height: 100vh;
        padding: 12px;
        gap: 12px;
        justify-content: flex-start;
    }
    
    .game-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px 20px;
        text-align: center;
    }
    
    .glow-text {
        font-size: 22px;
    }
    
    .stats-bar {
        width: 100%;
        justify-content: space-around;
    }
    
    .stat-card {
        align-items: center;
    }
    
    .game-main {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .left-panel {
        order: 2; /* Move inventory below shop */
        max-height: 500px;
    }

    .right-panel {
        order: 1;
        padding: 20px 10px;
    }

    .rarity-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 12px;
        font-size: 11px;
    }
    
    .egg-card {
        max-width: 100%;
        padding: 25px 15px;
    }
    
    .cat-egg-svg {
        width: 130px;
    }

    .large-egg {
        width: 180px;
    }

    .pet-reveal-card {
        padding: 25px 20px;
        width: 92%;
    }

    .pet-avatar-wrapper {
        width: 140px;
        height: 140px;
        margin-bottom: 15px;
    }

    .pet-avatar-svg {
        width: 100px;
    }

    .reveal-name {
        font-size: 22px;
    }

    /* Responsive All Pets Modal Grid for Mobile */
    .modal-pets-grid {
        padding: 15px !important;
        gap: 15px !important;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }
    .modal-pet-card {
        padding: 12px !important;
        border-radius: 16px !important;
        align-items: center !important;
        text-align: center !important;
    }
    .modal-pet-avatar {
        width: 80px !important;
        height: 80px !important;
        max-width: 80px !important;
        margin-bottom: 10px !important;
    }
    .modal-pet-name {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    .modal-pet-use {
        font-size: 10px !important;
        padding-top: 6px !important;
    }
    .modal-pet-rarity {
        font-size: 8px !important;
        padding: 2px 6px !important;
        margin-bottom: 8px !important;
    }
    .modal-pet-power {
        font-size: 10px !important;
        margin-bottom: 8px !important;
    }
}

/* Custom Special Effects for Rarity Cat Avatars */
/* OG Pixel Filter style */
.pixel-matrix {
    image-rendering: pixelated;
}

/* Godly fire particles */
.flame-halo {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(231, 76, 60, 0.4);
    animation: rotate-flame 8s linear infinite;
}

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

/* Divine angel wings styling */
.wing-left {
    transform-origin: 30px 45px;
    animation: wing-flap-l 1s infinite alternate ease-in-out;
}
.wing-right {
    transform-origin: 70px 45px;
    animation: wing-flap-r 1s infinite alternate ease-in-out;
}

@keyframes wing-flap-l {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(10deg); }
}
@keyframes wing-flap-r {
    0% { transform: rotate(5deg); }
    100% { transform: rotate(-10deg); }
}

/* All Pets Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 10, 0.85);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    background: rgba(18, 18, 29, 0.98) !important;
    display: flex;
    flex-direction: column;
    padding: 0;
    animation: modal-zoom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

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

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

.modal-header h2 {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #00d2d3, #ff66b2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #a0a8c0;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.modal-close-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

.modal-pets-grid {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 32px;
}

.modal-pet-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modal-pet-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Rarity specific card styling inside modal */
.modal-pet-card.common { border-color: rgba(181, 194, 201, 0.15); }
.modal-pet-card.rare { border-color: rgba(52, 152, 219, 0.2); }
.modal-pet-card.epic { border-color: rgba(155, 89, 182, 0.25); }
.modal-pet-card.mystic { border-color: rgba(253, 121, 168, 0.3); }
.modal-pet-card.legendary { border-color: rgba(241, 196, 15, 0.3); }
.modal-pet-card.divine { border-color: rgba(0, 210, 211, 0.35); }
.modal-pet-card.godly { border-color: rgba(231, 76, 60, 0.4); }
.modal-pet-card.og { border-color: rgba(46, 204, 113, 0.4); }
.modal-pet-card.secret { 
    border-color: rgba(160, 82, 45, 0.5); 
    background: linear-gradient(135deg, rgba(30, 15, 10, 0.4), rgba(15, 10, 5, 0.4));
}

.modal-pet-avatar {
    width: 100% !important;
    max-width: 130px !important;
    height: auto !important;
    aspect-ratio: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    flex-shrink: 0 !important;
    align-self: center !important;
}

.modal-pet-avatar .pet-avatar-svg {
    width: 100% !important;
    height: 100% !important;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4)) !important;
}

.modal-pet-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

/* Secret custom styling in modal */
.modal-pet-card.secret .modal-pet-name {
    background: linear-gradient(90deg, #d35400, #f39c12, #d35400);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine-text 3s linear infinite;
}

.modal-pet-rarity {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    align-self: flex-end !important; /* Aligns rarity badge to the right side of the card */
}

.modal-pet-card.common .modal-pet-rarity { color: var(--color-common); background: rgba(181, 194, 201, 0.08); }
.modal-pet-card.rare .modal-pet-rarity { color: var(--color-rare); background: rgba(52, 152, 219, 0.08); }
.modal-pet-card.epic .modal-pet-rarity { color: var(--color-epic); background: rgba(155, 89, 182, 0.08); }
.modal-pet-card.mystic .modal-pet-rarity { color: var(--color-mystic); background: rgba(253, 121, 168, 0.08); }
.modal-pet-card.legendary .modal-pet-rarity { color: var(--color-legendary); background: rgba(241, 196, 15, 0.08); }
.modal-pet-card.divine .modal-pet-rarity { color: var(--color-divine); background: rgba(0, 210, 211, 0.08); }
.modal-pet-card.godly .modal-pet-rarity { color: var(--color-godly); background: rgba(231, 76, 60, 0.08); }
.modal-pet-card.og .modal-pet-rarity { color: var(--color-og); background: rgba(46, 204, 113, 0.08); }
.modal-pet-card.secret .modal-pet-rarity { color: var(--color-secret-text); background: rgba(160, 82, 45, 0.15); border-color: rgba(230, 126, 34, 0.2); }

.modal-pet-use {
    font-size: 12px;
    color: #a0a8c0;
    line-height: 1.4;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    width: 100%;
}

.modal-pet-use span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6c758f;
    margin-bottom: 4px;
}

/* Header button placement adjustments */
.btn-all-pets {
    background: linear-gradient(135deg, #00d2d3, #3498db);
    box-shadow: 0 4px 15px rgba(0, 210, 211, 0.3);
    margin-right: 15px;
    font-weight: 800;
}

.btn-all-pets:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 211, 0.5);
}

/* Reveal Screen Pet Use Description styling */
.reveal-use {
    font-size: 13px;
    color: #cbd5e0;
    margin: 10px 0 14px 0;
    font-style: italic;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 16px;
    border-radius: 10px;
    border-left: 3px solid #ff66b2;
}

.pet-reveal-card.common .reveal-use { border-left-color: var(--color-common); }
.pet-reveal-card.rare .reveal-use { border-left-color: var(--color-rare); }
.pet-reveal-card.epic .reveal-use { border-left-color: var(--color-epic); }
.pet-reveal-card.mystic .reveal-use { border-left-color: var(--color-mystic); }
.pet-reveal-card.legendary .reveal-use { border-left-color: var(--color-legendary); }
.pet-reveal-card.divine .reveal-use { border-left-color: var(--color-divine); }
.pet-reveal-card.godly .reveal-use { border-left-color: var(--color-godly); }
.pet-reveal-card.og .reveal-use { border-left-color: var(--color-og); }
.pet-reveal-card.secret .reveal-use { border-left-color: var(--color-secret-text); }

/* Equipped Items & Badges */
.inv-item {
    cursor: pointer;
    position: relative;
}

.inv-item:active {
    transform: scale(0.98);
}

.inv-item.equipped {
    border-color: #2ecc71 !important;
    background: rgba(46, 204, 113, 0.06) !important;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.15);
}

.equipped-badge {
    font-size: 9px;
    font-weight: 800;
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.15);
    padding: 2px 7px;
    border-radius: 20px;
    border: 1px solid rgba(46, 204, 113, 0.3);
    letter-spacing: 0.5px;
    margin-top: 4px;
    display: inline-block;
    align-self: flex-start;
}

.modal-pet-power {
    font-size: 11px;
    font-weight: 800;
    color: #00d2d3;
    background: rgba(0, 210, 211, 0.08);
    border: 1px solid rgba(0, 210, 211, 0.2);
    padding: 4px 10px;
    border-radius: 10px;
    margin-bottom: 12px;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* Play & Pet Cats Section styling */
.pet-play-card {
    margin-top: 20px;
    padding: 24px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.play-header h3 {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.play-header p {
    font-size: 12px;
    color: #a0a8c0;
}

.play-pets-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 5px;
}

.play-pet-avatar {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    transition: transform 0.2s, background-color 0.2s;
    user-select: none;
}

.play-pet-avatar:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.play-svg-wrapper {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.play-svg-wrapper .pet-avatar-svg {
    width: 40px !important;
    height: 40px !important;
}

.play-name {
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.play-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff66b2;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 10px;
    border: 1px solid #000;
}

/* Float Animation for Coins */
.floating-coin-text {
    position: fixed;
    font-size: 18px;
    font-weight: 900;
    pointer-events: none;
    z-index: 99999;
    animation: float-up-fade 1s forwards cubic-bezier(0.18, 0.89, 0.32, 1.28);
    text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

@keyframes float-up-fade {
    0% {
        transform: translate(-50%, -50%) scale(0.6) translateY(0);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.1) translateY(-10px);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.9) translateY(-80px);
        opacity: 0;
    }
}

/* Click feedback bounce */
.play-pet-avatar.bounce-pet {
    animation: bounce-small 0.3s ease;
}

@keyframes bounce-small {
    0% { transform: scale(1); }
    30% { transform: scale(0.85); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Premium Cost styling */
.egg-cost.premium-cost {
    background: linear-gradient(135deg, #ffd700, #ff9f43) !important;
    box-shadow: 0 4px 15px rgba(255, 159, 67, 0.4) !important;
    color: #000 !important;
    font-weight: 900 !important;
}

/* Sell button styling in inventory cards */
.btn-sell-pet {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #ff4d4d;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sell-pet:hover {
    background: rgba(231, 76, 60, 0.25);
    border-color: rgba(231, 76, 60, 0.5);
    color: #fff;
    transform: scale(1.05);
}

.btn-sell-pet:active {
    transform: scale(0.95);
}

/* Mobile responsive query for the All Cats Modal scroll and layout */
@media (max-width: 600px) {
    .modal-content {
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
    }
    
    .modal-pets-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 12px !important;
        padding: 15px !important;
    }
    
    .modal-pet-card {
        padding: 12px 8px !important;
    }
    
    .modal-pet-avatar {
        width: 70px !important;
        height: 70px !important;
        min-height: 70px !important;
        margin-bottom: 8px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .modal-pet-avatar .pet-avatar-svg {
        width: 60px !important;
        height: 60px !important;
    }
    
    .modal-pet-name {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    
    .modal-pet-rarity {
        font-size: 8px !important;
        padding: 2px 8px !important;
        margin-bottom: 8px !important;
    }
    
    .modal-pet-power {
        font-size: 9px !important;
        padding: 2px 6px !important;
        margin-bottom: 8px !important;
        letter-spacing: 0px !important;
    }
    
    .modal-pet-use {
        font-size: 10px !important;
        padding-top: 8px !important;
    }
    
    .modal-pet-use span {
        font-size: 8px !important;
        margin-bottom: 2px !important;
    }
}

/* Merging Lab Styling */
.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 10px;
    font-family: var(--font-family);
    color: #a0a8c0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    outline: none;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: #ff66b2;
    border-bottom: 2px solid #ff66b2;
    background: rgba(255, 102, 178, 0.05);
}

.tab-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.merge-lab-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.merge-info-card {
    background: linear-gradient(135deg, rgba(255, 102, 178, 0.1), rgba(142, 68, 173, 0.1));
    border: 1px solid rgba(255, 102, 178, 0.15);
    border-radius: 16px;
    padding: 16px;
}

.merge-info-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: #ff66b2;
    margin-bottom: 6px;
}

.merge-info-card p {
    font-size: 12px;
    color: #cbd5e0;
    line-height: 1.5;
}

.merge-section h4 {
    font-size: 13px;
    font-weight: 800;
    color: #a0a8c0;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.merge-slots-list, .merge-eligible-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Active Slot Item */
.merge-slot-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.merge-slot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.merge-slot-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.merge-slot-avatar-mini {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merge-slot-avatar-mini .pet-avatar-svg {
    width: 100% !important;
    height: 100% !important;
}

.merge-slot-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.merge-slot-status {
    font-size: 11px;
    font-weight: 800;
}

.merge-slot-status.active { color: #f1c40f; }
.merge-slot-status.ready { color: #2ecc71; }

.merge-progress-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.merge-progress-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.merge-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff66b2, #9b59b6);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s ease;
}

.merge-timer {
    font-size: 11px;
    color: #a0a8c0;
    font-weight: 600;
    align-self: flex-end;
}

.merge-slot-actions {
    display: flex;
    gap: 10px;
}

.btn-speedup {
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.3);
    color: #f1c40f;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.btn-speedup:hover {
    background: rgba(241, 196, 15, 0.25);
    transform: translateY(-1px);
}

.btn-claim {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
    outline: none;
}

.btn-claim:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(46, 204, 113, 0.5);
}

/* Eligible Merge Item */
.merge-eligible-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.merge-eligible-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.merge-eligible-avatar-mini {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merge-eligible-avatar-mini .pet-avatar-svg {
    width: 100% !important;
    height: 100% !important;
}

.merge-eligible-details {
    display: flex;
    flex-direction: column;
}

.merge-eligible-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.merge-eligible-count {
    font-size: 11px;
    color: #a0a8c0;
}

.btn-start-merge {
    background: linear-gradient(135deg, #ff66b2, #cc0066);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(255, 102, 178, 0.3);
    outline: none;
}

.btn-start-merge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(255, 102, 178, 0.5);
}

.empty-merge-state {
    font-size: 12px;
    color: #6c758f;
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

/* Beautiful custom glow text gradients for Gold, Diamond, Emerald */
.text-gold-glow {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    font-weight: 800;
}

.text-diamond-glow {
    color: #70e1f5;
    text-shadow: 0 0 8px rgba(112, 225, 245, 0.6);
    font-weight: 800;
}

.text-emerald-glow {
    color: #2ecc71;
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
    font-weight: 800;
}

/* Günlük Ödül Çarkı Styling */
.daily-wheel-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 16px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.daily-wheel-card h3 {
    font-size: 13px;
    font-weight: 800;
    color: #ffb3d9;
    letter-spacing: 0.5px;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 179, 217, 0.3);
}

.wheel-flex-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wheel-canvas-container {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.wheel-spinner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1), inset 0 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 4s cubic-bezier(0.1, 0.8, 0.3, 1);
    transform-origin: center center;
}

.wheel-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #ffffff;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    animation: pointer-wiggle 0.5s ease infinite alternate;
    pointer-events: none;
}

@keyframes pointer-wiggle {
    0% { transform: translateX(-50%) rotate(-3deg); }
    100% { transform: translateX(-50%) rotate(3deg); }
}

.wheel-info-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.wheel-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #cbd5e0;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.15);
}

.btn-spin {
    background: linear-gradient(135deg, #00d2d3, #00a8ff);
    border: none;
    color: #ffffff;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 210, 211, 0.3);
    outline: none;
    text-align: center;
}

.btn-spin:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 210, 211, 0.5);
}

.btn-spin:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: #6c758f;
    box-shadow: none;
    cursor: not-allowed;
}

.wheel-timer {
    font-size: 10px;
    color: #a0a8c0;
    font-weight: 700;
    text-align: center;
}

/* Quests & Achievements Styling */
.quests-lab-container {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quests-section h3 {
    font-size: 13px;
    font-weight: 800;
    color: #ff9f43;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(255, 159, 67, 0.3);
}

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

.quest-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quest-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 3px;
}

.quest-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.quest-desc {
    font-size: 10px;
    color: #a0a8c0;
}

.quest-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 2px;
}

.quest-progress-bar-bg {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.quest-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9f43, #ff5252);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.quest-progress-text {
    font-size: 9px;
    font-weight: 700;
    color: #ff9f43;
    min-width: 35px;
    text-align: right;
}

.btn-quest-claim {
    background: linear-gradient(135deg, #ff9f43, #ff5252);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(255, 159, 67, 0.3);
    outline: none;
    white-space: nowrap;
}

.btn-quest-claim:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(255, 159, 67, 0.5);
}

.btn-quest-claim:disabled {
    background: rgba(255, 255, 255, 0.03);
    color: #51586d;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-quest-claim.claimed {
    background: rgba(46, 204, 113, 0.08) !important;
    color: #2ecc71 !important;
    border: 1px solid rgba(46, 204, 113, 0.15) !important;
    box-shadow: none !important;
    cursor: default !important;
    transform: none !important;
}

/* ==========================================================================
   Battle Arena & P2P WebRTC Styles
   ========================================================================== */

.battle-arena-container {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.battle-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.battle-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: #ff9f43;
    display: flex;
    align-items: center;
    gap: 6px;
}

.battle-desc {
    font-size: 11px;
    color: #a0a8c0;
    line-height: 1.5;
}

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

.connection-sub-area {
    margin-top: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.connection-sub-area h4 {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.help-text {
    font-size: 10px;
    color: #6c758f;
}

.sdp-textarea {
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
    font-family: monospace;
    font-size: 9px;
    padding: 6px;
    resize: none;
    outline: none;
}

.sdp-textarea:focus {
    border-color: #ff9f43;
}

.margin-top-15 {
    margin-top: 15px;
}

/* Team Selection */
.team-selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 10px 0;
}

.team-slot {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-slot:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: #ff9f43;
}

.slot-avatar {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-avatar svg {
    width: 40px !important;
    height: 40px !important;
}

.slot-name {
    font-size: 10px;
    font-weight: 600;
    color: #a0a8c0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.lobby-status-container {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 8px;
    border-radius: 8px;
    margin-top: 8px;
}

.lobby-status-item {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.ready-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 800;
}

.ready-badge.not {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.ready-badge.ok {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

/* Arena Layout */
.arena-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    margin: 10px 0;
}

.arena-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.player-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #6c758f;
}

.active-battle-cat {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.battle-cat-avatar {
    width: 64px;
    height: 64px;
}

.battle-cat-avatar svg {
    width: 60px !important;
    height: 60px !important;
}

.battle-cat-name {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.hp-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.hp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.hp-text {
    font-size: 8px;
    font-weight: 700;
    color: #a0a8c0;
}

.battle-vs-badge {
    background: linear-gradient(135deg, #ff5252, #ff793f);
    color: #fff;
    font-weight: 900;
    font-size: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(255, 82, 82, 0.3);
}

.bench-cats-container {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.bench-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    border: 1px solid rgba(255,255,255,0.1);
}

.bench-dot.dead {
    background: #e74c3c;
}

/* Action Log */
.battle-action-log {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 10px;
    height: 110px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 9px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-entry {
    line-height: 1.4;
}

.log-entry.system {
    color: #ff9f43;
}

.log-entry.player1 {
    color: #3498db;
}

.log-entry.player2 {
    color: #e74c3c;
}

.log-entry.damage {
    color: #e74c3c;
    font-weight: bold;
}

.log-entry.special {
    color: #f1c40f;
    font-weight: bold;
}

.log-entry.victory {
    color: #2ecc71;
    font-weight: bold;
    font-size: 11px;
    border-top: 1px dashed rgba(46, 204, 113, 0.3);
    padding-top: 4px;
    margin-top: 4px;
}

/* Team Select Modal List Item */
.team-select-pet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}

.team-select-pet-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: #ff9f43;
}

.team-select-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-select-avatar-mini {
    width: 24px;
    height: 24px;
}

.team-select-avatar-mini svg {
    width: 24px !important;
    height: 24px !important;
}

.team-select-info {
    display: flex;
    flex-direction: column;
}

.team-select-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.team-select-rarity {
    font-size: 9px;
    font-weight: 700;
}

/* Custom CSS micro-animations for battle activity */
.battle-active-turn {
    animation: battle-glow 1.5s infinite alternate;
}

@keyframes battle-glow {
    0% { box-shadow: 0 0 5px rgba(255, 159, 67, 0.1); border-color: rgba(255, 159, 67, 0.1); }
    100% { box-shadow: 0 0 15px rgba(255, 159, 67, 0.4); border-color: rgba(255, 159, 67, 0.5); }
}

.battle-hurt {
    animation: shake-hurt 0.3s;
}

@keyframes shake-hurt {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

.battle-attack-left {
    animation: attack-left-anim 0.4s ease;
}

@keyframes attack-left-anim {
    0% { transform: translateX(0); }
    50% { transform: translateX(20px) scale(1.1); }
    100% { transform: translateX(0); }
}

.battle-attack-right {
    animation: attack-right-anim 0.4s ease;
}

@keyframes attack-right-anim {
    0% { transform: translateX(0); }
    50% { transform: translateX(-20px) scale(1.1); }
    100% { transform: translateX(0); }
}


