/* Google Fonts for a nicer look */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #007aff;
    --success-color: #34c759;
    --error-color: #ff3b30;
    --text-color: #333;
    --light-text-color: #666;
    --bg-color: rgba(255, 255, 255, 0.85);
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
    
    /* Background setup */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: background-image 0.5s ease-in-out;
}

/* Default/Landscape background */
body {
    background-image: url('https://pic1.imgdb.cn/item/67d566ad88c538a9b5bec9e4.jpg');
}

/* Portrait background */
@media (orientation: portrait) {
    body {
        background-image: url('https://pic1.imgdb.cn/item/67e4d2940ba3d5a1d7e4b1a5.jpg');
    }
}

.container {
    width: 100%;
    max-width: 680px;
    background: var(--bg-color);
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 25px;
}

.upload-container {
    background-color: rgba(255, 255, 255, 0.6);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-container.dragging {
    background-color: rgba(0, 122, 255, 0.1);
    border-color: var(--primary-color);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.upload-container h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.upload-text {
    color: var(--light-text-color);
    margin-bottom: 18px;
}

.upload-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.upload-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#fileInput {
    display: none;
}

.info-text {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--light-text-color);
}

/* Upload Options */
.upload-options {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    padding: 8px;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.tooltip-icon {
    font-size: 14px;
    color: #999;
    cursor: help;
}

.tooltip-text {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    margin-bottom: 5px;
}

.checkbox-label:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Options Inputs */
#expirationContainer,
#passwordContainer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: none;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.option-input, .option-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background-color: #fff;
}
.option-input:focus, .option-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.option-button {
    padding: 8px 15px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}
.option-button:hover {
    background: #28a745;
}

.success-text {
    font-size: 0.85rem;
    color: var(--success-color);
}


/* Status & Progress */
.upload-status {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    display: none;
    font-weight: 500;
}
.upload-status.success {
    background-color: #d4edda;
    color: #155724;
}
.upload-status.error {
    background-color: #f8d7da;
    color: #721c24;
}
.upload-status.uploading {
    background-color: #cce5ff;
    color: #004085;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
    display: none;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
}

/* File List */
.file-list {
    margin-top: 20px;
    text-align: left;
}
.file-item {
    background-color: #f8f9fa;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.file-item-header {
    font-size: 0.8rem;
    padding: 5px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: inline-block;
}
.file-item-header.one-time {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--error-color);
}
.file-item-header.expiring {
    background-color: rgba(255, 149, 0, 0.1);
    color: #ff9500;
}
.file-item-header.password {
    background-color: rgba(88, 86, 214, 0.1);
    color: #5856d6;
    margin-left: 5px;
}


.file-url-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.file-url {
    word-break: break-all;
}
.file-url a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.file-url a:hover {
    text-decoration: underline;
}

.copy-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}
.copy-button:hover {
    background-color: #5a6268;
}