/* ═══════════════════════════════════════════════════════════════════════════
   VIRTUAL PET WORLD - Immersive Dashboard Styles
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* Colors */
    --bg-dark: #0a0e1a;
    --bg-gradient: linear-gradient(135deg, #0a0e1a 0%, #1a1f35 50%, #0d1225 100%);
    --panel-bg: rgba(255, 255, 255, 0.05);
    --panel-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.08);

    /* Primary Colors */
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5541d7;

    /* Accent Colors */
    --accent-cyan: #00d4ff;
    --accent-pink: #ff6b9d;
    --accent-gold: #ffd93d;
    --accent-green: #6bcb77;
    --accent-orange: #ff9f43;

    /* Status Colors */
    --health: #ff6b6b;
    --hunger: #feca57;
    --happiness: #ff9ff3;
    --energy: #48dbfb;

    /* Rarity Colors */
    --common: #9e9e9e;
    --uncommon: #4caf50;
    --rare: #2196f3;
    --epic: #9c27b0;
    --legendary: #ff9800;
    --mythic: #e91e63;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Typography */
    --font-main: 'Fredoka', sans-serif;
    --font-pixel: 'Press Start 2P', cursive;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(108, 92, 231, 0.4);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Spacing */
    --nav-width: 80px;
    --nav-width-expanded: 200px;
    --top-nav-height: 70px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATED BACKGROUND
   ═══════════════════════════════════════════════════════════════════════════ */

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
}

.stars {
    background: radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.8), transparent),
                radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.6), transparent),
                radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.9), transparent),
                radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.5), transparent);
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite;
}

.stars2 {
    background: radial-gradient(1px 1px at 50px 80px, rgba(108,92,231,0.8), transparent),
                radial-gradient(2px 2px at 100px 150px, rgba(0,212,255,0.6), transparent),
                radial-gradient(1px 1px at 180px 60px, rgba(255,107,157,0.7), transparent);
    background-size: 250px 250px;
    animation: twinkle 6s ease-in-out infinite reverse;
}

.stars3 {
    background: radial-gradient(1px 1px at 30px 100px, rgba(255,217,61,0.6), transparent),
                radial-gradient(2px 2px at 120px 40px, rgba(107,203,119,0.5), transparent);
    background-size: 300px 300px;
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-shapes::before,
.floating-shapes::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
}

.floating-shapes::before {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 15s ease-in-out infinite;
}

.floating-shapes::after {
    width: 300px;
    height: 300px;
    background: var(--accent-pink);
    bottom: -50px;
    left: -50px;
    animation: float 20s ease-in-out infinite reverse;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   GLASS PANEL EFFECT
   ═══════════════════════════════════════════════════════════════════════════ */

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCREENS
   ═══════════════════════════════════════════════════════════════════════════ */

.screen {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: flex;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */

#login-screen {
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 480px;
    padding: 40px;
    text-align: center;
}

.logo-container {
    margin-bottom: 30px;
}

.logo-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent-pink));
    border-radius: 30px;
    box-shadow: var(--shadow-glow);
}

.logo-icon .pet-emoji {
    font-size: 50px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.game-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-text {
    text-shadow: 0 0 40px rgba(108, 92, 231, 0.5);
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.login-form {
    margin: 30px 0;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.game-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--panel-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: var(--transition-normal);
}

.game-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
}

.game-input::placeholder {
    color: var(--text-muted);
}

.input-group small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.login-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 30px;
}

.feature {
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.feature span {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.5);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--panel-border);
}

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

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    width: 100%;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--glass-bg);
    border: 1px solid var(--panel-border);
    font-size: 1.2rem;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.btn-reward {
    position: relative;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    color: #1a1a1a;
}

.streak-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--accent-pink);
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.pulse-hover:hover {
    animation: pulse 1s ease-in-out infinite;
}

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

.glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 217, 61, 0.5); }
    50% { box-shadow: 0 0 25px rgba(255, 217, 61, 0.8); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOP NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 15px;
    background: var(--glass-bg);
    border-radius: 12px;
    transition: var(--transition-normal);
}

.logo-small:hover {
    background: rgba(255, 255, 255, 0.1);
}

.logo-small span:first-child {
    font-size: 1.5rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.currency-display {
    display: flex;
    gap: 20px;
}

.currency {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid var(--panel-border);
}

.currency-icon {
    font-size: 1.2rem;
}

.currency-value {
    font-weight: 600;
    font-size: 1rem;
}

.currency.coins .currency-value { color: var(--accent-gold); }
.currency.gems .currency-value { color: var(--accent-cyan); }
.currency.xp .currency-value { color: var(--accent-pink); }

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

#dashboard {
    flex-direction: column;
}

