@font-face {
    font-family: 'Shadman';
    src: url('../assets/fonts/font.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Shadman', sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    direction: rtl;
    background-color: #f0f0f0;
    touch-action: manipulation;
}

.hidden {
    display: none !important;
}

/* صفحه لودینگ */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #ffb6b9, #fae3d9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 400px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.loading-container:before {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 40%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.3) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
    z-index: -1;
}

@keyframes shimmer {
    0% { transform: translateX(-200%) rotate(45deg); }
    100% { transform: translateX(200%) rotate(45deg); }
}

.logo {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

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

.loading-character {
    width: 120px;
    height: 120px;
    margin: 10px 0 20px;
    position: relative;
    animation: bounce 2s infinite;
}

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

.loading-shadman {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.loading-text {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.loading-bar-container {
    width: 90%;
    height: 25px;
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #ccc;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #ffb6b9, #ff8ba7);
    border-radius: 15px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.loading-bar:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
    animation: moveStripes 2s linear infinite;
    border-radius: 15px;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.loading-tips {
    margin-top: 15px;
    text-align: center;
    font-size: 16px;
    color: #333;
    max-width: 90%;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInOut 4s infinite;
}

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

/* صفحه اصلی بازی */
#game-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: transparent;
}

/* نوار وضعیت بالا */
.status-bar {
    height: 60px;
    background-color: #ffb6b9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 5;
    flex-direction: row-reverse;
    border-bottom: 3px solid #000;
}

.coins, .age {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
}

.coins {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    background-color: #ffe45c;
    padding: 6px 10px;
    border-radius: 15px;
    border: 2px solid #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.coins::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url('../assets/images/coin-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    margin-left: 5px;
}

.age {
    margin-right: auto;
    background-color: #ffe45c;
    padding: 6px 10px;
    border-radius: 15px;
    border: 2px solid #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stats {
    display: flex;
    gap: 15px;
    margin: 0 auto;
}

.stat-box {
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 8px;
    position: relative;
    border: 2px solid #000;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-box:hover {
    transform: scale(1.05);
}

.stat-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: bold;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    text-shadow: 0px 0px 2px white;
}

.stat-box:hover .stat-percentage {
    opacity: 1;
}

.meter {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 7px;
    opacity: 0.4;
    transition: height 0.3s ease, background-color 0.3s ease;
}

.green {
    background-color: #4caf50;
}

.orange {
    background-color: #ff9800;
}

.red {
    background-color: #f44336;
}

.icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.hunger-icon {
    background-image: url('../assets/images/hunger-icon.svg');
}

.health-icon {
    background-image: url('../assets/images/health-icon.svg');
}

.energy-icon {
    background-image: url('../assets/images/energy-icon.svg');
}

/* محیط اصلی بازی */
.game-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: pan-x pan-y;
    -webkit-tap-highlight-color: transparent;
    background-color: transparent;
}

#background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    background-image: url('../assets/images/bg1.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    touch-action: pan-x pan-y;
    -webkit-tap-highlight-color: transparent;
}

#shadman-container {
    position: relative;
    z-index: 2;
    touch-action: pan-x pan-y;
    -webkit-tap-highlight-color: transparent;
}

#shadman {
    width: 300px;
    height: 300px;
    object-fit: contain;
}

#pet-container {
    position: absolute;
    right: -100px;
    bottom: 30px;
    z-index: 3;
}

#pet {
    width: 180px;
    height: 180px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

/* هشدارها */
#alert-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 25px;
    border-radius: 20px;
    z-index: 10;
    font-size: 18px;
    max-width: 80%;
    text-align: center;
}

/* نوار پایین */
.bottom-bar {
    height: 100px;
    background-color: #a06e70;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    z-index: 5;
    border-top: 3px solid #000;
}

.menu-button {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid #000;
}

.menu-button:active {
    transform: scale(0.95);
}

.menu-button img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    border-radius: 8px;
}

.selected-food-container {
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#selected-food {
    position: relative;
    width: 60px;
    height: 60px;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 2px solid #000;
}

#selected-food-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

#selected-food-count {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background-color: #ff5722;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
}

/* مدال ها */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-height: 90%;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #ddd;
}

