/* Event Deleter Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --success: #10b981;
    --warning: #f59e0b;
    --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: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Warning Banner */
.warning-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 3px solid var(--warning);
    padding: 1rem 0;
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.warning-icon {
    font-size: 2rem;
}

.warning-text {
    flex: 1;
    color: var(--gray-800);
    font-size: 0.938rem;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 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);
}

/* Tool Section */
.tool-section {
    padding: 3rem 0;
}

/* Step Cards */
.step-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: opacity 0.3s;
}

.step-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.step-info p {
    color: var(--gray-600);
}

/* Auth Methods */
.auth-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-method-btn {
    padding: 1.5rem;
    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;
}

.auth-method-btn:hover {
    background: var(--gray-200);
}

.auth-method-btn.active {
    background: white;
    border-color: var(--primary);
}

.method-icon {
    font-size: 2rem;
}

.method-label {
    font-weight: 600;
    color: var(--gray-700);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.nsec-input,
.relay-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.938rem;
    font-family: 'Courier New', monospace;
}

.nsec-input:focus,
.relay-input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-actions {
    margin-top: 0.5rem;
}

.btn-toggle-visibility {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
}

.input-hint {
    font-size: 0.813rem;
    color: var(--warning);
    margin-top: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

/* Buttons */
.btn-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-action {
    padding: 0.75rem 1.5rem;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    background: var(--gray-200);
}

.btn-add {
    padding: 0.75rem 1.5rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Auth Status */
.auth-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #d1fae5;
    border-radius: 12px;
    border-left: 4px solid var(--success);
}

.status-icon {
    width: 40px;
    height: 40px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.status-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pubkey-display {
    font-family: 'Courier New', monospace;
    font-size: 0.813rem;
    color: var(--gray-600);
}

/* Relay Selection */
.relay-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.relay-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 12px;
}

.relay-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.relay-item:hover {
    border-color: var(--primary);
}

.relay-item.selected {
    border-color: var(--primary);
    background: #f0f4ff;
}

.relay-checkbox {
    width: 20px;
    height: 20px;
}

.relay-url {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.btn-remove-relay {
    padding: 0.25rem 0.5rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.relay-item:hover .btn-remove-relay {
    opacity: 1;
}

.btn-remove-relay:hover {
    background: var(--danger-dark);
}

.custom-relay-input {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Events Section */
.loading-section {
    text-align: center;
    padding: 3rem;
}

.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); }
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.events-count {
    font-size: 1.125rem;
}

.events-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-select {
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.938rem;
    min-width: 200px;
}

.events-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
}

.event-item {
    padding: 1rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.event-item:hover {
    border-color: var(--primary);
}

.event-item.selected {
    border-color: var(--danger);
    background: #fef2f2;
}

.event-header-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.event-kind {
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.event-date {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.event-content {
    color: var(--gray-700);
    font-size: 0.938rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-id {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* Danger Zone */
.danger-zone {
    padding: 2rem;
    background: #fef2f2;
    border: 3px solid var(--danger);
    border-radius: 12px;
    margin-top: 2rem;
}

.danger-zone h3 {
    color: var(--danger);
    margin-bottom: 1rem;
}

.selected-count {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.confirmation-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.confirmation-checkbox input {
    width: 20px;
    height: 20px;
}

/* Progress */
.delete-progress {
    padding: 2rem;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--gray-200);
    border-radius: 15px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
    transition: width 0.3s;
    width: 0%;
}

/* Results */
.delete-results {
    padding: 2rem;
    background: var(--gray-50);
    border-radius: 12px;
}

/* Info Section */
.info-section {
    padding: 4rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray-600);
    font-size: 1.125rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    text-align: center;
    padding: 2rem;
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: var(--gray-600);
}

/* 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(--danger);
}

.faq-item h3 {
    color: var(--danger);
    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;
    max-width: 400px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .auth-methods {
        grid-template-columns: 1fr;
    }

    .events-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .container {
        padding: 0 1rem;
    }
}