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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(34, 197, 94, 0.1) 0%, transparent 50%);
    animation: glowShift 20s ease-in-out infinite;
    z-index: -1;
}

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

/* Main game container */
#gameContainer {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    transition: all 0.5s ease;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 60px;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin-bottom: 30px;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: brightness(1); }
    to { filter: brightness(1.2); }
}

#scoreDisplay {
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 60px;
    border-radius: 25px;
    display: inline-block;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#scoreDisplay:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.stats-row {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    font-size: 1rem;
    opacity: 0.7;
    justify-content: center;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Enhanced cat area */
#catArea {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

#catContainer {
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.6; }
}

#catImage {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 
        0 0 80px rgba(102, 126, 234, 0.4),
        0 0 120px rgba(118, 75, 162, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

#catContainer:hover {
    transform: scale(1.05);
}

#catContainer:active {
    transform: scale(0.95);
}

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

.sparkle {
    position: absolute;
    color: #ffd700;
    font-size: 1.5rem;
    animation: sparkleFloat 2s ease-out forwards;
    pointer-events: none;
}

@keyframes sparkleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(0);
    }
    50% {
        transform: translateY(-50px) rotate(180deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) rotate(360deg) scale(0);
    }
}

#clickEffect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
}

.click-particle {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: floatUp 1s ease-out forwards;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(255,107,107,0.5);
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-150px) scale(2) rotate(360deg);
    }
}

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

.floating-cat {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(-10deg);
    }
    25% {
        transform: translateY(-30px) rotate(10deg);
    }
    75% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

/* Remove old shop styles and replace with integrated shop */
#shop {
    display: none;
}

/* New integrated shop styles */
#integratedShop {
    margin-top: 60px;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

#integratedShop h2 {
    color: white;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 35px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    position: relative;
}

#integratedShop h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Fix shop tabs to be modern buttons */
#integratedShop .shop-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 20px;
    max-width: 100%;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.tab-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.tab-btn.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

/* Fix shop sections to show only one at a time */
#shopItems {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

#shopItems > .shop-section {
    display: none !important;
}

#shopItems > .shop-section:not(.hidden) {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

/* Remastered shop items with glassmorphism */
.shop-item {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 25px;
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 20px;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.shop-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shop-item:hover::before {
    opacity: 1;
}

.shop-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.item-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.shop-item:hover .item-glow {
    transform: translateX(100%);
}

.item-icon {
    font-size: 3rem;
    text-align: center;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    animation: iconFloat 4s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg) scale(1); }
    25% { transform: translateY(-5px) rotate(0deg) scale(1.05); }
    50% { transform: translateY(-8px) rotate(5deg) scale(1.08); }
    75% { transform: translateY(-5px) rotate(0deg) scale(1.05); }
}

.item-info {
    position: relative;
    z-index: 2;
}

.item-info h3 {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.item-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.cost, .owned {
    font-size: 1.1rem;
    font-weight: 600;
}

.cost {
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cost::before {
    content: '💰';
    font-size: 0.9rem;
}

.owned {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 5px;
}

.owned::before {
    content: '📦';
    font-size: 0.9rem;
}

.buy-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 18px 28px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 100px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.buy-btn:hover:not(:disabled)::before {
    left: 100%;
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 30px rgba(102, 126, 234, 0.5),
        0 0 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

.buy-btn:disabled {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Add glow effects for premium items */
.shop-item[data-item*="Galaxy"],
.shop-item[data-item*="Singularity"],
.shop-item[data-item*="God"] {
    border-color: rgba(236, 72, 153, 0.3);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(167, 139, 250, 0.05));
}

.shop-item[data-item*="Galaxy"]:hover,
.shop-item[data-item*="Singularity"]:hover,
.shop-item[data-item*="God"]:hover {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(236, 72, 153, 0.4);
}

/* Research Screen */
#researchScreen {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    margin: 0 auto;
}

#researchScreen.hidden {
    display: none !important;
}

#researchScreen h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

#researchScreen > p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 40px;
}

#researchUpgrades {
    margin-top: 40px;
}

#researchInfo {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    margin: 30px 0;
    backdrop-filter: blur(20px);
}

#researchInfo p {
    margin: 15px 0;
    font-size: 1.3rem;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.research-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.research-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.research-item h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.research-item p {
    margin: 5px 0;
    opacity: 0.8;
}

.research-item .buy-btn {
    margin-top: 15px;
}

.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-popup.show {
    transform: translate(-50%, -50%) scale(1);
}

/* Dogs Screen */
#dogsScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