.modal-header h2 {
    font-size: 20px;
    color: #333;
    text-align: center;
    width: 100%;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

/* دسته بندی ها */
.food-categories, .store-categories {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.category-tab {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    width: 100%;
    text-align: right;
}

.category-tab.active {
    background-color: #4caf50;
    color: white;
    font-weight: bold;
}

.food-categories {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* آیتم های غذا */
.food-items-container, .food-store-items {
    min-height: 200px;
}

.food-items, .food-category-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
}

.food-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    width: 100%;
}

.food-img-container {
    width: 60px;
    height: 60px;
    margin-right: 10px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.food-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.food-name {
    font-size: 14px;
    text-align: right;
    font-weight: bold;
    margin-bottom: 5px;
}

.food-price {
    font-size: 14px;
    color: #ff9800;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* بخش حیوانات خانگی */
.pets-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
}

.pet-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    width: 100%;
}

.pet-img-container {
    width: 60px;
    height: 60px;
    background-color: #f8f8f8;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.pet-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pet-name {
    font-size: 14px;
    text-align: right;
    font-weight: bold;
    margin-bottom: 5px;
}

.pet-price {
    font-size: 14px;
    color: #ff9800;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.pet-button {
    align-self: flex-end;
    padding: 5px 15px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
}

.pet-button.active {
    background-color: #f44336;
}

/* بخش استور */
.store-section {
    min-height: 200px;
}

/* انیمیشن ها */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* پاسخگویی */
@media (max-width: 480px) {
    #shadman {
        width: 250px;
        height: 250px;
    }
    
    .menu-button {
        width: 70px;
        height: 70px;
    }
    
    .bottom-bar {
        height: 90px;
    }
    
    .status-bar {
        height: 50px;
    }
    
    .stat-box {
        width: 35px;
        height: 35px;
    }
    
    #pet {
        width: 130px;
        height: 130px;
    }

    #pet-container {
        bottom: 20px;
    }
}

@media (max-width: 360px) {
    #shadman {
        width: 200px;
        height: 200px;
    }
    
    .menu-button {
        width: 60px;
        height: 60px;
    }
    
    .bottom-bar {
        height: 80px;
    }
    
    #pet {
        width: 120px;
        height: 120px;
    }
}

/* درگ و دراپ غذا - Fixed mobile drag issues */
.dragging {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    transform: translate(-50%, -50%);
    touch-action: none;
    will-change: transform;
    -webkit-transform: translate(-50%, -50%);
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    backface-visibility: hidden;
    perspective: 1000;
}

/* New appealing animations */
/* Button hover effects */
.menu-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Food item hover effect */
.food-img-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Modal animations */
.modal {
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: slideUp 0.4s ease;
}

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

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

/* Category tab hover effect */
.category-tab {
    transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
}

.category-tab:hover {
    transform: scale(1.05);
}

/* Pet animation */
@keyframes petBounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

#pet-container:hover #pet {
    animation: petBounce 1s infinite ease-in-out;
}

/* Stat box animation */
.stat-box {
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Food selection animation */
#selected-food {
    transition: transform 0.3s ease;
}

#selected-food:not(:empty) {
    animation: pulse 2s infinite;
}

/* Optimize animations for better performance */
.menu-button, .food-img-container, .stat-box, .category-tab, #pet, #selected-food {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Reduce animations during drag operations to improve performance */
body.is-dragging * {
    transition: none !important;
    animation: none !important;
}

@media (max-width: 480px) {
    /* Further optimize animations for mobile */
    .food-img-container:hover {
        transform: none;
        box-shadow: none;
    }
    
    .menu-button:hover {
        transform: none;
        box-shadow: none;
    }
    
    .stat-box:hover {
        transform: none;
        box-shadow: none;
    }
}

/* CSS only animation at the bottom of the file */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Extra optimization for mobile browsers */
@supports (-webkit-touch-callout: none) {
    .dragging {
        position: fixed !important; 
        z-index: 1000 !important;
        transition: none !important;
        animation: none !important;
        transform: translate3d(-50%, -50%, 0) !important;
        -webkit-transform: translate3d(-50%, -50%, 0) !important;
    }
    
    .game-area {
        -webkit-overflow-scrolling: auto;
    }
}

/* Remove hover effects on touch devices to improve performance */
@media (hover: none) {
    .menu-button:hover,
    .food-img-container:hover,
    .category-tab:hover,
    .stat-box:hover,
    #pet:hover,
    #pet-container:hover #pet {
        transform: none;
        box-shadow: none;
        animation: none;
    }
}

/* نوار ناوبری بالایی */
.nav-tabs {
    display: flex;
    justify-content: space-between;
    background-color: #ffb6b9;
    padding: 10px;
    border-bottom: 3px solid #000;
}

.nav-tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    background-color: #fff;
    border: 2px solid #000;
    border-radius: 10px;
    margin: 0 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-tab.active {
    background-color: #ffe45c;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* محیط اتاق بازی */
#games-section {
    background-color: #e9ecef;
}

.games-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.game-item {
    width: 150px;
    height: 180px;
    background-color: #fff;
    border: 3px solid #000;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.game-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.game-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.game-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* استایل‌های بازی Sky Jump */
.game-modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    background-color: #e0a878;
}

