body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding-bottom: 50px; /* Add padding to prevent footer overlap */
}

.container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
    position: relative;
    z-index: 1;
}

h1 {
    color: #1a202c;
    margin-bottom: 10px;
}

p {
    color: #718096;
    margin-bottom: 30px;
}

.upload-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
}

input[type="file"] {
    display: none;
}

.file-label {
    background-color: #edf2f7;
    color: #4a5568;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 80%;
}

.file-label:hover {
    background-color: #e2e8f0;
}

#upload-button {
    background-color: #4299e1;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 80%;
}

#upload-button:hover {
    background-color: #3182ce;
}

#upload-button:disabled {
    background-color: #a0aec0;
    cursor: not-allowed;
}

.result-box {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

#result-url {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #f7fafc;
    box-sizing: border-box;
}

#result-image, #result-video {
    max-width: 100%;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    position: fixed; /* Changed to fixed to ensure it's always at the bottom */
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    background-color: #f4f7f9; /* Match body background */
    text-align: center;
    color: #718096;
    font-size: 14px;
    z-index: 0;
}

#result-json {
    background-color: #edf2f7;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    font-size: 13px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2d3748;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}
