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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* Educational Elements */
.info-banner {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    border-left: 4px solid #2196f3;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.95em;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-banner strong {
    color: #1565c0;
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.explainer-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.85em;
    color: #475569;
    margin: 10px 0;
    line-height: 1.4;
}

.explainer-box strong {
    color: #334155;
}

.status-note {
    font-size: 0.75em;
    color: #64748b;
    margin-top: 4px;
    display: block;
    line-height: 1.2;
}

.payload-preview {
    background: #1e293b;
    color: #e2e8f0;
    padding: 10px;
    border-radius: 6px;
    font-family: 'Consolas', monospace;
    font-size: 0.8em;
    margin-top: 10px;
    border: 1px solid #334155;
    white-space: pre-wrap;
}

.payload-label {
    font-size: 0.7em;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.5px;
    margin-top: 15px;
    display: block;
}

.compliance-note {
    border-top: 1px solid #f0f0f0;
    margin-top: 15px;
    padding-top: 10px;
    font-style: italic;
    font-size: 0.85em;
    color: #7c3aed;
}

footer {
    margin-top: 50px;
    padding: 30px;
    background: #1e293b;
    color: #f8fafc;
    border-radius: 12px;
    text-align: center;
    font-size: 1em;
    line-height: 1.6;
}

.footer-highlight {
    color: #38bdf8;
    font-weight: 600;
}

/* User Tabs */
.user-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.tab-btn {
    flex: 1;
    padding: 20px;
    border: none;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    color: #666;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border: 2px solid transparent;
}

.tab-btn small {
    font-weight: normal;
    font-size: 0.8em;
    opacity: 0.7;
}

.tab-btn:hover {
    transform: translateY(-3px);
}

.tab-btn.active.alice {
    background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 100%);
    border-color: #00bcd4;
    color: #00838f;
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.2);
}

.tab-btn.active.bob {
    background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
    border-color: #e57373;
    color: #c62828;
    box-shadow: 0 8px 20px rgba(229, 115, 115, 0.2);
}

/* Views */
.user-view {
    display: none;
    animation: fadeIn 0.3s;
}

.user-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-top: 5px solid #ccc;
}

.card.ingest {
    border-top-color: #4caf50;
}

.card.search {
    border-top-color: #2196f3;
}

.card.process {
    border-top-color: #9c27b0;
}

.card h2 {
    margin-bottom: 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Process Log */
.process-log {
    background: #2d2d2d;
    color: #00ff00;
    font-family: 'Consolas', 'Monaco', monospace;
    padding: 15px;
    border-radius: 8px;
    height: 300px;
    overflow-y: auto;
    font-size: 0.9em;
    line-height: 1.5;
}

.log-entry {
    margin-bottom: 5px;
    border-bottom: 1px solid #444;
    padding-bottom: 2px;
}

.log-time {
    color: #888;
    font-size: 0.8em;
    margin-right: 10px;
}

.log-icon {
    display: inline-block;
    width: 20px;
    text-align: center;
}

/* Form Elements */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9em;
    color: #555;
}

input,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.2s;
}

input:focus,
select:focus {
    border-color: #667eea;
    background: white;
    outline: none;
}

button.action-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s;
    color: white;
}

.btn-ingest {
    background: linear-gradient(to right, #4caf50, #43a047);
}

.btn-search {
    background: linear-gradient(to right, #2196f3, #1e88e5);
}

.btn-reveal {
    background: #ff9800;
    padding: 5px 12px;
    font-size: 0.85em;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    color: white;
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

/* Search Results */
.search-result {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.gate-status {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.85em;
}

.gate-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.gate-passed {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.gate-failed {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.gate-output-box {
    margin-top: 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.gate-label {
    background: #f5f5f5;
    padding: 4px 10px;
    font-size: 0.75em;
    font-weight: bold;
    color: #666;
    border-bottom: 1px solid #eee;
    text-transform: uppercase;
}

.gate-content {
    padding: 10px;
    font-size: 0.9em;
    font-family: 'Segoe UI', sans-serif;
}

.gate-content.encrypted {
    font-family: 'Consolas', monospace;
    color: #d32f2f;
    background: #fffbfb;
}

.gate-content.decrypted {
    color: #2e7d32;
    background: #fafffa;
}

.tab-btn.alice {
    border-left: 5px solid #2ecc71;
}

.tab-btn.bob {
    border-left: 5px solid #e74c3c;
}

.tab-btn.charlie {
    border-left: 5px solid #9b59b6;
}

.tab-btn.active {
    background: #fff;
    opacity: 1;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #333;
}

.tab-btn {
    padding: 10px 20px;
    background: #eee;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    opacity: 0.7;
    margin-bottom: 5px;
    text-align: left;
}