.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--background-alt);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.icon-btn:hover {
    background: var(--primary-light);
    color: white;
    transform: translateY(-2px);
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-light);
    text-decoration: none;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-light);
    text-decoration: none;
}

.secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.danger-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-light);
    text-decoration: none;
}

.danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.memory-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 107, 107, 0.1);
    color: var(--accent-color);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeInUp 0.8s ease 0.4s both;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

.memory-badge i {
    animation: heartbeat 1.5s ease infinite;
}

.view-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: transparent;
    border-radius: 7px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    color: white;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--background);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.download-button {
    padding: 0.5rem 1rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.download-button:hover {
    background: #229954;
    transform: translateY(-1px);
}

.preview-button {
    padding: 0.5rem 1rem;
    background: var(--info-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.preview-button:hover {
    background: #2E86C1;
    transform: translateY(-1px);
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-light);
}

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

@media (max-width: 480px) {
    .primary-btn span {
        display: none;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-large);
    width: 90%;
    height: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.close-btn:hover {
    color: var(--accent-color);
}

.modal-body {
    flex-grow: 1;
    padding-top: 1rem;
    position: relative;
}

#preview-iframe {
    width: 100%;
    height: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.preview-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    z-index: 10;
}

.support-us-section {
    background: linear-gradient(135deg,
            rgba(52, 152, 219, 0.1) 0%,
            rgba(155, 89, 182, 0.1) 100%);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem auto;
    position: relative;
    overflow: hidden;
    width: 70%;
}

.support-us-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 15px 15px 0 0;
}

.support-us-section h3 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.support-us-section h3::before {
    content: '💖';
    font-size: 1.2rem;
    animation: heartbeat 1.5s ease infinite;
}

.support-us-section p {
    color: #BDC3C7;
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
}

.support-us-section a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all var(--transition-fast);
    background: rgba(52, 152, 219, 0.1);
}

.support-us-section a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

[data-theme="dark"] .support-us-section {
    background: linear-gradient(135deg,
            rgba(52, 152, 219, 0.15) 0%,
            rgba(155, 89, 182, 0.15) 100%);
    border-color: rgba(52, 152, 219, 0.3);
}

[data-theme="dark"] .support-us-section p {
    color: var(--dark-text-secondary);
}

[data-theme="dark"] .support-us-section a {
    color: var(--primary-light);
    background: rgba(52, 152, 219, 0.2);
}

[data-theme="dark"] .support-us-section a:hover {
    background: var(--primary-color);
    color: white;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.size-progress-container {
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    cursor: help;
}

.progress-bar {
    flex-grow: 1;
    height: 10px;
    background-color: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

.progress-text {
    font-size: 0.8em;
    color: var(--text-secondary);
    white-space: nowrap;
}

.recent-uploads-section {
    margin-top: 1.5rem;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-soft);
}

.recent-uploads-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.recent-uploads-header .section-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.recent-uploads-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 5px;
}

.recent-uploads-list::-webkit-scrollbar {
    width: 6px;
}

.recent-uploads-list::-webkit-scrollbar-track {
    background: transparent;
}

.recent-uploads-list::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.recent-uploads-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-secondary);
}

.recent-upload-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-medium);
    padding: 0.85rem 1rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.recent-upload-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.recent-upload-info {
    flex: 1;
    min-width: 0;
}

.recent-upload-name {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-upload-name i {
    color: var(--primary-color);
}

.recent-upload-name span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-upload-meta {
    margin-top: 0.35rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.recent-upload-path {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--background-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.recent-upload-path:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.recent-upload-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.recent-action-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 10px;
    background: var(--background-alt);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.recent-action-btn.downloading {
    width: auto;
    padding: 0 12px;
    gap: 8px;
}

.recent-action-btn.downloading .download-progress-text {
    white-space: nowrap;
    font-size: 0.85rem;
}

.recent-action-btn:hover {
    background: var(--primary-color);
    color: white;
}

.recent-uploads-section .empty-state-small,
.recent-uploads-section .loading-item {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .recent-upload-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .recent-upload-actions {
        width: 100%;
        justify-content: flex-end;
    }
}