:root {
    --bg-color: #0d0a15;
    --text-main: #f8f9fa;
    --text-muted: #a0a0ab;
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --danger: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Background Blobs for Premium Feel */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}
.blob-1 {
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 246, 0.4);
}
.blob-2 {
    bottom: 20%;
    right: -150px;
    width: 500px;
    height: 500px;
    background: rgba(76, 29, 149, 0.3);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.glass-header {
    background: rgba(13, 10, 21, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}
.logo i {
    color: var(--primary-color);
}
.back-link {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s;
}
.back-link:hover {
    color: var(--text-main);
}
nav {
    display: flex;
    gap: 24px;
}
nav a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}
nav a:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    padding: 100px 0 80px;
    text-align: center;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}
.highlight {
    background: linear-gradient(135deg, #c4b5fd 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Tools Grid */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-main);
    padding-top: 40px;
}
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.tool-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}
.tool-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 12px 30px -4px rgba(139, 92, 246, 0.15);
}
.icon-wrapper {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}
.tool-card:hover .icon-wrapper {
    transform: scale(1.05);
}
.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tool Workspace */
.tool-workspace {
    max-width: 800px;
    padding-top: 60px;
    padding-bottom: 100px;
}
.tool-header {
    text-align: center;
    margin-bottom: 40px;
}
.icon-wrapper.large {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}
.icon-wrapper.large i {
    width: 32px;
    height: 32px;
}
.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.tool-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.glass-panel {
    background: rgba(20, 15, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.08);
    transform: scale(1.01);
}
.drop-zone i {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}
.drop-zone h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 8px;
}
.drop-zone p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}
.btn-primary {
    background: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}
.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
    border-radius: 12px;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* File List UI */
.file-list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}
.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.file-info i {
    color: var(--text-muted);
}
.file-name {
    font-weight: 500;
}
.file-size {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.remove-file {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
}
.remove-file:hover {
    color: var(--danger);
}

/* Options Panel */
.options-panel {
    margin-top: 24px;
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.input-group {
    margin-bottom: 16px;
}
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}
.input-group input, .input-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-family: inherit;
    font-size: 1rem;
}
.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Action Bar */
.action-bar {
    margin-top: 32px;
    text-align: center;
}

/* States */
.hidden {
    display: none !important;
}

.loading-state, .success-state, .error-state {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 24px 0 16px;
    overflow: hidden;
    position: relative;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #c4b5fd);
    border-radius: 8px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}
.progress-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Download Card */
.download-card {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin: 24px auto;
    max-width: 400px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.download-card-info {
    display: flex;
    flex-direction: column;
}
.download-card-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    word-break: break-all;
}
.download-card-size {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.download-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    margin-left: 16px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    transition: transform 0.2s;
}
.download-card:hover .download-card-icon {
    transform: translateY(-2px);
}

.success-icon, .error-icon {
    margin-bottom: 20px;
}
.success-icon i {
    width: 64px;
    height: 64px;
    color: var(--success);
}
.error-icon i {
    width: 64px;
    height: 64px;
    color: var(--danger);
}
.success-state h3, .error-state h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.success-state p, .error-state p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.mt-2 { margin-top: 16px; }

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .glass-panel { padding: 24px; }
    .tools-grid { grid-template-columns: 1fr; }
}
