* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: #2c3e50;
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    opacity: 0.8;
}

main {
    padding: 30px;
}

.editor-section {
    margin-bottom: 30px;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-button:hover {
    color: #5a6fd8;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Text Input */
#textInput {
    width: 100%;
    height: 300px;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 20px;
}

#textInput:focus {
    outline: none;
    border-color: #667eea;
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.image-upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.image-upload-area.dragover {
    border-color: #667eea;
    background: #f0f2ff;
}

.upload-placeholder .upload-icon {
    font-size: 3em;
    margin-bottom: 10px;
    display: block;
}

.upload-placeholder p {
    margin-bottom: 5px;
    color: #666;
}

.upload-subtext {
    font-size: 0.9em;
    color: #999;
}

.image-preview {
    text-align: center;
    margin-bottom: 20px;
}

#previewImage {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.remove-btn {
    background: #e74c3c;
    color: white;
    margin-top: 10px;
}

.remove-btn:hover {
    background: #c0392b;
}

.controls {
    display: flex;
    gap: 10px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#saveBtn {
    background: #667eea;
    color: white;
}

#saveBtn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

#saveBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

#clearBtn {
    background: #e74c3c;
    color: white;
}

#clearBtn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.result-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 2px dashed #ddd;
}

.result-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#pasteLink {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

#copyBtn {
    background: #27ae60;
    color: white;
}

#copyBtn:hover {
    background: #219a52;
}

#newPasteBtn {
    background: #3498db;
    color: white;
}

#newPasteBtn:hover {
    background: #2980b9;
}

footer {
    background: #ecf0f1;
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
}

/* Paste View Styles */
.paste-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.paste-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

.paste-image {
    text-align: center;
    margin-bottom: 20px;
}

.paste-image img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.paste-actions {
    text-align: center;
}

.error-message {
    text-align: center;
    padding: 40px;
}

.error-message p {
    margin-bottom: 20px;
    color: #e74c3c;
    font-size: 18px;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        margin: 10px;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    #textInput {
        height: 200px;
    }
    
    .image-upload-area {
        padding: 20px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: center;
    }
}