:root {
    color-scheme: dark;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #a855f7;
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #ec4899;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo h1 span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.upload-card {
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.upload-content {
    text-align: center;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.upload-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.upload-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.upload-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.file-limit {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 100px;
}

.hidden {
    display: none !important;
}

/* File Info View */
.file-info {
    width: 100%;
    max-width: 600px;
}

.file-list {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0.2rem 1.5rem;
    margin-bottom: 1rem;
    scrollbar-width: thin;
}

.file-list::-webkit-scrollbar {
    height: 6px;
}

.file-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

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

.file-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    width: 280px;
    flex-shrink: 0;
}

.file-details:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}

.file-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary);
    flex-shrink: 0;
}

.text-details {
    flex: 1;
    min-width: 0;
}

.text-details h3 {
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-details p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.compression-settings {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    width: 100%;
}

.compression-settings label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.toggle-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem 1rem;
    border-radius: 12px;
}

.toggle-label {
    margin-bottom: 0 !important;
    font-size: 0.9rem;
    color: var(--text-main) !important;
}

/* Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

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

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.range-wrapper {
    padding: 0 0.5rem;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.action-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Processing View */
.processing {
    text-align: center;
}

.spinner-container {
    margin-bottom: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-bar-container {
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 1.5rem auto 0;
    overflow: hidden;
}

.progress-bar {
    width: 30%;
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Result View */
.results-list {
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
    margin: 2rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0.2rem 1.5rem;
    scrollbar-width: thin;
}

.results-list::-webkit-scrollbar {
    height: 6px;
}

.results-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.result-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 320px;
    flex-shrink: 0;
}

.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.result-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.result-item-info h4 {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.result-stat {
    background: rgba(255, 255, 255, 0.02);
    padding: 0.6rem;
    border-radius: 10px;
    text-align: center;
}

.result-stat .label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.result-stat .value {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}

.result-stat.highlight {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

.mini-download-btn {
    padding: 0.6rem 1rem;
    background: var(--success);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.mini-download-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.action-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.secondary-btn {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 14px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2rem;
    text-align: center;
}

.feature-card i {
    width: 32px;
    height: 32px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer {
    text-align: center;
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .logo h1 {
        font-size: 2rem;
    }
}
