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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #fafafa;
    height: 100vh;
    color: #1a1a1a;
    line-height: 1.6;
    overflow: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 20px 16px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: left;
    margin-bottom: 32px;
    flex-shrink: 0;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    font-size: 2.5rem;
}

.typing-text {
    display: inline-block;
    min-width: 200px;
}

.cursor {
    animation: blink 1s infinite;
    color: #1a1a1a;
    font-weight: 300;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.header p {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
    margin-left: 48px;
}

.main {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.08);
    border: 1px solid #e5e5e5;
    overflow-y: auto;
    min-height: 0;
}

.drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #fafafa;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: #1a1a1a;
    background: #f5f5f5;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 24px;
    opacity: 0.4;
}

.drop-zone h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.drop-zone p {
    color: #666;
    font-size: 0.95rem;
}

.drop-zone small {
    display: block;
    margin-top: 16px;
    color: #999;
    font-size: 0.85rem;
}

.browse-btn {
    color: #1a1a1a;
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-weight: 500;
}

.browse-btn:hover {
    opacity: 0.7;
}

.loading-section {
    text-align: center;
    padding: 60px 40px;
}

.loading-section p {
    color: #666;
    font-size: 0.95rem;
    margin-top: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e5;
    border-top: 3px solid #1a1a1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    overflow: hidden;
    margin: 24px auto 0;
}

.progress-fill {
    height: 100%;
    background: #1a1a1a;
    width: 0%;
    transition: width 0.3s ease;
}

.results-section {
    animation: fadeIn 0.5s ease-in;
}

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e5e5;
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.secondary-btn {
    padding: 10px 20px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.secondary-btn:hover {
    background: #333;
}

.results-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
}

.confidence-meter {
    text-align: center;
    padding: 24px;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

.confidence-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(#1a1a1a 0deg, #1a1a1a 180deg, #e5e5e5 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    position: relative;
}

.confidence-circle::before {
    content: '';
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    position: absolute;
}

.confidence-circle span {
    position: relative;
    z-index: 1;
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
}

.confidence-label {
    margin-top: 8px;
}

.confidence-label strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.confidence-label p {
    font-size: 0.85rem;
    color: #666;
    font-weight: 400;
}

.details-panel h3 {
    margin-bottom: 16px;
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 600;
}

.artifacts-list {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #e5e5e5;
}

.artifact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.artifact-item:last-child {
    margin-bottom: 0;
}

.artifact-item::before {
    content: '•';
    margin-right: 12px;
    color: #1a1a1a;
    font-weight: bold;
}

.file-info {
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.file-info p {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #666;
}

.file-info p:last-child {
    margin-bottom: 0;
}

.file-info strong {
    color: #1a1a1a;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

.footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    color: #999;
    font-size: 0.75rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }

    .header {
        margin-bottom: 40px;
    }

    .header h1 {
        font-size: 2.5rem;
        gap: 8px;
    }

    .title-icon {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
        margin-left: 40px;
    }

    .main {
        padding: 32px 24px;
    }

    .drop-zone {
        padding: 60px 24px;
    }

    .results-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .results-header h2 {
        font-size: 1.25rem;
    }
}
