/* Event Publisher Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
}

/* Navigation */
.nav {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.btn-primary-small {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.security-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Main Section */
.main-section {
    padding: 3rem 0;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Panel */
.panel {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.panel-header {
    margin-bottom: 2rem;
}

.panel-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.panel-header p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.label-text {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.label-required {
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 500;
}

.label-optional {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
    font-family: 'Courier New', monospace;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.input-hint {
    font-size: 0.813rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button input {
    flex: 1;
}

.btn-icon {
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.3s;
}

.btn-icon:hover {
    background: var(--gray-200);
}

/* Tags */
#tagsList {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tag-item input {
    flex: 1;
}

.btn-remove-tag {
    padding: 0.5rem 0.75rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-publish {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-publish {
    width: 100%;
    background: var(--success);
    color: white;
    font-size: 1.125rem;
}

.btn-publish:hover {
    background: #059669;
    transform: translateY(-2px);
}

.button-group {
    display: flex;
    gap: 1rem;
}

.button-group button {
    flex: 1;
}

/* Preview Section */
.preview-section {
    margin-bottom: 2rem;
    position: relative;
}

.preview-section h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.json-preview {
    background: var(--gray-900);
    color: #10b981;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 0.75rem;
}

.btn-copy {
    width: 100%;
    padding: 0.625rem;
    background: var(--gray-700);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-copy:hover {
    background: var(--gray-800);
}

.validation-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.validation-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.validation-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Event Details */
.event-details {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.event-details h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.813rem;
}

.detail-value {
    font-family: 'Courier New', monospace;
    font-size: 0.813rem;
    color: var(--gray-900);
    word-break: break-all;
}

/* Publish Section */
.publish-section {
    margin-top: 2rem;
}

.publish-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.relay-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.relay-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.relay-checkbox:hover {
    background: var(--gray-100);
}

.relay-checkbox input[type="checkbox"] {
    cursor: pointer;
}

.custom-relay {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.custom-relay input {
    flex: 1;
}

/* Publish Results */
.publish-results {
    margin-top: 2rem;
}

.publish-results h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.result-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.result-item.success {
    background: #d1fae5;
    color: #065f46;
}

.result-item.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Documentation Section */
.docs-section {
    padding: 3rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: var(--gray-900);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.doc-card {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.doc-card h3 {
    font-size: 1.063rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.doc-card p {
    color: var(--gray-700);
    margin-bottom: 1rem;
    font-size: 0.938rem;
}

.code-example {
    background: var(--gray-900);
    color: #10b981;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.813rem;
    overflow-x: auto;
}

/* FAQ Section */
.faq-section {
    padding: 3rem 0;
}

.faq-grid {
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.faq-item h3 {
    color: var(--primary);
    font-size: 1.063rem;
    margin-bottom: 0.75rem;
}

.faq-item p {
    color: var(--gray-700);
    line-height: 1.7;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gray-900);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-700);
    color: var(--gray-400);
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }

    .relay-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .panel {
        padding: 1.5rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .docs-grid {
        grid-template-columns: 1fr;
    }
}