.main-content {
    display: flex;
    margin-top: var(--top-nav-height);
    min-height: calc(100vh - var(--top-nav-height));
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDE NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.side-nav {
    position: fixed;
    left: 0;
    top: var(--top-nav-height);
    width: var(--nav-width);
    height: calc(100vh - var(--top-nav-height));
    display: flex;
    flex-direction: column;
    padding: 20px 10px;
    gap: 8px;
    border-radius: 0;
    border-left: none;
    border-bottom: none;
    transition: var(--transition-normal);
    z-index: 50;
    overflow: hidden;
}

.side-nav:hover {
    width: var(--nav-width-expanded);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: transparent;
    border: none;
    border-radius: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
    overflow: hidden;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.nav-icon {
    font-size: 1.5rem;
    min-width: 30px;
    text-align: center;
}

.nav-label {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transition: var(--transition-normal);
}

.side-nav:hover .nav-label {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════════════════════════════════════════ */

.content-area {
    flex: 1;
    margin-left: var(--nav-width);
    padding: 20px;
    transition: var(--transition-normal);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.tab-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-header h2 span {
    font-size: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PETS TAB
   ═══════════════════════════════════════════════════════════════════════════ */

.active-pet-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
    margin-bottom: 20px;
}

.pet-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

.pet-sprite {
    font-size: 80px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    z-index: 2;
}

.pet-sprite.large .pet-emoji {
    font-size: 100px;
}

.pet-shadow {
    position: absolute;
    bottom: 10px;
    width: 100px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.4), transparent);
    border-radius: 50%;
}

.pet-mood-bubble {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
    animation: bob 2s ease-in-out infinite;
}

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

.pet-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.pet-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge.species {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.badge.level {
    background: linear-gradient(135deg, var(--accent-cyan), var(--primary));
    color: white;
}

.badge.rarity {
    text-transform: capitalize;
}

.badge.rarity.common { background: var(--common); color: white; }
.badge.rarity.uncommon { background: var(--uncommon); color: white; }
.badge.rarity.rare { background: var(--rare); color: white; }
.badge.rarity.epic { background: var(--epic); color: white; }
.badge.rarity.legendary { background: var(--legendary); color: white; }
.badge.rarity.mythic { background: var(--mythic); color: white; }

.xp-bar-container {
    width: 100%;
    max-width: 250px;
}

.xp-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.xp-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Pet Stats Panel */
.pet-stats-panel {
    padding: 20px;
}

.pet-stats-panel h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-row {
    display: grid;
    grid-template-columns: 30px 80px 1fr 50px;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

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

.stat-fill.health { background: linear-gradient(90deg, #ff6b6b, #ee5a5a); }
.stat-fill.hunger { background: linear-gradient(90deg, #feca57, #f9ca24); }
.stat-fill.happiness { background: linear-gradient(90deg, #ff9ff3, #f368e0); }
.stat-fill.energy { background: linear-gradient(90deg, #48dbfb, #0abde3); }

.stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
}

/* Pet Actions */
.pet-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--panel-border);
    border-radius: 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: var(--font-main);
}

.action-btn:hover {
    background: rgba(108, 92, 231, 0.2);
    border-color: var(--primary);
    transform: translateY(-3px);
}

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

.action-icon {
    font-size: 1.8rem;
}

.action-btn span:last-child {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Pet Collection */
.pet-collection {
    padding: 25px;
}

.pet-collection h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.pet-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--panel-border);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.pet-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.pet-card.active {
    border-color: var(--accent-green);
    box-shadow: 0 0 20px rgba(107, 203, 119, 0.3);
}

.pet-card .pet-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.pet-card .pet-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.pet-card .pet-level {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-state.small {
    padding: 20px;
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOME TAB
   ═══════════════════════════════════════════════════════════════════════════ */

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

.home-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.home-stat strong {
    color: var(--accent-gold);
}

.room-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.room-tab {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--panel-border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: var(--font-main);
    font-size: 0.95rem;
}

.room-tab:hover:not(.locked) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

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

.room-tab.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.home-builder {
    padding: 20px;
    margin-bottom: 20px;
}

.room-canvas {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(180deg, #2d1b4e 0%, #1a1a2e 50%, #16213e 100%);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.room-background {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 60%, rgba(255, 255, 255, 0.05) 100%),
        repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255,255,255,0.02) 50px, rgba(255,255,255,0.02) 100px);
}

.furniture-container {
    position: absolute;
    inset: 0;
}

.furniture-item {
    position: absolute;
    font-size: 2.5rem;
    cursor: move;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
}

.furniture-item:hover {
    transform: scale(1.1);
}

.room-pet {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.room-info {
    text-align: center;
}

.room-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.room-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.furniture-panel {
    padding: 20px;
}

.furniture-panel h4 {
    margin-bottom: 15px;
}

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

.furniture-slot {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed var(--panel-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.furniture-slot:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHOP TAB
   ═══════════════════════════════════════════════════════════════════════════ */

.shop-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.shop-cat {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--panel-border);
    border-radius: 25px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: var(--font-main);
}

.shop-cat:hover {
    background: rgba(255, 255, 255, 0.1);
}

.shop-cat.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.shop-item {
    background: var(--glass-bg);
    border: 2px solid var(--panel-border);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.shop-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.shop-item .item-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.shop-item .item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.shop-item .item-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.shop-item .item-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 700;
    color: var(--accent-gold);
}

.shop-item .item-rarity {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-top: 8px;
    text-transform: capitalize;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BATTLE TAB
   ═══════════════════════════════════════════════════════════════════════════ */

.battle-record .win-loss {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 1rem;
}

.wins { color: var(--accent-green); font-weight: 700; }
.losses { color: var(--health); font-weight: 700; }

.battle-arena {
    position: relative;
    padding: 0;
    overflow: hidden;
    min-height: 500px;
}

.arena-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center bottom, rgba(108, 92, 231, 0.3) 0%, transparent 60%),
        linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
}

.arena-floor {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(180deg, transparent, rgba(108, 92, 231, 0.1));
}

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

.battle-side {
    position: absolute;
    bottom: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-side {
    left: 15%;
}

.enemy-side {
    right: 15%;
}

.battle-pet-container {
    position: relative;
}

.battle-pet {
    font-size: 5rem;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.battle-pet.player {
    transform: scaleX(1);
}

.battle-pet.enemy {
    transform: scaleX(-1);
}

.battle-pet.attacking {
    animation: attack 0.5s ease;
}

.battle-pet.hit {
    animation: hit 0.3s ease;
}

@keyframes attack {
    0% { transform: translateX(0); }
    50% { transform: translateX(50px); }
    100% { transform: translateX(0); }
}

@keyframes hit {
    0%, 100% { filter: brightness(1) drop-shadow(0 10px 20px rgba(0,0,0,0.4)); }
    50% { filter: brightness(2) drop-shadow(0 0 20px rgba(255,100,100,0.8)); }
}

.pet-platform {
    width: 80px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(108, 92, 231, 0.5), transparent);
    border-radius: 50%;
    margin-top: -10px;
}

.pet-platform.enemy {
    background: radial-gradient(ellipse, rgba(255, 107, 107, 0.5), transparent);
}

.battle-info {
    margin-top: 15px;
    text-align: center;
}

.pet-name {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.hp-bar-container {
    width: 150px;
}

.hp-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}

.hp-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.hp-fill.player {
    background: linear-gradient(90deg, var(--accent-green), #27ae60);
}

.hp-fill.enemy {
    background: linear-gradient(90deg, var(--health), #c0392b);
}

.hp-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.vs-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.vs-badge {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-pixel);
    font-size: 1rem;
    color: #1a1a1a;
    box-shadow: 0 0 30px rgba(255, 159, 67, 0.5);
}

.battle-log {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    padding: 15px;
    max-height: 100px;
    overflow-y: auto;
}

.battle-log.hidden {
    display: none;
}

.log-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.log-message:last-child {
    color: var(--text-primary);
    margin-bottom: 0;
}

.battle-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.8));
}

.battle-start {
    text-align: center;
}

.battle-start h3 {
    margin-bottom: 15px;
}

.battle-types {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.battle-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--panel-border);
    border-radius: 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: var(--font-main);
}

.battle-type-btn:hover {
    background: rgba(108, 92, 231, 0.2);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.battle-type-btn.pvp {
    border-color: var(--accent-pink);
}

.battle-type-btn.pvp:hover {
    background: rgba(255, 107, 157, 0.2);
    border-color: var(--accent-pink);
}

.type-icon {
    font-size: 2rem;
}

.type-name {
    font-weight: 600;
}

.type-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.battle-moves {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.battle-moves.hidden {
    display: none;
}

.move-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--panel-border);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: var(--font-main);
}

.move-btn:hover {
    transform: translateY(-3px);
}

.move-btn.attack { border-color: var(--health); }
.move-btn.attack:hover { background: rgba(255, 107, 107, 0.2); }

.move-btn.special { border-color: var(--accent-cyan); }
.move-btn.special:hover { background: rgba(0, 212, 255, 0.2); }

.move-btn.defend { border-color: var(--accent-gold); }
.move-btn.defend:hover { background: rgba(255, 217, 61, 0.2); }

.move-btn.heal { border-color: var(--accent-green); }
.move-btn.heal:hover { background: rgba(107, 203, 119, 0.2); }

.move-icon {
    font-size: 1.5rem;
}

.move-name {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Battle Effects */
.damage-number {
    position: absolute;
    font-family: var(--font-pixel);
    font-size: 1.5rem;
    color: var(--health);
    animation: damageFloat 1s ease-out forwards;
    pointer-events: none;
}

.damage-number.heal {
    color: var(--accent-green);
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   DAYCARE TAB
   ═══════════════════════════════════════════════════════════════════════════ */

.daycare-counter {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.daycare-view {
    padding: 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.daycare-yard {
    position: relative;
    height: 300px;
    background: linear-gradient(180deg, #87ceeb 0%, #98d8aa 50%, #73c088 100%);
    overflow: hidden;
}

.yard-grass {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: repeating-linear-gradient(
        90deg,
        #73c088,
        #73c088 20px,
        #65b57a 20px,
        #65b57a 40px
    );
}

.daycare-pets {
    position: absolute;
    inset: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    padding: 20px;
    padding-bottom: 50px;
    gap: 20px;
}

.daycare-pet {
    font-size: 3rem;
    animation: petWander 3s ease-in-out infinite;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

.daycare-pet:nth-child(odd) {
    animation-delay: -1.5s;
}

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

.daycare-info {
    padding: 20px;
}

.daycare-info h4 {
    margin-bottom: 15px;
}

.daycare-info ul {
    list-style: none;
}

.daycare-info li {
    padding: 8px 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.daycare-info li::before {
    content: '✓';
    color: var(--accent-green);
    font-weight: bold;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVENTS TAB
   ═══════════════════════════════════════════════════════════════════════════ */

.events-container {
    display: grid;
    gap: 20px;
}

.event-card {
    background: var(--glass-bg);
    border: 2px solid var(--panel-border);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.event-card.active {
    border-color: var(--accent-gold);
    box-shadow: 0 0 30px rgba(255, 217, 61, 0.2);
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
}

.event-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.event-icon {
    font-size: 3rem;
}

.event-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.event-badge {
    padding: 5px 12px;
    background: var(--accent-green);
    color: #1a1a1a;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.event-desc {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.event-rewards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.reward-item {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INVENTORY TAB
   ═══════════════════════════════════════════════════════════════════════════ */

.inventory-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.inv-cat {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--panel-border);
    border-radius: 25px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: var(--font-main);
}

.inv-cat:hover {
    background: rgba(255, 255, 255, 0.1);
}

.inv-cat.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.inventory-item {
    background: var(--glass-bg);
    border: 2px solid var(--panel-border);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
}

.inventory-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.inventory-item .item-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
}

.inventory-item .item-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.inventory-item .item-qty {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

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

.modal-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    animation: modalIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    max-width: 350px;
}

.toast.success { border-color: var(--accent-green); }
.toast.error { border-color: var(--health); }
.toast.warning { border-color: var(--accent-gold); }
.toast.info { border-color: var(--accent-cyan); }

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    font-size: 0.95rem;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

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

.loader {
    text-align: center;
}

.loader-pet {
    font-size: 4rem;
    margin-bottom: 20px;
}

.loader p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.bounce {
    animation: bounce 1s ease infinite;
}

.bounce-slow {
    animation: bounce 2s ease infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .active-pet-section {
        grid-template-columns: 1fr;
    }

    .pet-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .battle-side {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
    }

    .player-side, .enemy-side {
        left: auto;
        right: auto;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-width: 60px;
        --top-nav-height: 60px;
    }

    .side-nav {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        flex-direction: row;
        justify-content: space-around;
        padding: 10px;
        border-radius: 20px 20px 0 0;
    }

    .side-nav:hover {
        width: 100%;
    }

    .nav-btn {
        padding: 10px;
        flex-direction: column;
        gap: 5px;
    }

    .nav-icon {
        font-size: 1.2rem;
    }

    .nav-label {
        font-size: 0.7rem;
        opacity: 1;
    }

    .content-area {
        margin-left: 0;
        margin-bottom: 80px;
    }

    .currency-display {
        gap: 10px;
    }

    .currency {
        padding: 6px 10px;
    }

    .login-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .battle-types {
        flex-direction: column;
    }

    .battle-moves {
        gap: 10px;
    }

    .move-btn {
        padding: 10px 15px;
    }

    .battle-log {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 25px;
    }

    .game-title {
        font-size: 1.8rem;
    }

    .tab-header h2 {
        font-size: 1.4rem;
    }

    .pet-sprite.large .pet-emoji {
        font-size: 70px;
    }

    .stat-row {
        grid-template-columns: 25px 60px 1fr 40px;
        gap: 8px;
    }

    .pet-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
