/* Base styles */
* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #f5f5f5;
    color: #333;
}

/* Typography */
h1 {
    color: #1a1a1a;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

h2 {
    color: #444;
    margin-top: 30px;
    font-size: 1.2em;
}

h3 {
    color: #444;
    margin-top: 25px;
    margin-bottom: 10px;
}

a { color: #0066cc; }
a:hover { text-decoration: underline; }

/* Cards */
.card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

/* Tables */
.config-table {
    width: 100%;
    border-collapse: collapse;
}

.config-table td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.config-table td:first-child {
    font-weight: 600;
    width: 160px;
    color: #666;
}

.config-table code {
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.9em;
    color: #333;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 12px 24px;
    margin: 5px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.button:hover { background: #555; text-decoration: none; }
.button.primary { background: #0066cc; }
.button.primary:hover { background: #0052a3; }
.button.danger { background: #cc0000; }
.button.danger:hover { background: #a30000; }
.button.success { background: #28a745; }
.button.success:hover { background: #218838; }
.button.warning { background: #ffc107; color: #333; }
.button.warning:hover { background: #e0a800; }

/* Status */
.status {
    padding: 12px 16px;
    margin: 20px 0;
    border-radius: 4px;
    font-weight: 500;
}

.status.logged-in {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #b7dfb9;
}

.status.logged-out {
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid #f5c6c4;
}

/* Actions */
.actions { margin: 25px 0; }

.section-title {
    font-size: 1em;
    font-weight: 600;
    color: #666;
    margin: 20px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Notes and boxes */
.note {
    background: #fff8e6;
    border: 1px solid #ffe082;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.note strong { color: #f57c00; }

.comparison-box {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* API config states */
.api-config.not-configured {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

.api-config.configured {
    background: #d4edda;
    border: 1px solid #28a745;
}

/* Code and pre */
pre {
    background: white;
    border: 1px solid #ddd;
    padding: 15px;
    overflow-x: auto;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 0.85em;
}

code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Back link */
.back-link {
    margin-bottom: 20px;
    display: block;
}

/* Method boxes */
.method-box {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.method-box.jwks {
    background: #e8f5e9;
    border: 1px solid #4caf50;
}

.method-box.introspect {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

/* Results */
.result {
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.result.success {
    background: #d4edda;
    border: 1px solid #28a745;
}

.result.error {
    background: #f8d7da;
    border: 1px solid #dc3545;
}

.result h3,
.result h4 { margin-top: 0; }

.time {
    font-size: 1.2em;
    font-weight: bold;
    color: #0066cc;
}

/* Endpoint display */
.endpoint {
    background: #e8e8e8;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-family: monospace;
}

/* Comparison page */
.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.column {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
}

.column h3 { margin-top: 0; }
.column.jwks { border-top: 4px solid #4caf50; }
.column.intro { border-top: 4px solid #ffc107; }

.time-box {
    font-size: 1.5em;
    font-weight: bold;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    margin: 10px 0;
}

.time-box.fast {
    background: #d4edda;
    color: #155724;
}

.time-box.slow {
    background: #fff3cd;
    color: #856404;
}

/* Summary boxes */
.summary {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
}

.summary h2 {
    margin-top: 0;
    color: #1565c0;
}

.summary .big-number {
    font-size: 2em;
    font-weight: bold;
    color: #0d47a1;
}

.summary.recommendation {
    background: #fff8e1;
    border-color: #ff9800;
}

.summary.recommendation h2 {
    color: #e65100;
}

/* Comparison result boxes */
.column .result {
    padding: 15px;
    margin: 15px 0;
}

.column .result.success {
    background: #e8f5e9;
    border: 1px solid #4caf50;
}

.column .result.error {
    background: #ffebee;
    border: 1px solid #f44336;
}

.column pre {
    background: #f5f5f5;
    font-size: 0.8em;
    max-height: 300px;
    overflow-y: auto;
}

/* Meta table */
.meta-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.meta-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.meta-table td:first-child {
    font-weight: 600;
    width: 120px;
    background: #fafafa;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

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

    .button {
        display: block;
        text-align: center;
        margin: 10px 0;
    }
}
