@import url('listed.css');
/* CSS Variables for Light and Dark Mode */
:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1e1e1e;
    --chat-bg: #181818;
    --input-bg: #252525;
    --border-color: #333333;
    --accent-color: #fbb32c;
    --message-user-bg: #fbb32c;
    --message-user-text: black;
    --message-bot-bg: #2a2a2a;
    --message-bot-text: #e0e0e0;
    --sidebar-bg: #1e1e1e;
    --sidebar-text: #e0e0e0;
    --sidebar-hover-bg: #2a2a2a;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --highlight-color: #ff4444;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f8f9fa;
    --chat-bg: #f1f3f5;
    --input-bg: #ffffff;
    --border-color: #dee2e6;
    --accent-color: #fbb32c;
    --message-user-bg: #fbb32c;
    --message-user-text: black;
    --message-bot-bg: #e9ecef;
    --message-bot-text: #333333;
    --sidebar-bg: #f8f9fa;
    --sidebar-text: #333333;
    --sidebar-hover-bg: #e9ecef;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --highlight-color: #ff4444;
}
.progress-container {
    position: relative;
    width: 200px;
    height: 20px;
    margin: 0 auto;
    overflow: hidden;
}

#clickProgress {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.progress-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--accent-color), transparent);
    animation: blinkLeftToRight 2s infinite;
}

@keyframes blinkLeftToRight {
    0% { left: -100%; }
    100% { left: 100%; }
}
.pet-container {
    position: relative;
    display: inline-block;
}

.secondary-pet-container {
    display: none !important;
}

 #pet-secondary {
    width: 200px;
    height: auto;
    display: block;
}

.food-popup, #pet-food {
    position: fixed;
    width: 50px;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none !important;
    z-index: 1000;
}

.food-popup.active, #pet-food.active {
    display: block !important;
    animation: moveToPet 1s ease-in-out forwards;
}

@keyframes moveToPet {
    0% {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        top: 30%; /* Adjust to align with pet's face */
        left: 50%;
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
}

.pet-option-img {
    width: 100px;
}
/* Game-inspired styles */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    /*background-image: url('https://images.unsplash.com/photo-1588345921523-c2dcdb7f1dcd');*/
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow: auto;
}
.pet-grid {
    display: grid;
    gap: 1rem;
}

.pet-container {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.pet-container:hover {
    transform: translateY(-2px);
    background-color: var(--sidebar-hover-bg);
}

.pet-image {
    /*border: 3px solid var(--accent-color);*/
    /*box-shadow: var(--shadow);*/
    transition: transform 0.3s ease;
}

.pet-image:hover {
    transform: scale(1.1);
}

.feed-status {
    margin-top: 0.5rem;
}
/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--header-bg);
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.connect-wallet, .home-button {
    padding: 8px 16px;
    background-color: var(--accent-color);
    color: var(--message-user-text);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.connect-wallet:hover, .home-button:hover {
    background-color: #fb762c;
    transform: translateY(-1px);
}

.connect-wallet:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.logo {
    height: 40px;
    background: var(--accent-color);
    padding: 2px;
    border-radius: 7px;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Game Content */
.game-content {
    padding-top: 70px; /* Offset for fixed header */
}

.game-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.game-container {
    position: relative;
    z-index: 2;
    background-color: var(--chat-bg);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.game-title-text {
    font-family: 'Press Start 2P', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.pet-area {
    position: relative;
    text-align: center;
}

.pet-image {
    transition: transform 0.3s ease, filter 0.3s ease;
    /*border: 3px solid var(--accent-color);*/
    /*box-shadow: var(--shadow);*/
    border-radius:10px!important ;
}

.pet-image:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.coin-balances {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.coin-badge {
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--message-bot-bg);
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.coin-badge:hover {
    transform: translateY(-2px);
    background-color: var(--sidebar-hover-bg);
}

.cxzi-coin {
    border-left: 4px solid #60a5fa;
}

.ctd-coin {
    border-left: 4px solid #f97316;
}

/* Button Grid */
.button-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.button-row {
    display: flex;
    gap: 0.5rem;
}

.game-button {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.game-button:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.game-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Popup Styles */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    z-index: 10002; /* Higher z-index */
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(0.95);
}

.popup.active {
    display: flex; /* Show when active */
    opacity: 1;
    transform: scale(1);
}

.popup-content {
    background-color: var(--chat-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    border: 1px solid var(--accent-color); /* Debugging border */
}

.popup.active .popup-content {
    transform: scale(1);
}

.pet-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pet-option {
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--message-bot-bg);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.pet-option:hover {
    background-color: var(--sidebar-hover-bg);
    transform: translateY(-2px);
}

.pet-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.pet-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.pet-option-image {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
}

.popup-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin-top: 1rem;
}

.cancel-button {
    background-color: var(--border-color);
    color: var(--text-color);
}

.cancel-button:hover {
    background-color: #555;
    transform: translateY(-1px);
}

.icon-wallet::before {
    content: '💸';
    font-size: 1rem;
}

.icon-feed::before {
    content: '🍖';
    font-size: 1rem;
}

.icon-coin::before {
    content: '🪙';
    font-size: 1rem;
}

.icon-pet::before {
    content: '🐾';
    font-size: 1rem;
}

.font-roboto {
    font-family: 'Roboto', sans-serif;
}

/* Responsive Design */
@media (min-width: 769px) {
    .coin-balances {
        flex-direction: row;
        justify-content: space-between;
    }

    .coin-badge {
        flex: 1;
    }

    .game-container {
        padding: 1.5rem;
    }

    .pet-image {
        width: 8rem;
        height: 8rem;
    }

    .game-title-text {
        font-size: 1.5rem;
    }

    .header {
        padding: 12px 24px;
    }

    .connect-wallet, .home-button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .logo {
        height: 40px;
    }

    .popup-content {
        max-width: 400px;
        padding: 20px;
    }

    .pet-option-image {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .pet-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .game-container {
        max-width: 90%;
        padding: 1rem;
    }

    .pet-image {
        width: 6rem;
        height: 6rem;
    }

    .game-title-text {
        font-size: 1.25rem;
    }

    .game-button {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .coin-badge {
        padding: 0.5rem;
    }

    #status, #walletStatus {
        font-size: 0.875rem;
    }

    .header {
        padding: 10px 15px;
    }

    .connect-wallet, .home-button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .logo {
        height: 32px;
    }

    .popup-content {
        max-width: 80%;
        padding: 15px;
    }

    .pet-option-image {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .game-container {
        max-width: 95%;
        padding: 0.75rem;
        border-radius: 8px;
    }

    .pet-image {
        width: 5rem;
        height: 5rem;
    }

    .game-title-text {
        font-size: 1rem;
    }

    .game-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }

    .coin-badge {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    #status, #walletStatus {
        font-size: 0.75rem;
    }

    .coin-balances {
        gap: 0.25rem;
    }

    .header {
        padding: 8px 10px;
    }

    .nav-buttons {
        gap: 6px;
    }

    .connect-wallet, .home-button {
        padding: 5px 8px;
        font-size: 10px;
    }

    .logo {
        height: 28px;
    }

    .button-row {
        display: flex;
        gap: 0.25rem;
    }

    .game-button {
        flex: 1;
        padding: 0.5rem;
        font-size: 0.7rem;
    }

    .popup-content {
        max-width: 90%;
        padding: 10px;
    }

    .pet-option-image {
        max-width: 100px;
    }

    .pet-name {
        font-size: 1rem;
    }

    .pet-logo {
        width: 24px;
        height: 24px;
    }
}