/* OpenPII Watcher - Modern UI Styling */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-box {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--warning-color);
}

.info-box h3 {
    margin-bottom: 0.5rem;
    color: var(--warning-color);
}

.supported-platforms {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.supported-platforms h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.platforms {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.platform-tag {
    background: var(--bg-color);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

/* Input Section */
.input-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.input-section h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.url-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    transition: border-color 0.3s;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.analyze-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.analyze-btn:hover {
    background: var(--primary-dark);
}

.analyze-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}

.examples {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.examples p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.example-btn {
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    font-size: 0.85rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s;
}

.example-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

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

/* Results Section */
.results-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.results-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    border: 2px solid var(--border-color);
}

.stat-card.risk-level {
    border-color: var(--secondary-color);
}

.stat-card.risk-high {
    border-color: var(--danger-color);
}

.stat-card.risk-medium {
    border-color: var(--warning-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card.risk-level .stat-number {
    color: var(--secondary-color);
}

.stat-card.risk-high .stat-number {
    color: var(--danger-color);
}

.stat-card.risk-medium .stat-number {
    color: var(--warning-color);
}

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

.pii-breakdown {
    margin-bottom: 2rem;
}

.pii-breakdown h3 {
    margin-bottom: 1rem;
}

#pii-details {
    display: grid;
    gap: 1rem;
}

.pii-item {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
}

.pii-item h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.pii-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.pii-tag {
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    font-family: monospace;
}

.content-preview {
    margin-bottom: 2rem;
}

.content-preview h3 {
    margin-bottom: 1rem;
}

#content-display {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.recommendations {
    background: #fef3c7;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--warning-color);
}

.recommendations h3 {
    margin-bottom: 1rem;
    color: #92400e;
}

#recommendations-list {
    list-style-position: inside;
    color: #78350f;
}

#recommendations-list li {
    margin-bottom: 0.5rem;
}

/* Metrics Section */
.metrics-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.metrics-section h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

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

.metrics-table {
    overflow-x: auto;
}

.metrics-table table {
    width: 100%;
    border-collapse: collapse;
}

.metrics-table th,
.metrics-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.metrics-table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-primary);
}

.metrics-table tbody tr:hover {
    background: var(--bg-color);
}

.metric-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.5s ease;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 0.5rem;
}

footer em {
    color: var(--warning-color);
    font-weight: 500;
}

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

    .info-section {
        grid-template-columns: 1fr;
    }

    .input-group {
        flex-direction: column;
    }

    .results-summary {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2rem;
    }
}

