*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: 220 17% 8%;
    --foreground: 210 40% 98%;
    --card: 220 15% 12%;
    --card-foreground: 210 40% 98%;
    --primary: 180 85% 55%;
    --primary-foreground: 220 17% 8%;
    --secondary: 220 15% 18%;
    --secondary-foreground: 210 40% 98%;
    --muted: 220 15% 15%;
    --muted-foreground: 217 10% 64%;
    --accent: 180 85% 55%;
    --destructive: 0 70% 60%;
    --border: 220 15% 20%;
    --input: 220 15% 18%;
    --radius: 0.75rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.main-content {
    width: 100%;
    max-width: 42rem;
}

.header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.title {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(190, 75%, 45%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: hsl(var(--muted-foreground));
}

.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

.input {
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    background: hsl(var(--secondary));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.2);
}

.upload-zone {
    position: relative;
    border: 2px dashed hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    padding: 1.5rem;
    background: hsl(var(--secondary) / 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover {
    border-color: hsl(var(--primary));
    background: hsl(var(--secondary) / 0.7);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.upload-icon {
    width: 2rem;
    height: 2rem;
    color: hsl(var(--muted-foreground));
    transition: color 0.3s;
}

.upload-zone:hover .upload-icon {
    color: hsl(var(--primary));
}

.upload-text {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    transition: color 0.3s;
}

.upload-zone:hover .upload-text {
    color: hsl(var(--foreground));
}

.file-list {
    max-height: 16rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.file-list::-webkit-scrollbar {
    width: 8px;
}

.file-list::-webkit-scrollbar-track {
    background: hsl(var(--muted));
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb {
    background: hsl(var(--primary));
    border-radius: 4px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    background: hsl(var(--muted) / 0.5);
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.file-item:hover {
    background: hsl(var(--muted));
    border-color: hsl(var(--primary) / 0.5);
}

.file-name {
    flex: 1;
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    width: 100%;
    height: 3rem;
    font-size: 1rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: 0 0 40px hsl(180 85% 55% / 0.3);
    justify-content: center;
}

.btn-primary:hover:not(:disabled) {
    background: hsl(var(--primary) / 0.9);
    box-shadow: 0 0 40px hsl(180 85% 55% / 0.4);
}

.btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: hsl(var(--primary) / 0.2);
    color: hsl(var(--primary));
}

.btn-icon.danger:hover {
    background: hsl(var(--destructive) / 0.2);
    color: hsl(var(--destructive));
}

.icon {
    width: 1rem;
    height: 1rem;
}

.advanced-options {
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--card) / 0.5);
    overflow: hidden;
}

.advanced-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: transparent;
    border: none;
    color: hsl(var(--foreground));
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.advanced-header:hover {
    background: hsl(var(--secondary) / 0.5);
}

.chevron {
    width: 1.25rem;
    height: 1.25rem;
    color: hsl(var(--muted-foreground));
    transition: transform 0.3s;
}

.chevron.open {
    transform: rotate(180deg);
}

.advanced-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
}

.advanced-content.open {
    max-height: 600px;
}

.advanced-inner {
    padding: 1rem;
    padding-top: 0;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-input {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid hsl(var(--border));
    border-radius: 50%;
    background: hsl(var(--secondary));
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.radio-input:hover {
    border-color: hsl(var(--primary));
}

.radio-input:checked {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.2);
}

.radio-input:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: hsl(var(--primary));
}

.radio-label {
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.radio-label:hover {
    color: hsl(var(--primary));
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-input {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid hsl(var(--border));
    border-radius: 50%;
    background: hsl(var(--secondary));
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.checkbox-input:hover {
    border-color: hsl(var(--primary));
}

.checkbox-input:checked {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary));
}

.checkbox-input:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: hsl(var(--primary));
}

.checkbox-label {
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.checkbox-label:hover {
    color: hsl(var(--primary));
}

.status {
    text-align: center;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.empty-state {
    text-align: center;
    padding: 1rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.toast.destructive {
    border-color: hsl(var(--destructive));
    background: hsl(var(--destructive) / 0.1);
}

@media (max-width: 640px) {
    .title {
        font-size: 1.875rem;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}