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

body {
    font-family: "Comic Sans MS", Arial, sans-serif;
    background: #1a1a1a;
    color: #fff;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #00ff88;
    text-shadow: 3px 3px 0px #ff00aa;
    font-size: 2.5rem;
}

.description {
    text-align: center;
    margin-bottom: 30px;
    color: #ff9900;
    font-style: italic;
}

.upload-section {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.video-upload, .image-upload {
    margin-bottom: 20px;
}

h2 {
    margin-bottom: 15px;
    color: #00ff88;
}

input[type="file"] {
    background: #333;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid #00ff88;
    color: #fff;
    width: 100%;
    margin-bottom: 15px;
}

#imagePreviewContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

#imagePreviewContainer img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
}

.delete-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.video-wrapper {
    position: relative;
    width: 100%;
}

.video-wrapper video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin: 0;
}

.delete-video {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

video {
    width: 100%;
    max-height: 400px;
    margin: 15px 0;
    border-radius: 5px;
}

.ai-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.ai-image-button, .meme-button {
    flex: 1;
    padding: 10px;
}

.ai-image-button {
    background: #ff44aa;
}

.meme-button {
    background: #ff9900;
}

.meme-button:hover {
    background: #cc7700;
}

.audio-upload {
    margin-bottom: 20px;
}

.audio-wrapper {
    display: flex;
    align-items: center;
    background: #333;
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 10px;
    position: relative;
}

.audio-wrapper span {
    flex: 1;
    margin-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-wrapper audio {
    width: 150px;
}

.delete-audio {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.options-panel {
    background: #3a2a4a;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px dashed #ff44aa;
}

.option-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.option-row label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.option-row input[type="checkbox"] {
    margin-right: 5px;
    width: 18px;
    height: 18px;
}

button {
    background: linear-gradient(to right, #00ff88, #00ccff);
    color: #1a1a1a;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.5);
}

button:disabled {
    background: #666;
    cursor: not-allowed;
}

button:hover:not(:disabled) {
    background: #00cc6a;
    transform: translateY(-2px);
}

#outputSection {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

#editingCanvas {
    width: 100%;
    max-width: 640px;
    height: auto;
    display: block;
    margin: 20px auto;
    background: #000;
    border-radius: 5px;
}

#outputVideo {
    width: 100%;
    max-width: 640px;
    height: auto;
    display: block;
    margin: 20px auto;
    background: #000;
    border-radius: 5px;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    #imagePreviewContainer {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    button {
        padding: 12px 20px;
    }
}