* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    position: relative;
}

.app-container.ultra-mode {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #a8edea 100%);
}

.ultra-mode .app-header {
    background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff);
    background-size: 400% 400%;
    animation: rainbow 3s ease infinite;
}

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.warning-modal {
    background: linear-gradient(180deg, #2d0a0a 0%, #1a0505 100%);
    border: 4px solid #ff0000;
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 60px rgba(255, 0, 0, 0.5), inset 0 0 30px rgba(255, 0, 0, 0.1);
    overflow: hidden;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 60px rgba(255, 0, 0, 0.5), inset 0 0 30px rgba(255, 0, 0, 0.1); }
    50% { box-shadow: 0 0 80px rgba(255, 0, 0, 0.8), inset 0 0 40px rgba(255, 0, 0, 0.2); }
}

.warning-stripes {
    height: 20px;
    background: repeating-linear-gradient(
        45deg,
        #ff0000,
        #ff0000 10px,
        #000 10px,
        #000 20px
    );
}

.warning-stripes.bottom {
    margin-top: 20px;
}

.warning-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: #ff0000;
    margin: 30px 20px 10px;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    animation: flicker 1.5s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
    75% { opacity: 1; }
    90% { opacity: 0.9; }
}

.warning-subtitle {
    font-size: 1.2rem;
    color: #ffcccc;
    margin: 0 20px 30px;
}

.checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0 30px 30px;
    text-align: left;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #ddd;
    padding: 12px 15px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 0, 0, 0.3);
    transition: all 0.3s;
}

.checkbox-label:hover {
    background: rgba(255, 0, 0, 0.2);
}

.checkbox-label input {
    width: 20px;
    height: 20px;
    accent-color: #ff0000;
}

.enter-button {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    padding: 18px 40px;
    margin: 0 20px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.enter-button.disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
}

.enter-button.active {
    background: linear-gradient(180deg, #ff0000 0%, #990000 100%);
    color: white;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
    animation: pulse-glow 1s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.6); }
    50% { box-shadow: 0 0 50px rgba(255, 0, 0, 0.9); }
}

.enter-button.active:hover {
    transform: scale(1.05);
}

/* Header Styles */
.app-header {
    background: linear-gradient(180deg, #3d0a0a 0%, #1a0505 100%);
    padding: 30px 20px;
    text-align: center;
    border-bottom: 4px solid #ff0000;
    cursor: pointer;
    user-select: none;
}

.main-title {
    font-family: 'Bangers', cursive;
    font-size: 2.8rem;
    color: #ff0000;
    text-shadow: 3px 3px 0 #000, 0 0 30px rgba(255, 0, 0, 0.8);
    margin-bottom: 10px;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px) rotate(-0.5deg); }
    75% { transform: translateX(2px) rotate(0.5deg); }
}

.subtitle {
    color: #ffaaaa;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.bamboozle-counter {
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Main Content */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

.generator-panel {
    background: linear-gradient(180deg, rgba(61, 10, 10, 0.8) 0%, rgba(26, 5, 5, 0.9) 100%);
    border: 2px solid #ff0000;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.category-label {
    display: block;
    font-size: 1.1rem;
    color: #ff6666;
    margin-bottom: 12px;
    font-weight: bold;
}

.category-select {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-family: 'Comic Neue', cursive;
    background: #1a0505;
    color: white;
    border: 2px solid #ff0000;
    border-radius: 8px;
    margin-bottom: 20px;
    cursor: pointer;
}

.category-select:focus {
    outline: none;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.generate-button {
    width: 100%;
    padding: 20px;
    font-family: 'Bangers', cursive;
    font-size: 1.6rem;
    letter-spacing: 2px;
    background: linear-gradient(180deg, #ff0000 0%, #990000 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    animation: pulse-button 2s infinite;
}

@keyframes pulse-button {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.generate-button:hover:not(:disabled) {
    transform: scale(1.03);
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.8);
}

.generate-button:disabled {
    animation: none;
}

.generate-button.generating {
    background: linear-gradient(90deg, #ff0000, #ff6600, #ff0000);
    background-size: 200% 100%;
    animation: loading-slide 1s linear infinite;
    font-size: 1.2rem;
}

@keyframes loading-slide {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Meme Display */
.meme-display {
    margin-bottom: 30px;
}

.meme-container {
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.meme-image {
    width: 100%;
    display: block;
}

.censored-bar {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    background: linear-gradient(90deg, #000 0%, #ff0000 50%, #000 100%);
    padding: 30px;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: white;
    animation: slide-away 1.5s ease-out forwards;
    z-index: 10;
}

@keyframes slide-away {
    0%, 80% { transform: translateY(-50%) translateX(0); opacity: 1; }
    100% { transform: translateY(-50%) translateX(100%); opacity: 0; }
}

.meme-text {
    position: absolute;
    left: 10px;
    right: 10px;
    text-align: center;
    font-family: Impact, 'Arial Black', sans-serif;
    font-size: 1.8rem;
    color: white;
    text-shadow: 
        -2px -2px 0 #000,  
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000,
        0 0 10px rgba(0,0,0,0.8);
    text-transform: uppercase;
    word-wrap: break-word;
}

.meme-text.top {
    top: 15px;
}

.meme-text.bottom {
    bottom: 15px;
}

.meme-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.action-button {
    flex: 1;
    padding: 12px 20px;
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-button.download {
    background: linear-gradient(180deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
}

.action-button.report {
    background: linear-gradient(180deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Report Modal */
.report-modal {
    background: linear-gradient(180deg, #ffe4ec 0%, #ffc0cb 100%);
    border: 4px solid #ff69b4;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    text-align: center;
    color: #333;
}

.report-modal h2 {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    color: #e91e63;
    margin-bottom: 20px;
}

.report-modal p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.close-report-button {
    background: linear-gradient(180deg, #e91e63 0%, #c2185b 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-family: 'Comic Neue', cursive;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

.close-report-button:hover {
    transform: scale(1.05);
}

/* History Section */
.history-section {
    margin-top: 40px;
}

.history-title {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    color: #ff6666;
    text-align: center;
    margin-bottom: 20px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.history-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.history-item:hover {
    border-color: #ff0000;
    transform: scale(1.05);
}

.history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.3);
    margin-top: 40px;
}

.app-footer p {
    color: #888;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.remix-link {
    color: #ff6666;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.remix-link:hover {
    color: #ff9999;
}

.powered-by {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .warning-title {
        font-size: 1.8rem;
    }
    
    .generate-button {
        font-size: 1.2rem;
        padding: 15px;
    }
    
    .meme-text {
        font-size: 1.2rem;
    }
    
    .meme-actions {
        flex-direction: column;
    }
    
    .generator-panel {
        padding: 20px;
    }
}