/* Base styles */
body {
    font-family: 'PP Migra', 'Arial', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
}

/* Animated background */
@keyframes shimmer {
    0%, 100% { 
        background-position: 0% 50%;
        transform: scale(1.05);
    }
    25% { 
        background-position: 100% 30%;
        transform: scale(1);
    }
    50% { 
        background-position: 50% 100%;
        transform: scale(1.02);
    }
    75% { 
        background-position: 20% 0%;
        transform: scale(1);
    }
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0) scale(1); }
    10% { transform: translate(-3%, -3%) scale(1.02); }
    20% { transform: translate(3%, 3%) scale(0.99); }
    30% { transform: translate(-2%, 2%) scale(1.01); }
    40% { transform: translate(2%, -2%) scale(0.98); }
    50% { transform: translate(-3%, 3%) scale(1.02); }
    60% { transform: translate(3%, -3%) scale(0.99); }
    70% { transform: translate(-2%, -2%) scale(1.01); }
    80% { transform: translate(2%, 2%) scale(0.98); }
    90% { transform: translate(-3%, -3%) scale(1); }
}

body::before {
    content: "";
    position: fixed;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    background: linear-gradient(
        125deg,
        rgba(211, 35, 211, 0.7) 0%,
        rgba(220, 255, 240, 0.7) 25%,
        rgba(165, 101, 244, 0.7) 50%,
        rgba(200, 255, 255, 0.7) 75%,
        rgba(255, 26, 255, 0.7) 100%
    );
    background-size: 200% 200%;
    animation: shimmer 20s ease-in-out infinite;
    z-index: -2;
    transform-origin: center;
    filter: contrast(1.1);
}

body::after {
    content: "";
    position: fixed;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    background: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='512' height='512' filter='url(%23noise)' opacity='0.075'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.4' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='512' height='512' filter='url(%23noise)' opacity='0.075'/%3E%3C/svg%3E");
    animation: grain 12s steps(8) infinite;
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Mobile Container Layout */
.mobile-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

.header-area {
    height: 60px;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Form Elements */
#prompt-container {
    font-size: 32px;
    margin: 20px 0;
    text-align: center;
    color: #333;
    line-height: 1.2;
}

.input-area {
    padding: 15px;
}

.input-area form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;
}

textarea {
    flex: 1;
    margin: 0;
    padding: 12px 40px 12px 12px;
    min-height: 44px;
    border: 1px solid #000;
    border-radius: 10px;
    resize: none;
    font-size: 16px;
    font-family: 'Space Mono', monospace;
}

textarea::placeholder {
    font-family: 'Space Mono', monospace;
}

textarea::-webkit-input-placeholder {
    font-family: 'Space Mono', monospace;
}
textarea::-moz-placeholder {
    font-family: 'Space Mono', monospace;
}
textarea:-ms-input-placeholder {
    font-family: 'Space Mono', monospace;
}

.image-upload-label {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: #666;
    cursor: pointer;
}

button[type="submit"] {
    width: 100%;
    background: #000;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 0px;
    text-transform: lowercase;
    font-size: 30px;
    font-family: 'PP Migra', 'Arial', sans-serif;
    font-style: italic;
}

/* Image Preview */
.image-preview-container {
    width: 100%;
    margin: 0;
    padding: 0 5px;
}

.preview-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.image-preview {
    width: 100%;
    max-height: 200px;
    border-radius: 8px;
    display: block;
    object-fit: contain;
}

.remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
}

.remove-image:hover {
    background: rgba(0, 0, 0, 0.7);
}

.custom-arrow {
    color: rgba(0, 0, 0, 0.9);
    max-height: 50px;
    margin-top: 5px;
    margin-bottom: 20px;
}
