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

/* Base */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #f5f7fa;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

    .header h1 {
        font-size: 24px;
        font-weight: 600;
        color: #1a202c;
    }

.analyze-btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .analyze-btn:hover:not(:disabled) {
        background: #3182ce;
    }

    .analyze-btn:disabled {
        background: #a0aec0;
        cursor: not-allowed;
    }

.spinner {
    animation: spin 1s linear infinite;
    font-size: 16px;
}

.hidden {
    display: none;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Status Bar */
.status-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

    .status-item label {
        font-weight: 500;
        color: #4a5568;
    }

.status-value {
    font-weight: 600;
    color: #1a202c;
    font-size: 13px;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

    .card.full-width {
        grid-column: 1 / -1;
    }

    .card h2 {
        background: #2d3748;
        color: white;
        padding: 16px 24px;
        font-size: 16px;
        font-weight: 600;
        margin: 0;
    }

.card-content {
    padding: 20px 24px;
}

/* Info Grid */
.info-grid {
    display: grid;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

    .info-item label {
        font-weight: 500;
        color: #4a5568;
        min-width: 90px;
    }

    .info-item span {
        font-weight: 500;
        color: #1a202c;
        text-align: right;
        word-break: break-all;
        max-width: 250px;
    }

.mono {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
}

/* Security Grid */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

    .security-item label {
        font-weight: 500;
        color: #4a5568;
        font-size: 13px;
    }

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .badge.safe {
        background: #c6f6d5;
        color: #22543d;
    }

    .badge.danger {
        background: #fed7d7;
        color: #742a2a;
    }

    .badge.warning {
        background: #fefcbf;
        color: #744210;
    }

    .badge.info {
        background: #bee3f8;
        color: #2a4365;
    }

    .badge.neutral {
        background: #e2e8f0;
        color: #4a5568;
    }

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 16px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

    .tab-btn:hover {
        color: #4a5568;
    }

    .tab-btn.active {
        color: #4299e1;
        border-bottom-color: #4299e1;
    }

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
}

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

.json-display {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    color: #2d3748;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .status-bar {
        grid-template-columns: 1fr;
    }

    .main-content {
        grid-template-columns: 1fr;
    }

    .security-grid {
        grid-template-columns: 1fr;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

        .info-item span {
            text-align: left;
            max-width: 100%;
        }

    .security-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-success {
    color: #38a169;
}

.text-danger {
    color: #e53e3e;
}

.text-warning {
    color: #d69e2e;
}

.text-info {
    color: #3182ce;
}

.font-mono {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}
