* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #6a0dad, #8a2be2, #9370db);
    color: white;
    font-family: 'Comic Neue', cursive;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

header {
    margin: 30px 0;
    text-align: center;
    position: relative;
}

h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 3px 3px 0 #ff00ff, 6px 6px 0 #00ffff;
    letter-spacing: 2px;
    color: #ffcc00;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #ffcc00;
    text-shadow: 1px 1px 0 #ff00ff;
    line-height: 1.6;
}

.input-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0;
    border: 3px solid #ffcc00;
    box-shadow: 0 8px 32px rgba(106, 13, 173, 0.5);
    position: relative;
    overflow: hidden;
}

.input-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 400% 400%;
    z-index: -1;
    animation: gradient 15s ease infinite;
    border-radius: 25px;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.username-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

input {
    padding: 15px 20px;
    border: 2px solid #ffcc00;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1.1rem;
    width: 70%;
    max-width: 400px;
    font-family: 'Comic Neue', cursive;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.4);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.input-prompt {
    color: #330033; /* Black/purple color for the prompt text */
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.2);
}

button {
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

button:active {
    transform: translateY(1px);
}

.card-container {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    min-height: 500px;
}

.card {
    width: 430px;
    height: 630px;
    background: url('https://bafybeihq4zvjynrklyqqm4giawy3wempcuz3ml72v2vpe4clgv7pbbjdxy.ipfs.w3s.link/YahyaOsi%20Monad%20Feet.png');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    border: 5px solid #ffcc00;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    display: none;
    text-align: center; /* Center align the content */
}

.card-header {
    background: linear-gradient(to right, #8a2be2, #6a0dad);
    padding: 15px;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: #ffcc00;
    text-shadow: 2px 2px 0 #ff00ff;
    letter-spacing: 1px;
    border-bottom: 3px solid #ffcc00;
}

.limited-edition-text {
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    background: linear-gradient(to right, #8a2be2, #6a0dad);
    color: #ffcc00;
    text-shadow: 1px 1px 0 #ff00ff;
    padding: 5px 10px;
    border-radius: 8px;
    border: 2px solid #ffcc00;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.pfp-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #ffcc00;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.7);
    background: white;
}

.pfp-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    filter: contrast(120%) saturate(150%);
}

.meme-text {
    background: rgba(138, 43, 226, 0.8);
    margin: 25px;
    padding: 25px;
    border-radius: 15px;
    font-family: 'Comic Neue', cursive;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    text-align: center;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ffcc00;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

/* === UPDATED RULE === */
.username-display {
    margin: 10px auto;
    display: inline-block;
    padding: 8px 15px;
    border-radius: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    background: linear-gradient(to right, #8a2be2, #6a0dad);
    color: #ffcc00;
    text-shadow: 1px 1px 0 #ff00ff;
    border: 2px solid #ffcc00;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.action-buttons button {
    padding: 12px 20px;
    font-size: 0.9rem;
}

.share-btn {
    background: linear-gradient(45deg, #1da1f2, #00acee);
}

.download-btn {
    background: linear-gradient(45deg, #ff00ff, #8a2be2);
}

.share-prompt {
    display: none; /* Initially hidden */
    margin-top: 20px;
    padding: 10px;
    font-size: 1rem;
    color: #ffcc00;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

.placeholder-card {
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 3px dashed #ffcc00;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    text-align: center;
    padding: 20px;
    font-family: 'Comic Neue', cursive;
}

.loading {
    display: none;
    margin: 30px 0;
    font-size: 1.2rem;
    color: #ffcc00;
    font-family: 'Press Start 2P', cursive;
}

.pixel {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff00ff;
    animation: float 8s infinite linear;
    opacity: 0.7;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; }
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.feature {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    width: 220px;
    border: 2px solid #ffcc00;
}

.feature h3 {
    color: #ffcc00;
    margin-bottom: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
}

footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

footer a {
    color: inherit;
    text-decoration: underline;
    transition: color 0.3s;
}
footer a:hover {
    color: #ffcc00;
}

/* === UPDATED RULE === */
@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .username-input {
        flex-direction: column;
        align-items: center;
    }
    
    input {
        width: 90%;
    }
    
    .card, .placeholder-card {
        width: 100%;
        max-width: 350px;
        height: 513px; /* Adjusted height to maintain aspect ratio */
    }
}

.pixelated {
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    filter: contrast(1.2) brightness(1.1) saturate(1.2);
}

.message-box-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.message-box {
    background: linear-gradient(135deg, #8a2be2, #6a0dad);
    border: 3px solid #ffcc00;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    text-align: center;
    color: white;
    font-family: 'Comic Neue', cursive;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.message-box h3 {
    font-family: 'Press Start 2P', cursive;
    color: #ffcc00;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.message-box p {
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.message-box button {
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 25px;
    font-size: 1rem;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    transition: all 0.2s;
}

.message-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}