#dogsScreen.hidden {
    display: none !important;
}

#dogsScreen h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

#dogArea {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

#dogContainer {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

#dogImage {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 80px rgba(139, 69, 19, 0.4);
    transition: all 0.3s ease;
}

#dogImage:hover {
    transform: scale(1.05);
}

#dogImage:active {
    transform: scale(0.95);
}

#dogShop {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(20px);
}

#dogShop h3 {
    color: #D2691E;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.dog-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.dog-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}

/* Sidebar navigation */
#sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 20px 20px 0;
    padding: 20px 10px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: width 0.3s ease;
}

#sidebar.hidden {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 5px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-item:hover .nav-label,
.nav-item.active .nav-label {
    max-width: 100px;
    opacity: 1;
}

.nav-item[data-locked="true"] {
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.nav-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.nav-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    max-width: 0;
    transition: max-width 0.3s ease, opacity 0.3s ease;
}

.nav-item:hover .nav-label {
    max-width: 100px;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

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

/* Ensure game container is properly hidden */
#gameContainer.hidden {
    display: none !important;
}

/* Skill Tree Styles */
#skillTreeScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

#skillTreeScreen.hidden {
    display: none !important;
}

#skillTreeScreen h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

#skillTreeMessage {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(20px);
}

#skillTreeMessage p {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
}

#skillTreeContent {
    width: 100%;
    max-width: 800px;
}

/* Enhanced skill tree grid layout */
#skillTreeContainer {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 20px;
    margin: 0 auto;
    padding: 40px;
    min-height: 700px;
    max-width: 800px;
}

.skill-node {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.skill-node.available {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.skill-node.purchased {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

.skill-node:hover.available {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.skill-name {
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.2;
}

.skill-desc {
    font-size: 0.75rem;
    opacity: 0.8;
    text-align: center;
    line-height: 1.3;
    margin: 5px 0;
}

.skill-cost {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 600;
}

.skill-node.purchased .skill-cost {
    color: #ffd700;
}

/* Admin panel styling */
.admin-panel {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Rebirth Screen */
#rebirthScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

#rebirthScreen.hidden {
    display: none !important;
}

#rebirthScreen h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

#rebirthScreen > p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 40px;
}

#rebirthInfo {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    margin: 30px 0;
    backdrop-filter: blur(20px);
}

#rebirthInfo p {
    margin: 15px 0;
    font-size: 1.3rem;
}

#rebirthBtn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

#rebirthBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#rebirthBtn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}

/* Category screen styles */
#categoryScreen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px;
}

#categoryScreen.hidden {
    display: none !important;
}

.category-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.category-container h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.category-container p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 60px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.category-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
}

.category-btn:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.category-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    text-align: center;
}

.category-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
}

.category-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Add achievements styles */
.achievements-section {
    margin: 30px 0;
}

.achievements-section h3 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.achievement-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-item.unlocked {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: rgba(102, 126, 234, 0.3);
}

.achievement-item.unlocked:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.achievement-item.locked {
    opacity: 0.5;
}

.achievement-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 15px;
    text-align: center;
}

.achievement-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
}

.achievement-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.achievement-progress {
    font-size: 1rem;
    color: #667eea;
    font-weight: 600;
}

#achievementsScreen h2 {
    font-size: 3rem;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* Enhanced scrollbar */
#shop::-webkit-scrollbar {
    width: 8px;
}

#shop::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#shop::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

#shop::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    #scoreDisplay {
        font-size: 1.75rem;
        padding: 20px 30px;
    }
    
    #catImage {
        width: 280px;
        height: 280px;
    }
    
    #integratedShop {
        margin: 40px 20px;
    }
    
    #integratedShop .shop-section {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    #integratedShop .shop-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    #integratedShop .shop-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 15px;
    }
    
    .tab-btn {
        font-size: 0.9rem;
        padding: 12px 16px;
        min-width: 80px;
    }
    
    #shopItems > .shop-section:not(.hidden) {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
}

/* Fix tab layout for mobile */
@media (max-width: 768px) {
    #integratedShop .shop-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        font-size: 0.8rem;
        padding: 10px 16px;
    }
}

/* Responsive skill tree */
@media (max-width: 768px) {
    #skillTreeContainer {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(10, 1fr);
        gap: 10px;
        padding: 20px;
    }
    
    .skill-node {
        padding: 10px;
        min-height: 80px;
    }
    
    .skill-name {
        font-size: 0.8rem;
    }
    
    .skill-desc {
        font-size: 0.7rem;
    }
}