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

:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #0f3460;
    --highlight: #e94560;
    --text: #eaeaea;
    --text-muted: #a0a0a0;
    --success: #00d9ff;
    --border: #2a2a4a;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    padding: 3rem 0;
    animation: fadeInDown 0.8s ease;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--text) 0%, var(--highlight) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

#upload-section {
    margin: 2rem 0;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.upload-area {
    border: 3px dashed var(--border);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(233, 69, 96, 0.1), transparent);
    transition: left 0.5s;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: var(--highlight);
    background: rgba(233, 69, 96, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(233, 69, 96, 0.2);
}

.upload-area.drag-over {
    border-color: var(--success);
    background: rgba(0, 217, 255, 0.1);
    transform: scale(1.02);
}

.upload-area p {
    font-size: 1.2rem;
    color: var(--text-muted);
    pointer-events: none;
}

#loading {
    text-align: center;
    padding: 3rem;
    animation: fadeIn 0.3s ease;
}

#loading p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--highlight);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

#results-section {
    animation: fadeInUp 0.5s ease;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--highlight);
    background: rgba(233, 69, 96, 0.1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--highlight);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.content-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.content-card h3 {
    color: var(--highlight);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content-card p, .content-card li {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.content-card ul {
    list-style: none;
    padding-left: 0;
}

.content-card li::before {
    content: '→';
    color: var(--highlight);
    margin-right: 0.5rem;
}

.entity-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.entity-tag {
    background: var(--accent);
    color: var(--text);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.entity-tag:hover {
    background: var(--highlight);
    transform: translateY(-2px);
}

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

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.title-section {
    text-align: left;
    flex: 1;
}

.donate-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--highlight) 0%, #ff6b6b 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
    border: 2px solid transparent;
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.donate-btn svg {
    fill: currentColor;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.results-header .tabs {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: var(--highlight);
    border-color: var(--highlight);
    transform: translateY(-1px);
}

.export-btn svg {
    stroke: currentColor;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .title-section {
        text-align: center;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .export-btn {
        justify-content: center;
    }
}