.game-modal-body {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#sky-jump-game-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #e0a878;
    display: flex;
    flex-direction: column;
}

#sky-jump-game-area {
    position: relative;
    flex: 1;
    overflow: hidden;
}

#sky-jump-score, #sky-jump-coins {
    position: absolute;
    top: 10px;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    z-index: 10;
    border: 2px solid #000;
}

#sky-jump-score {
    left: 10px;
}

#sky-jump-coins {
    right: 10px;
}

#sky-jump-character {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('../assets/images/sh.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 5;
}

.platform {
    position: absolute;
    width: 80px;
    height: 15px;
    background-color: #5a5a5a;
    border: 2px solid #333;
    border-radius: 5px;
    z-index: 2;
    background-image: url('../assets/images/platform_normal.png');
    background-size: cover;
}

.platform.normal {
    background-image: url('../assets/images/platform_normal.png');
}

.platform.moving {
    background-image: url('../assets/images/platform_moving.png');
}

.platform.breakable {
    background-image: url('../assets/images/platform_breakable.png');
}

.platform.spring {
    background-image: url('../assets/images/platform_spring.png');
}

.coin {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #ffd700;
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 0 5px gold;
    animation: coin-spin 2s infinite linear;
}

@keyframes coin-spin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

#sky-jump-controls {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
}

#sky-jump-left, #sky-jump-right, #sky-jump-pause {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #000;
}

#sky-jump-pause {
    width: 50px;
    height: 50px;
    font-size: 18px;
    margin-top: 5px;
}

#sky-jump-left:active, #sky-jump-right:active, #sky-jump-pause:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#sky-jump-game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    color: white;
}

#sky-jump-game-over h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

#sky-jump-final-score, #sky-jump-final-coins {
    font-size: 18px;
    margin-bottom: 10px;
}

#sky-jump-restart {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#sky-jump-restart:hover {
    background-color: #388e3c;
}

/* محیط آشپزخانه */
#kitchen-section {
    background-color: #f8f9fa;
}

.kitchen-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.kitchen-content h2 {
    font-size: 24px;
    color: #333;
}

/* محیط اتاق خواب */
#bedroom-section {
    position: relative;
    background-color: transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#main-section, #bedroom-section, #games-section {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    touch-action: pan-x pan-y;
    -webkit-tap-highlight-color: transparent;
    background-color: transparent;
}

#bedroom-content {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.bedroom-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/bg1.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

#bedroom-shadman-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
}

#bedroom-shadman {
    width: 300px;
    height: 300px;
    object-fit: contain;
}

.bedroom-bottom-bar {
    height: 100px;
    width: 100%;
    background-color: #a06e70;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
    border-top: 3px solid #000;
    position: relative;
    background-image: linear-gradient(to bottom, #b87a7c, #a06e70);
}

.lamp-container {
    width: 200px;
    height: 80px;
    border-radius: 15px;
    background-color: #ffe4e1;
    border: 3px solid #5d4037;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: visible;
    cursor: pointer;
}

.lamp-container:after {
    content: "";
}

.lamp-option {
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.lamp-option:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.3);
}

.lamp-option:active {
    transform: scale(0.95);
}

#lamp-switch {
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-image: url('../assets/images/lamp.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.lamp-on {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
}

.lamp-off {
    filter: brightness(0.5);
}

#darkness-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#sleep-timer-container {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px 25px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

#sleep-timer-container.active {
    opacity: 1;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.5); }
    50% { box-shadow: 0 0 30px rgba(76, 175, 80, 0.8); }
    100% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.5); }
}

#sleep-timer-text {
    color: #fff;
    font-size: 20px;
    margin-bottom: 12px;
    text-shadow: 0 0 4px #000;
    font-weight: bold;
}

#sleep-timer {
    width: 250px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

#sleep-timer-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #4caf50, #8bc34a);
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
}

/* Hide bottom bar when in bedroom or games section */
.nav-tab[data-section="bedroom"].active ~ .bottom-bar,
.nav-tab[data-section="games"].active ~ .bottom-bar {
    display: none;
}

@media (max-width: 480px) {
    #bedroom-shadman {
        width: 250px;
        height: 250px;
    }
    
    .lamp-option {
        top: 30px;
        right: 30px;
    }
    
    #lamp-switch {
        width: 60px;
        height: 90px;
    }
}

@media (max-width: 360px) {
    #bedroom-shadman {
        width: 200px;
        height: 200px;
    }
    
    .lamp-option {
        bottom: 20px;
        right: 20px;
    }
    
    #lamp-switch {
        width: 40px;
        height: 40px;
    }
}

.food-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.food-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff5722;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
}

.pet-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
} 