/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pixel', serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Account Page Container */
.account-container {
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
}

/* Account Header */
h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 255, 189, 0.3);
}

footer {
    margin-top: 20px;
}

/* Account Details */
.account-details {
    background-color: var(--secondary-bg);
    padding: 24px;
    border: 2px solid var(--accent-dark);
    box-shadow: 0 0 0 2px var(--primary-bg) inset;
    color: var(--text-color);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
}

/* Error Box */
.error-box {
    background: var(--secondary-bg);
    border: 4px solid #b30000;
    color: #f0c0c0;
    padding: 24px 32px;
    text-align: center;
    font-family: 'Pixel', serif;
    box-shadow: 0 0 12px #b30000;
    max-width: 500px;
    margin: 0 auto;
    animation: shake 0.4s ease-in-out;
    border-radius: 8px;
}

/* Error Message Styles */
.error-box p {
    font-size: 1.2rem;
    color: #ff4d4d;
}

/* Creature Cards */
.creatures {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    transition: all 0.3s ease-in-out;
    
}

.creature-card {
    display: flex;
    width: 500px;
    background-color: var(--secondary-bg);
    color: var(--text-color);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    align-items: stretch;
    border: 1px solid var(--accent-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.creature-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 189, 0.3);
    border-color: var(--accent-color);
}

.creature-image {
    width: 150px;
    height: 100%;
    object-fit: cover;
    border-right: 3px solid var(--hover-color);
    display: block;
}

.creature-details {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.creature-name {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    color: var(--accent-color);
}

.creature-class {
    font-size: 16px;
    font-style: italic;
    color: var(--solana-purple);
    margin: 5px 0;
}

.creature-description {
    font-size: 14px;
    color: #aaa;
    margin-top: 5px;
}

/* Wallet Address Styles */
#wallet {
    word-break: break-all;
    overflow-wrap: break-word;
    padding: 8px 0;
    line-height: 1.4;
}

.wallet-address {
    background-color: var(--hover-color);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
    font-family: monospace;
    color: var(--solana-green);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .creature-card {
        width: 90%;
    }

    .creature-image {
        width: 130px;
    }
}

@media screen and (max-width: 768px) {
    .account-container {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .account-details {
        width: 90%;
        padding: 15px;
        font-size: 0.95rem;
    }

    .error-box {
        width: 90%;
    }

    .creature-card {
        flex-direction: column;
        width: 95%;
        align-items: center;
        text-align: center;
    }

    .creature-image {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 3px solid var(--hover-color);
    }

    .creature-details {
        padding: 15px;
        align-items: center;
    }

    .creature-name {
        font-size: 18px;
    }

    .creature-class {
        font-size: 14px;
    }

    .creature-description {
        font-size: 13px;
    }

    #wallet {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 500px) {
    h1 {
        font-size: 1.7rem;
    }

    .account-details {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }

    .error-box {
        width: 100%;
    }

    .creature-card {
        width: 100%;
    }

    .creature-name {
        font-size: 16px;
    }

    .creature-class,
    .creature-description {
        font-size: 12px;
    }

    .account-container {
        gap: 20px;
    }

    .creatures {
        gap: 10px;
    }

    #wallet {
        font-size: 0.85rem;
    }

    #wallet strong {
        display: block;
        margin-bottom: 4px;
    }

    .wallet-address {
        display: block;
        margin-top: 6px;
    }
}

@media screen and (max-width: 400px) {
    .wallet-address {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .wallet-address:hover {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

/* Animations */
@keyframes shake {
    0% { transform: translateX(-2px); }
    25% { transform: translateX(2px); }
    50% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}