body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px; 
    margin: 0 auto; 
    padding: 20px;
    background-color: #f8f9fa;
    color: #333;
}
.container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
h1 {
    color: #4a6cf7;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}
.subtitle {
    color: #6b7280;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}
.form-group { 
    margin-bottom: 20px; 
}
label { 
    display: block; 
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}
input[type="file"], input[type="text"] { 
    width: 100%; 
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    transition: border-color 0.3s;
}
input[type="file"]:focus, input[type="text"]:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}
button { 
    background-color: #4a6cf7; 
    color: white; 
    padding: 12px 20px; 
    border: none; 
    cursor: pointer; 
    width: 100%;
    font-size: 16px;
    border-radius: 8px;
    transition: background-color 0.3s;
    font-weight: 500;
}
button:hover { 
    background-color: #3a5be8; 
}
.preview-container {
    margin-top: 20px;
    margin-bottom: 30px;
    height: 250px;
    border-radius: 8px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 0.3s;
}
.preview-container.drag-over {
    background-color: #f0f4ff;
    border: 2px dashed #4a6cf7;
}
.preview-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    width: auto;
    height: auto;
}
.preview-placeholder {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 20px;
}
.notification {
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    display: none;
}
.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.error {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.spinner {
    border: 3px solid rgba(74, 108, 247, 0.1);
    border-radius: 50%;
    border-top: 3px solid #4a6cf7;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
.timer {
    color: #4a6cf7;
    font-weight: 500;
    font-size: 16px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.download-section {
    margin-top: 20px;
    display: none;
}
.download-button {
    background-color: #6366f1;
    margin-top: 10px;
}
.download-button:hover {
    background-color: #4f46e5;
}
.image-label {
    margin-top: 15px;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    font-style: italic;
}
.drag-hint {
    margin-top: 5px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    font-style: italic;
}
.history-container {
    margin-top: 20px;
}
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.history-title {
    font-size: 18px;
    color: #4a6cf7;
    margin: 0;
    font-weight: 600;
}
.clear-history-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    width: auto;
}
.clear-history-btn:hover {
    background-color: #dc2626;
}
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.history-table th, .history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}
.history-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #4b5563;
}
.history-table tr:hover {
    background-color: #f9fafb;
}
.history-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}
.history-text {
    max-width: 200px;
    word-wrap: break-word;
}
.history-timestamp {
    font-size: 12px;
    color: #9ca3af;
}
.history-actions {
    display: flex;
    gap: 10px;
}
.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    color: white;
    font-weight: 500;
}
.btn-download {
    background-color: #6366f1;
}
.btn-download:hover {
    background-color: #4f46e5;
}
.btn-reuse {
    background-color: #8b5cf6;
}
.btn-reuse:hover {
    background-color: #7c3aed;
}
.empty-history {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}
.confirmation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.confirmation-content {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.confirmation-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #4a6cf7;
    font-weight: 600;
}
.confirmation-message {
    margin-bottom: 20px;
    color: #4b5563;
}
.confirmation-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.btn-cancel {
    background-color: #9ca3af;
}
.btn-cancel:hover {
    background-color: #6b7280;
}
.btn-confirm {
    background-color: #ef4444;
}
.btn-confirm:hover {
    background-color: #dc2626;
}