/* Event Inspector 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, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 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.95;
    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);
}

/* Inspector Layout */
.inspector-section {
    padding: 3rem 0;
}

.inspector-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.panel-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.panel-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Input Methods */
.input-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.method-btn {
    padding: 1rem;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.method-btn:hover {
    background: var(--gray-200);
}

.method-btn.active {
    background: white;
    border-color: var(--primary);
}

.method-icon {
    font-size: 1.5rem;
}

.method-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Form Elements */
.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.938rem;
}

.event-input,
.text-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.event-input:focus,
.text-input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.btn-action {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    background: var(--gray-200);
}

/* Inspect Button */
.btn-inspect {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1.5rem;
}

.btn-inspect:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Examples */
.examples-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.examples-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.btn-example {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    font-size: 0.813rem;
    cursor: pointer;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.btn-example:hover {
    background: var(--gray-200);
}

/* Results */
.results-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-600);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result Sections */
.result-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.result-section:last-child {
    border-bottom: none;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.section-icon {
    font-size: 1.25rem;
}

/* Verification Status */
.verification-section {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.verification-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
}

.verification-status.valid {
    background: #d1fae5;
    border-left: 4px solid var(--success);
}

.verification-status.invalid {
    background: #fee2e2;
    border-left: 4px solid var(--danger);
}

.verification-icon {
    font-size: 2rem;
}

.verification-text {
    flex: 1;
}

.verification-text strong {
    display: block;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

/* Info Grid */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.info-label {
    flex: 0 0 150px;
    font-weight: 600;
    color: var(--gray-700);
}

.info-value {
    flex: 1;
    color: var(--gray-900);
    word-break: break-all;
}

.info-value.mono {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.info-value.copyable {
    cursor: pointer;
    position: relative;
}

.info-value.copyable:hover {
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: 4px;
}

.info-value.copyable:hover::after {
    content: '📋';
    margin-left: 0.5rem;
}

/* Content Box */
.content-box {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.content-box pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: system-ui;
    font-size: 0.938rem;
    line-height: 1.6;
    color: var(--gray-800);
}

/* Tags List */
.tags-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tag-item {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.tag-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.tag-type {
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.tag-description {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.tag-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag-value {
    padding: 0.25rem 0.75rem;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.813rem;
    word-break: break-all;
}

.empty-state {
    text-align: center;
    color: var(--gray-600);
    font-style: italic;
    padding: 2rem;
}

/* JSON Box */
.json-box {
    background: var(--gray-900);
    color: #f8f8f2;
    border-radius: 8px;
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    position: relative;
}

.json-box pre {
    font-family: 'Courier New', monospace;
    font-size: 0.813rem;
    line-height: 1.6;
    margin: 0;
}

.btn-copy-json {
    padding: 0.5rem 1rem;
    background: var(--gray-700);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.813rem;
    cursor: pointer;
}

.btn-copy-json:hover {
    background: var(--gray-600);
}

/* Reference Section */
.reference-section {
    padding: 4rem 0;
    background: white;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 3rem;
}

.kinds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kind-card {
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.kind-number {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.kind-card h3 {
    font-size: 1.063rem;
    margin-bottom: 0.5rem;
}

.kind-card p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.reference-footer {
    text-align: center;
    margin-top: 2rem;
}

.btn-text {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.btn-text:hover {
    gap: 1rem;
}

.arrow {
    font-size: 1.25rem;
}

/* FAQ */
.faq-section {
    padding: 4rem 0;
}

.faq-grid {
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    padding: 1.5rem;
    background: white;
    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;
}

/* CTA */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.cta-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-cta-primary,
.btn-cta-secondary {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-cta-primary {
    background: white;
    color: var(--primary);
}

.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 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;
    max-width: 400px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .inspector-layout {
        grid-template-columns: 1fr;
    }
    
    .input-methods {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}