:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #64748b;
    --secondary-hover: #475569;
    --bg-color: #0c0e12;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --glass-blur: blur(20px);
    --line-height: 1.5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 10%, #1e1b4b 0%, #0c0e12 50%),
                radial-gradient(circle at 90% 90%, #312e81 0%, #0c0e12 50%);
    z-index: -1;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, var(--bg-color) 60%, transparent);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
    pointer-events: none;
}

footer > * {
    pointer-events: auto;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--success);
    padding: 0.8rem 1.8rem;
    border-radius: 3rem;
    font-size: 0.85rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.6;
}

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

.nav-back {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 2rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.6rem 1.25rem;
    border-radius: 3rem;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
}

.main-icon {
    width: 50px;
    height: 50px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.pulse-soft {
    animation: pulse 4s ease-in-out infinite;
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    line-height: var(--line-height);
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 2.5rem;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hidden { display: none !important; }

/* Drop Zone (Smaller) */
.drop-zone {
    border: 3px dashed var(--border-color);
    border-radius: 2rem;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.drop-zone:hover, .drop-zone.hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.upload-icon {
    width: 50px;
    height: 50px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.drop-content h3 { font-size: 1.15rem; }
.drop-content p { color: var(--text-secondary); font-size: 0.9rem; }

/* Summary Card */
.summary-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-info {
    display: flex;
    gap: 3rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-secondary); font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.stat-value { font-size: 2.5rem; font-weight: 800; color: var(--text-primary); line-height: 1; }

.status-msg {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.summary-actions {
    display: flex;
    gap: 1rem;
}

/* Result Summary */
.result-summary {
    background: rgba(0,0,0,0.25);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.tree-display {
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Inter', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: pre;
    padding: 1rem;
    line-height: 1.4;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

textarea.hidden { display: none; }

.btn-primary { 
    background: var(--primary);
    color: white;
    padding: 1.1rem;
    border-radius: 1rem;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    transition: all 0.2s;
}

.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 1.25rem;
    cursor: pointer;
    font-weight: 600;
}

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

@keyframes pulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.4)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.6)); transform: scale(1.05); }
}
