/* ===== CSS Variables & Reset ===== */
:root {
    /* Discord Dark Theme Colors */
    --bg-primary: #202225;
    --bg-secondary: #2f3136;
    --bg-card: #36393f;
    --bg-hover: #40444b;
    --border-color: #40444b;
    --border-focus: #5865F2;

    --text-primary: #dcddde;
    --text-secondary: #b9bbbe;
    --text-muted: #72767d;

    /* Discord Blurple and accent colors */
    --accent-blue: #5865F2;
    --accent-blue-hover: #4752c4;
    --accent-purple: #5865F2;
    --accent-pink: #eb459e;
    --accent-green: #3ba55c;
    --accent-red: #ed4245;
    --accent-orange: #faa61a;

    --gradient-primary: linear-gradient(135deg, #5865F2 0%, #5865F2 100%);
    --gradient-button: linear-gradient(135deg, #5865F2 0%, #4752c4 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(88, 101, 242, 0.1) 0%, transparent 70%);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(88, 101, 242, 0.2);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 8px;
    --radius-xl: 16px;

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 600px;
    background: var(--gradient-glow);
    pointer-events: none;
    z-index: -1;
}

/* ===== Container ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 48px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--accent-blue);
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

/* ===== Upload Section ===== */
.upload-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.upload-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-area {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.upload-area:hover {
    border-color: var(--accent-blue);
    background: var(--bg-hover);
}

.upload-area.dragover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: var(--shadow-glow);
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--gradient-button);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.4);
}

.upload-btn:active {
    transform: translateY(0);
}

.upload-icon {
    width: 18px;
    height: 18px;
}

.upload-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== File Progress ===== */
.file-progress {
    display: none;
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.file-progress.active {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.file-info-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name-display {
    color: var(--accent-blue);
    font-weight: 500;
    font-size: 0.95rem;
}

.file-size-display {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.remove-file-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.remove-file-btn:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--text-primary);
}

.progress-bar {
    height: 6px;
    background: var(--bg-hover);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    width: 0%;
    transition: width var(--transition-normal);
}

/* ===== Output Section ===== */
.output-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
}

.output-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.output-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 80px;
}

.output-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.output-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
}

.output-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.output-item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    color: var(--accent-green);
}

.output-item-icon svg {
    width: 20px;
    height: 20px;
}

.output-item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.output-item-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent-green);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.download-btn svg {
    width: 16px;
    height: 16px;
}

.empty-state {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    opacity: 0.5;
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(59, 130, 246, 0.15);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== File Details Card ===== */
.file-details-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
}

.java-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.java-icon svg {
    width: 100%;
    height: 100%;
}

.file-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-row {
    display: flex;
    gap: 12px;
}

.meta-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-width: 80px;
}

.meta-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===== Obfuscation Options ===== */
.obfuscation-options {
    margin-bottom: 28px;
}

.options-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.option-group {
    margin-bottom: 20px;
}

.option-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.option-hint {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 4px;
}

.obfuscator-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-md);
}

.badge-text {
    font-weight: 600;
    font-size: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-check {
    color: var(--accent-green);
    font-size: 1.1rem;
}

.exclusions-input {
    width: 100%;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    resize: vertical;
    transition: all var(--transition-fast);
}

.exclusions-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.exclusions-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ===== Modal Actions ===== */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-primary {
    background: var(--gradient-button);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ===== Processing Modal ===== */
.processing-modal {
    text-align: center;
    max-width: 400px;
}

.processing-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.processing-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.processing-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.processing-progress {
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
}

.processing-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .container {
        padding: 24px 16px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .upload-section,
    .output-section {
        padding: 20px;
    }

    .upload-area {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
    }

    .modal {
        padding: 24px;
    }

    .file-details-card {
        flex-direction: column;
        text-align: center;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Libs Upload ===== */
.libs-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.libs-upload-area:hover {
    border-color: var(--accent-purple);
}

.libs-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #5865F2;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.libs-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.libs-icon {
    width: 16px;
    height: 16px;
}

.libs-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.libs-text.active {
    color: var(--accent-green);
}

.libs-files-list {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    max-height: 120px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.libs-files-list.active {
    display: flex;
}

.libs-file-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--accent-purple);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.libs-file-tag svg {
    width: 12px;
    height: 12px;
    color: var(--accent-purple);
}

.libs-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent-red);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: auto;
}

.libs-clear-btn:hover {
    background: #dc2626;
}

/* ===== Header Layout ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.header-left,
.header-right {
    flex: 1;
}

.header-center {
    flex: 2;
    text-align: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}

/* ===== Discord Link ===== */
.discord-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.discord-link:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(88, 101, 242, 0.4);
}

.discord-icon {
    width: 20px;
    height: 20px;
}

/* ===== Notice Banner ===== */
.notice-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.notice-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent-blue);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 32px 20px;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer p {
    margin-bottom: 8px;
}

.footer-sub {
    font-size: 0.85rem;
}

.credit-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.credit-link:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

/* ===== Responsive Header ===== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
    }

    .header-left,
    .header-right {
        order: 2;
    }

    .header-center {
        order: 1;
    }

    .notice-banner {
        flex-direction: column;
        text-align: center;
    }
}