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

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1a202c;
    --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: 1200px;
    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: 1000px;
    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);
}

/* Tabs Section */
.tabs-section {
    background: white;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tabs {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 0;
}

.tab-btn {
    flex: 1;
    padding: 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--gray-50);
}

/* Input Section */
.input-section {
    padding: 3rem 0;
}

.input-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.input-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.input-group {
    position: relative;
    margin-bottom: 2rem;
}

.pubkey-input {
    width: 100%;
    padding: 1rem 4rem 1rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s;
}

.pubkey-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-paste {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-100);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-paste:hover {
    background: var(--gray-200);
}

/* Relay Selection */
.relay-selection {
    margin-bottom: 2rem;
}

.relay-selection h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.relay-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 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: 8px;
    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;
}

.custom-relay-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
}

.btn-add-relay {
    padding: 0.75rem 1.5rem;
    background: var(--gray-700);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-relay:hover {
    background: var(--gray-800);
}

.btn-fetch {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-fetch:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-icon {
    font-size: 1.5rem;
}

/* Import Upload */
.import-upload {
    margin-bottom: 2rem;
}

.import-upload h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.file-input {
    display: none;
}

.file-label {
    display: block;
    padding: 2rem;
    background: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.file-label:hover {
    background: var(--gray-100);
    border-color: var(--primary);
    color: var(--primary);
}

.import-warning {
    background: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.import-warning strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #92400e;
}

.import-warning ul {
    margin: 0.5rem 0 0 1.5rem;
    line-height: 1.8;
    color: #92400e;
}

/* Progress Section */
.progress-section {
    padding: 2rem 0;
}

.progress-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    display: block;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 6px;
    transition: width 0.3s;
    width: 0%;
}

.relay-status {
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 0.875rem;
}

.relay-status-item {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Results Section */
.results-section {
    padding: 2rem 0 4rem;
}

.results-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.results-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.results-summary {
    text-align: center;
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.event-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.breakdown-item {
    background: var(--gray-50);
    padding: 1.5rem 1rem;
    border-radius: 12px;
    text-align: center;
}

.breakdown-count {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.breakdown-label {
    display: block;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.export-options h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.export-buttons {
    display: grid;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn-export {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.btn-export:hover {
    border-color: var(--primary);
    background: white;
    transform: translateX(5px);
}

.export-icon {
    font-size: 2.5rem;
}

.export-text strong {
    display: block;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.export-text small {
    color: var(--gray-600);
}

.event-preview {
    margin-bottom: 2rem;
}

.event-preview h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.event-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
}

.event-item {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.event-item:last-child {
    border-bottom: none;
}

.event-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.event-content {
    color: var(--gray-800);
}

.btn-new-search {
    width: 100%;
    padding: 1.125rem;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* Instructions Section */
.instructions-section {
    padding: 3rem 0;
    background: var(--gray-50);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: var(--gray-900);
}

.instructions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.instruction-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.instruction-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-100);
}

.instruction-icon {
    font-size: 2rem;
}

.instruction-header h3 {
    font-size: 1.25rem;
    color: var(--gray-900);
}

.instruction-steps {
    list-style: none;
    counter-reset: step-counter;
}

.instruction-steps li {
    counter-increment: step-counter;
    margin-bottom: 1.25rem;
    padding-left: 2.75rem;
    position: relative;
}

.instruction-steps li:last-child {
    margin-bottom: 0;
}

.instruction-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.813rem;
}

.instruction-steps strong {
    display: block;
    color: var(--gray-900);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.instruction-steps p {
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
    font-size: 0.938rem;
}

/* Use Cases */
.use-cases {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.use-cases h3 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.use-case {
    text-align: center;
}

.use-case-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.use-case h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.use-case p {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    padding: 3rem 0;
    background: white;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.faq-item {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s;
}

.faq-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.faq-item h3 {
    color: var(--primary);
    font-size: 1.063rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.faq-item p {
    color: var(--gray-700);
    line-height: 1.7;
    margin: 0;
    font-size: 0.938rem;
}

.faq-item strong {
    color: var(--gray-900);
}

/* Info Section */
/* Info/Benefits Section - ALWAYS 4 IN LINE */
.info-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Force 4 equal columns */
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Rest of your CSS stays the same... */
.info-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.2);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-card:hover::before {
    opacity: 1;
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.info-card:hover .info-icon {
    transform: scale(1.1);
}

.info-card h3 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.info-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .info-grid {
        gap: 2rem;
        padding: 0 1rem;
    }
}

@media (max-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr); /* 2x2 grid on tablets */
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .info-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
        gap: 1rem;
        max-width: 400px;
    }
}

/* 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 - Tablet */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }
    
    .input-card,
    .results-card {
        padding: 1.5rem;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .relay-list {
        grid-template-columns: 1fr;
    }
    
    .instructions-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .input-card h2 {
        font-size: 1.5rem;
    }
    
    .btn-fetch {
        font-size: 1rem;
        padding: 1rem;
    }
}