@font-face {
	font-family: 'SUITE Variable';
	font-weight: 300 900;
	src: url('../fonts/SUITE-Variable.woff2') format('woff2-variations');
}

:root {
    --bg-primary: #f0f4ff;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-card-hover: rgba(255, 255, 255, 0.88);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a8;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-subtle: rgba(99, 102, 241, 0.08);
    --accent-glow: rgba(99, 102, 241, 0.25);
    --border: rgba(99, 102, 241, 0.15);
    --border-subtle: rgba(0, 0, 0, 0.06);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-mesh:
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f0f1a;
        --bg-secondary: #1a1a2e;
        --bg-card: rgba(30, 30, 50, 0.72);
        --bg-card-hover: rgba(35, 35, 58, 0.88);
        --text-primary: #e8e8f0;
        --text-secondary: #a8a8c8;
        --text-muted: #6868a0;
        --accent: #818cf8;
        --accent-light: #a5b4fc;
        --accent-subtle: rgba(129, 140, 248, 0.1);
        --accent-glow: rgba(129, 140, 248, 0.2);
        --border: rgba(129, 140, 248, 0.2);
        --border-subtle: rgba(255, 255, 255, 0.06);
        --success-bg: rgba(16, 185, 129, 0.15);
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
        --gradient-mesh:
            radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 100%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
            radial-gradient(ellipse at 60% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    }
}

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0s !important;
        transition-duration: 0s !important;
    }
}

body {
    font-family: 'SUITE Variable', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--gradient-mesh);
    z-index: 0;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 100dvh;
    justify-content: center;
}

@media (min-width: 640px) {
    .container {
        min-height: auto;
        padding: 40px 20px;
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
    flex-shrink: 0;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
}

/* Tab Switch */
.tab-container {
    display: flex;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    position: relative;
}

.tab-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--accent);
    border-radius: calc(var(--radius-sm) - 2px);
    transition: transform var(--transition);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.tab-slider.right {
    transform: translateX(100%);
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: calc(var(--radius-sm) - 2px);
    transition: color var(--transition);
    position: relative;
    z-index: 1;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn.active {
    color: white;
}

.tab-btn:not(.active):hover {
    color: var(--text-primary);
}

.tab-icon {
    font-size: 16px;
    line-height: 1;
}

/* Card */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Drop Zone */
.drop-zone {
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed var(--border);
    border-radius: calc(var(--radius) - 1px);
    margin: 12px;
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    min-height: 220px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.drop-zone.dragover {
    border-style: solid;
    transform: scale(1.01);
}

.drop-zone-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    transition: all var(--transition);
}

.drop-zone:hover .drop-zone-icon,
.drop-zone.dragover .drop-zone-icon {
    background: var(--accent-glow);
    transform: scale(1.1);
}

.drop-zone-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.drop-zone-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.drop-zone-desc .link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.drop-zone-desc .link:hover {
    text-decoration: underline;
}

.file-input {
    display: none;
}

/* Text Tab */
.text-section {
    padding: 20px;
}

.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-label-icon {
    font-size: 14px;
}

textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: all var(--transition);
    outline: none;
}

textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea::placeholder {
    color: var(--text-muted);
}

.btn-row {
    display: flex;
    gap: 8px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #a855f7);
    color: white;
    box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--accent-subtle);
    color: var(--accent);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--accent-glow);
}

/* Result */
.result-area {
    margin-top: 16px;
}

.result-box {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    padding-right: 48px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    word-break: break-all;
    min-height: 60px;
    white-space: pre-wrap;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: none;
    background: var(--accent-subtle);
    color: var(--accent);
    border-radius: var(--radius-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition);
}

.copy-btn:hover {
    background: var(--accent-glow);
}

.copy-btn.copied {
    background: var(--success-bg);
    color: var(--success);
}

/* Comparison */
.comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.comparison-col {
    text-align: center;
    overflow: hidden;
}

.comparison-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.comparison-text {
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
}

.comparison-text.before {
    color: var(--danger);
    opacity: 0.7;
}

.comparison-text.after {
    color: var(--success);
    font-weight: 600;
}

.comparison-arrow {
    color: var(--text-muted);
    font-size: 18px;
}

/* File list */
.file-list {
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    animation: fadeSlideIn 0.3s ease forwards;
    opacity: 0;
}

.file-item:last-child {
    border-bottom: none;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-icon {
    font-size: 18px;
    flex-shrink: 0;
}

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

.file-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-name-fixed {
    font-size: 12px;
    color: var(--success);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-status {
    font-size: 18px;
    flex-shrink: 0;
}

.file-actions-bar {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
    background: var(--accent-subtle);
}

.file-count {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-xs);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 24px;
    padding: 0 20px;
}

.footer-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Info banner */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: var(--accent-subtle);
    border-radius: var(--radius-sm);
    margin: 0 20px 0;
    border: 1px solid var(--border);
}

.info-banner-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.info-banner-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    white-space: nowrap;
    font-family: inherit;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Drag overlay */
.drag-overlay {
    position: fixed;
    inset: 0;
    background: rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
}

.drag-overlay.show {
    display: flex;
}

.drag-overlay-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    padding: 48px 64px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.drag-overlay-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.drag-overlay-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Panel visibility */
.panel {
    display: none;
}

.panel.active {
    display: block;
}

/* Scrollbar */
.file-list::-webkit-scrollbar {
    width: 6px;
}
.file-list::-webkit-scrollbar-track {
    background: transparent;
}
.file-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* How-it-works */
.how-section {
    margin-top: 20px;
}

.how-toggle {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: all var(--transition);
}

.how-toggle:hover {
    border-color: var(--border);
    color: var(--text-primary);
}

.how-toggle-arrow {
    transition: transform var(--transition);
    font-size: 12px;
}

.how-toggle.open .how-toggle-arrow {
    transform: rotate(180deg);
}

.how-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
}

.how-content.open {
    max-height: 400px;
}

.how-inner {
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.how-step {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.how-step:last-child {
    margin-bottom: 0;
}

.how-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-subtle);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}