/* OVOCHAIN Demo - Styles */

:root {
    --primary-color: #2563eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    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-color);
    line-height: 1.6;
}

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

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

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

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

/* Status Bar */
.status-bar {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.status-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.status-label {
    font-weight: 600;
}

.identity-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.identity-id {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Sections */
.sections {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.card-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
    display: inline-block;
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card-body {
    padding: 1.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

input[type="text"],
input[type="file"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* File Input */
.file-input-wrapper {
    margin-top: 0.5rem;
}

.image-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

#preview-name {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

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

.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    float: right;
}

/* Results */
.result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
}

.result-success {
    background: #f0fdf4;
    border: 2px solid var(--success-color);
    padding: 1rem;
    border-radius: 8px;
}

.result-error {
    background: #fef2f2;
    border: 2px solid var(--error-color);
    padding: 1rem;
    border-radius: 8px;
}

.result-details {
    margin-top: 1rem;
}

.result-details p {
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-error {
    background: var(--error-color);
    color: white;
}

/* Decrypted Image */
.decrypted-image {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
}

.decrypted-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Error Details */
.error-details {
    margin-top: 1rem;
}

.error-explanation {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fee2e2;
    border-left: 4px solid var(--error-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Registry Viewer */
.registry-viewer {
    margin-top: 2rem;
}

.registry-list {
    display: grid;
    gap: 0.75rem;
}

.registry-item {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.registry-item strong {
    color: var(--primary-color);
}

.registry-item .monospace {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    word-break: break-all;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

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

.tech-stack {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.monospace {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    word-break: break-all;
}

code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
}

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

    header h1 {
        font-size: 2rem;
    }

    .card-body {
        padding: 1rem;
    }
}
