/* Global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 通用隐藏类 */
.hidden {
    display: none !important;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --surface-color: #2d2d2d;
    --text-color: #e0e0e0;
    --secondary-text-color: #a0a0a0;
    --border-color: #333;
    --hover-color: #3a3a3a;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 流体背景画布 */
#fluid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Ballpit背景画布 */
#ballpit-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

.container {
    width: 100%;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
    background-color: rgba(30, 30, 30, 0.7);
    padding: 8px 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.header-spacer {
    flex: 1;
}

.header-logo {
    height: 1.8em;
    width: auto;
    object-fit: contain;
}

h1 {
    text-align: center;
    margin-bottom: 0;
    color: var(--text-color);
    flex: 1;
    text-align: center;
    font-size: 1.5em;
    margin: 0;
}

.header-brand h1 {
    flex: 0 0 auto;
}

/* 语言选择器样式 */
.language-selector-container {
    display: flex;
    justify-content: flex-end;
    flex: 1;
}

.language-selector-container select {
    width: auto;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    font-size: 13px;
}

h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

h3 {
    color: var(--text-color);
    margin-bottom: 8px;
    margin-top: 0;
}

h4 {
    color: var(--text-color);
    margin-bottom: 8px;
    margin-top: 0;
}

/* Tab styles */
.tabs {
    background-color: rgba(30, 30, 30, 0.85);
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tab-header {
    display: flex;
    background-color: rgba(45, 45, 45, 0.8);
    border-bottom: 1px solid var(--border-color);
}

.tab-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    font-weight: bold;
    color: var(--secondary-text-color);
}

.tab-item:hover {
    background-color: var(--hover-color);
}

.tab-item.active {
    background-color: rgba(30, 30, 30, 0.9);
    border-bottom: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.tab-content {
    padding: 15px;
    box-sizing: border-box;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

/* Control group styles */
.control-group {
    margin-bottom: 12px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    background-color: var(--surface-color);
    color: var(--text-color);
}

.slider {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: var(--surface-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 16px;
    margin-right: 10px;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: var(--accent-color);
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* LED控制样式 */
.color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.color-preset-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
}

.color-preset-btn[data-preset="rainbow"] {
    background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
}

.color-preset-btn[data-preset="fire"] {
    background: linear-gradient(to right, #ff4500, #ff8c00, #ffd700);
}

.color-preset-btn[data-preset="ocean"] {
    background: linear-gradient(to right, #00008b, #0000cd, #00bfff, #87ceeb);
}

.color-preset-btn[data-preset="forest"] {
    background: linear-gradient(to right, #006400, #228b22, #32cd32, #90ee90);
}

.color-preset-btn[data-preset="sunset"] {
    background: linear-gradient(to right, #ff8c00, #ff6347, #cd5c5c, #8b0000);
}

.color-preset-btn[data-preset="galaxy"] {
    background: linear-gradient(to right, #191970, #4b0082, #8a2be2, #9370db);
}

.color-preset-btn[data-preset="neon"] {
    background: linear-gradient(to right, #ff00ff, #00ffff, #ff00ff);
}

.color-preset-btn[data-preset="aurora"] {
    background: linear-gradient(to right, #001122, #003344, #005566, #00bbcc, #00ffff);
}

.color-preset-btn[data-preset="cherry"] {
    background: linear-gradient(to right, #ffb3ba, #ffc0cb, #ff69b4, #ff1493, #dc143c);
}

.color-preset-btn[data-preset="mint"] {
    background: linear-gradient(to right, #98fb98, #90ee90, #7fffd4, #66cdaa, #3cb371, #228b22);
}

.color-preset-btn[data-preset="lavender"] {
    background: linear-gradient(to right, #e6e6fa, #d8bfd8, #da70d6, #ba55d3, #9370db, #8a2be2);
}

.color-preset-btn[data-preset="amber"] {
    background: linear-gradient(to right, #ffbf00, #ffcc00, #ffd700, #ffeb3b, #ffc107, #ff9800);
}

.color-preset-btn[data-preset="ice"] {
    background: linear-gradient(to right, #e0f7fa, #b2ebf2, #80deea, #4dd0e1, #26c6da, #00bcd4);
}

.color-preset-btn[data-preset="rose"] {
    background: linear-gradient(to right, #ffe4e1, #ffb6c1, #ff91a4, #ff69b4, #ff1493, #dc143c);
}

.color-preset-btn[data-preset="tropical"] {
    background: linear-gradient(to right, #ff0080, #ff4000, #ffc000, #ffff00, #80ff00, #00ffff, #0080ff, #8000ff);
}

.color-preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.led-strip {
    background-color: var(--surface-color);
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 15px;
}

.led-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.led {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.led.selected {
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.led.disabled {
    cursor: not-allowed;
    opacity: 0.3;
    border: 2px solid #444;
}

.led-numbers {
    display: flex;
    justify-content: space-between;
}

.led-numbers span {
    width: 30px;
    text-align: center;
    font-size: 12px;
    color: var(--text-color);
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

#color-picker {
    width: 60px;
    height: 40px;
    padding: 0;
    border: none;
    cursor: pointer;
    background-color: transparent;
}

#selected-led-info {
    margin-top: 10px;
    padding: 10px;
    background-color: var(--surface-color);
    border-radius: 5px;
}

/* Image gallery styles */
.image-upload {
    margin-bottom: 15px;
    padding: 12px;
    background-color: var(--surface-color);
    border-radius: 5px;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-form > div {
    display: flex;
    gap: 10px;
    align-items: center;
}

.upload-form .form-control {
    width: 100%;
}

.upload-form > div .form-control {
    flex: 1;
}

.upload-form .btn {
    align-self: flex-start;
}

.upload-form > div .btn {
    align-self: stretch;
    white-space: nowrap;
}

.upload-hint {
    margin-top: 8px;
    font-size: 14px;
    color: var(--secondary-text-color);
    font-style: italic;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 15px;
    margin-top: 8px;
}

.image-item {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    background: var(--card-background);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.image-item img {
    width: 170px;
    height: 320px;
    object-fit: cover;
    display: block;
}

/* 图片占位符样式 */
.image-placeholder {
    width: 170px;
    height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--surface-color);
    color: var(--secondary-text-color);
    font-size: 12px;
    gap: 8px;
    position: relative;
    padding: 10px;
}

.image-placeholder .spinner {
    width: 24px;
    height: 24px;
    border-width: 2px;
}

.image-placeholder.error {
    background-color: rgba(244, 67, 54, 0.1);
}

.placeholder-message {
    text-align: center;
    word-break: break-word;
}

.placeholder-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
    display: none;
}

.image-actions {
    display: flex;
    justify-content: space-between;
    padding: 8px;
}

/* Add language-specific adjustments for image actions */
html[lang="en-US"] .image-actions {
    flex-wrap: wrap;
    gap: 5px;
}

html[lang="en-US"] .image-actions .btn-sm {
    flex: 1 0 auto;
    min-width: 80px;
    margin-bottom: 3px;
    text-align: center;
}

.image-name {
    padding: 0 8px 8px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.default-indicator {
    background-color: var(--secondary-color);
    color: white;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 10px;
    font-weight: bold;
}

.btn-default {
    background-color: #666;
}

.btn-default:hover {
    background-color: #777;
}

.btn-default.active {
    background-color: var(--secondary-color);
}

.btn-default.active:hover {
    background-color: #2980b9;
}

.btn-sm {
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 3px;
}

.loading, .no-images, .error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 5px;
    margin-top: 20px;
}

.loading {
    color: var(--secondary-color);
}

.error-message {
    color: var(--accent-color);
}

.no-images {
    color: var(--secondary-text-color);
}

/* Info group styles */
.info-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: bold;
    color: var(--secondary-text-color);
}

.info-value {
    color: var(--text-color);
}

/* 联系我们样式 */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-label {
    font-weight: bold;
    color: var(--secondary-text-color);
    margin-right: 10px;
    min-width: 80px;
}

.contact-value {
    color: var(--text-color);
    font-size: 1.1em;
    word-break: break-all;
}

.contact-value a {
    color: white;
    text-decoration: none;
}

.contact-value a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }
    
    .header-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .header-brand {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .header-spacer {
        display: none;
    }
    
    .header-container .language-selector-container {
        order: 2;
        flex: 0 0 auto;
        width: 100%;
        justify-content: center;
    }
    
    .tab-header {
        flex-wrap: wrap;
    }
    
    .tab-item {
        flex: 1 0 50%;
        text-align: center;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }
    
    .image-item img,
    .image-placeholder {
        width: 100%;
        height: 320px;
    }
    
    .color-presets {
        flex-direction: column;
    }
    
    .led-group {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .led-numbers {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .color-picker {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Animation effects */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert styles */
.alert {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.alert-success {
    background-color: rgba(21, 87, 36, 0.2);
    color: #4cd964;
    border: 1px solid rgba(76, 217, 100, 0.3);
}

.alert-warning {
    background-color: rgba(127, 96, 0, 0.2);
    color: #ffcc00;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.alert-error {
    background-color: rgba(114, 28, 36, 0.2);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Select dropdown styling for dark theme */
select {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

select option {
    background-color: var(--surface-color);
    color: var(--text-color);
}

/* File input styling */
input[type="file"] {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px;
}

/* Storage info styles */
.storage-info {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--surface-color);
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.storage-progress-container {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: var(--card-background);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #8bc34a 50%, #ffeb3b 75%, #ff9800 90%, #f44336 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.storage-details {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: var(--text-color);
    margin-top: 10px;
}

.storage-details > span {
    margin: 0 2px;  /* 给每个span元素添加很小的左右间距 */
}

.storage-percentage {
    color: var(--secondary-text-color);
    font-weight: bold;
    margin-left: 2px;
}

/* Slideshow settings */
.slideshow-settings {
    margin-bottom: 15px;
    padding: 12px;
    background-color: var(--surface-color);
    border-radius: 5px;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: #444;
    border-radius: 24px;
    transition: .4s;
    margin-right: 10px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .toggle-slider {
    background-color: var(--secondary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-weight: bold;
}

/* WiFi配置相关样式 */
.wifi-config {
    margin-top: 20px;
}

.tabs-nested {
    background-color: var(--surface-color);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.tab-header-nested {
    display: flex;
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
}

.tab-item-nested {
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    font-weight: bold;
    color: var(--secondary-text-color);
}

.tab-item-nested:hover {
    background-color: var(--hover-color);
}

.tab-item-nested.active {
    background-color: var(--surface-color);
    border-bottom: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.tab-content-nested {
    padding: 20px;
}

.tab-pane-nested {
    display: none;
}

.tab-pane-nested.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.wifi-list {
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--card-background);
    border-radius: 5px;
    padding: 10px;
    margin-top: 10px;
}

.wifi-network {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.wifi-network:last-child {
    border-bottom: none;
}

.wifi-network:hover {
    background-color: var(--hover-color);
}

.wifi-name {
    font-weight: bold;
}

.wifi-signal {
    display: flex;
    align-items: center;
    color: var(--secondary-text-color);
    font-size: 0.9em;
}

.wifi-security {
    margin-left: 10px;
    color: var(--secondary-text-color);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox {
    width: auto;
    margin-right: 5px;
}

.error-message {
    color: var(--accent-color);
    margin: 10px 0;
    text-align: center;
}

#saved-wifi-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    background-color: var(--card-background);
    border-radius: 5px;
}

#saved-wifi-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

#saved-wifi-list li:last-child {
    border-bottom: none;
}

.saved-wifi-actions {
    display: flex;
    gap: 5px;
}

.saved-wifi-actions button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.2s;
}

.saved-wifi-actions button:hover {
    color: var(--secondary-color);
}

.saved-wifi-actions button.delete:hover {
    color: var(--accent-color);
}

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    animation: fadeIn 0.3s, fadeOut 0.5s 2.5s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.toast.success {
    background-color: rgba(21, 87, 36, 0.9);
}

.toast.error {
    background-color: rgba(114, 28, 36, 0.9);
}

.toast.info {
    background-color: rgba(12, 84, 96, 0.9);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 上传进度条样式 */
.upload-progress-container {
    margin-top: 15px;
    padding: 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    animation: fadeIn 0.3s ease-out;
}

.upload-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

#upload-status {
    color: var(--text-color);
    font-weight: 500;
}

#upload-percentage {
    color: #4CAF50;
    font-weight: 600;
}

.upload-progress-container .progress-bar {
    background: var(--border-color);
    border-radius: 10px;
    height: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
}

.upload-progress-container .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #4CAF50);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-progress-container .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.upload-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

#upload-size {
    font-family: monospace;
}

#upload-speed {
    color: #2196F3;
    font-weight: 500;
}

/* 上传完成状态 */
.upload-progress-container.completed .progress-fill {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.upload-progress-container.error .progress-fill {
    background: linear-gradient(90deg, #f44336, #ff5722);
}

/* 上传按钮状态 */
.btn.uploading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.uploading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 下载期间禁用上传按钮 */
.btn.downloading {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #9e9e9e !important;
}

/* GIF占位符样式 */
.image-placeholder.gif-placeholder {
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
    border: 1px dashed var(--border-color);
}

/* 时区设置样式 */
.timezone-selector-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 8px;
}

.timezone-selector-container select {
    flex: 1;
    min-width: 200px;
}

.timezone-selector-container button {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .timezone-selector-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .timezone-selector-container select {
        min-width: auto;
    }
}

/* 图片传输遮罩层 */
.transfer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.transfer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.transfer-overlay-content {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 30px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
}

.transfer-overlay-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.transfer-overlay-title {
    color: var(--text-color);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.transfer-overlay-message {
    color: var(--secondary-text-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.transfer-overlay-progress {
    width: 100%;
    height: 8px;
    background-color: var(--surface-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.transfer-overlay-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), #4CAF50);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.transfer-overlay-percent {
    color: var(--secondary-color);
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

.transfer-overlay-cancel-btn {
    background-color: var(--danger-color, #dc3545);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin: 10px auto 0;
    display: block;
}

.transfer-overlay-cancel-btn:hover {
    background-color: var(--danger-color-hover, #c82333);
    transform: translateY(-1px);
}

.transfer-overlay-cancel-btn:active {
    transform: translateY(0);
}

/* 恢复出厂设置叠加层 */
.factory-reset-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.factory-reset-overlay.active {
    opacity: 1;
    visibility: visible;
}

.factory-reset-overlay-content {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 40px 50px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 450px;
    width: 90%;
}

.factory-reset-overlay-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--border-color);
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

.factory-reset-overlay-title {
    color: var(--text-color);
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.factory-reset-overlay-message {
    color: var(--secondary-text-color);
    font-size: 15px;
    line-height: 1.6;
} 