:root {
    --bg-color: #1a1a1a;
    --card-bg: #252525;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-color: #007bff;
    --accent-hover: #0056b3;
    --border-color: #333333;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Header */
header {
    background: #111;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-color), #6610f2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Main Content */
main {
    flex: 1;
    padding: 3rem 0;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Upload Section */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.upload-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.upload-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.upload-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.upload-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #444;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover {
    border-color: var(--accent-color);
    background: rgba(0, 123, 255, 0.05);
}

.drop-zone.active {
    border-color: var(--accent-color);
    background: rgba(0, 123, 255, 0.1);
    transform: scale(1.02);
}

.drop-zone-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.7;
}

.drop-zone h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.drop-zone p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.file-input {
    display: none;
}

.upload-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

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

/* File List */
.file-list {
    margin-top: 2rem;
    display: none;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #333;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--accent-color);
    transition: all 0.2s;
}

.file-item:hover {
    background: #3a3a3a;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 1.5rem;
}

.file-details h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.file-details span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.file-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(0, 123, 255, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(0, 123, 255, 0.3);
}

.status-analyzing {
    color: var(--warning-color);
    border-color: rgba(255, 193, 7, 0.3);
    background: rgba(255, 193, 7, 0.1);
}

.status-clean {
    color: var(--success-color);
    border-color: rgba(40, 167, 69, 0.3);
    background: rgba(40, 167, 69, 0.1);
}

.status-threat {
    color: var(--danger-color);
    border-color: rgba(220, 53, 69, 0.3);
    background: rgba(220, 53, 69, 0.1);
}

/* Analysis Results */
.results-container {
    margin-top: 3rem;
    display: none;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.result-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #333;
}

.metric:last-child {
    border-bottom: none;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.metric-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Footer */
footer {
    background: #111;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Recent Files Table */
.recent-files-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.recent-files-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.recent-files-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recent-files-title .title-icon {
    font-size: 1.5rem;
}

.recent-files-table {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.recent-files-table th {
    background: #333;
    color: var(--text-secondary);
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.recent-files-table td {
    padding: 1rem;
    border-bottom: 1px solid #333;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.recent-files-table tr:hover {
    background: #2f2f2f;
}

.threat-score {
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
}

.threat-low {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.threat-medium {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.threat-high {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.sensitive-data-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.sensitive-yes {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.sensitive-no {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.file-name-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.timestamp-cell {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.no-data {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

/* Results Page Specific Styles */
.results-header {
    margin-bottom: 2rem;
}

.results-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* File Analysis Card */
.analysis-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* File Icon Section */
.file-icon-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
}

.file-icon-large {
    font-size: 6rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.file-type-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.file-size-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* JSON Results Section */
.json-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.json-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

.json-title {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.json-content {
    color: #d4d4d4;
    white-space: pre-wrap;
    word-break: break-all;
}

.json-key {
    color: #569cd6;
}

.json-string {
    color: #ce9178;
}

.json-number {
    color: #b5cea8;
}

.json-boolean {
    color: #569cd6;
}

.json-null {
    color: #569cd6;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-clean {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-threat {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.status-warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .upload-card {
        padding: 1.5rem;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .drop-zone-icon {
        font-size: 3rem;
    }

    .nav-links {
        display: none;
    }

    .analysis-card {
        grid-template-columns: 1fr;
    }
}