body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #2196F3;
}

p {
    max-width: 600px;
    text-align: center;
}

.auth-status {
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.auth-status-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    text-align: center;
}

.flash-messages {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
}

form {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 900px;
}

#dropZone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    font-size: 18px;
    color: #ccc;
    transition: border-color 0.3s ease;
    margin-bottom: 20px;
    cursor: pointer;
}

#dropZone:hover {
    border-color: #2196F3;
    color: #2196F3;
}

#dropZone.active {
    border-color: #2196F3;
    background-color: #e3f2fd;
}

#dropZone.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

input[type="file"] {
    display: none;
}

#fileName {
    font-size: 16px;
    color: #333;
}

#previewContainer {
    display: none;
    margin-top: 20px;
}

#previewTitle {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.preview-panel {
    display: none;
    width: 100%;
    min-height: 120px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fafafa;
    box-sizing: border-box;
}

.preview-panel.active {
    display: block;
}

#pdfPreview,
#videoPreview,
#docxPreview,
#xlsxPreview {
    width: 100%;
    height: 600px;
}

#imagePreview {
    width: 100%;
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
    padding: 10px;
    background-color: #fff;
}

#audioPreview {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background-color: #fff;
}

#textPreview {
    margin: 0;
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
    max-height: 600px;
    font-family: Consolas, Monaco, monospace;
    background-color: #fff;
}

#docxPreview,
#xlsxPreview {
    padding: 16px;
    overflow: auto;
    background-color: #fff;
    box-sizing: border-box;
}

#docxPreview table,
#xlsxPreview table {
    border-collapse: collapse;
    width: 100%;
}

#docxPreview th,
#docxPreview td,
#xlsxPreview th,
#xlsxPreview td {
    border: 1px solid #ccc;
    padding: 8px;
    vertical-align: top;
}

#previewMessage {
    display: none;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

input[type="submit"] {
    background-color: #2196F3;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    margin-top: 10px;
}

button,
input[type="submit"] {
    background-color: #2196F3;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    margin-top: 10px;
}

button:hover,
input[type="submit"]:hover {
    background-color: #1976D2;
}

button:disabled,
input[type="submit"]:disabled {
    background-color: #90caf9;
    cursor: wait;
}

.secondary-button {
    width: auto;
    margin-left: 12px;
    margin-top: 0;
    background-color: #607d8b;
}

.secondary-button:hover {
    background-color: #455a64;
}

.inline-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    width: auto;
}

.auth-form {
    max-width: 480px;
}

.auth-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.auth-form input[type="email"],
.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 16px;
}

.spacer60 {
    margin-top: 60px;
}

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#uploadLoadingOverlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 1000;
}

#uploadLoadingOverlay.active {
    display: flex;
}

.loading-dialog {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 32px;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #bbdefb;
    border-top-color: #2196F3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}