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

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --border: #333;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
}

.sidebar {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.webhook-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.webhook-item {
    padding: 0.875rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.webhook-item:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
}

.webhook-item.active {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

.webhook-info {
    flex: 1;
    min-width: 0;
}

.webhook-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.webhook-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: "Courier New", monospace;
}

.webhook-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
    font-size: 1rem;
}

.icon-btn:hover {
    color: var(--text-primary);
}

.icon-btn.danger:hover {
    color: var(--danger);
}

.main-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    min-height: 600px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.search-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.filter-btn {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.filter-btn:hover {
    border-color: var(--accent);
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.request-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
}

.request-card:hover {
    border-color: var(--accent);
}

.request-header {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.request-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.method-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: "Courier New", monospace;
}

.method-post {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.request-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.expand-icon {
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.request-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.request-body {
    display: none;
    border-top: 1px solid var(--border);
}

.request-card.expanded .request-body {
    display: block;
}

.request-section {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.request-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.code-block {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    font-family: "Courier New", monospace;
    font-size: 0.8125rem;
    overflow-x: auto;
    line-height: 1.5;
}

.key-value-list {
    display: grid;
    gap: 0.5rem;
}

.key-value-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: 4px;
}

.key {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: "Courier New", monospace;
}

.value {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: "Courier New", monospace;
    word-break: break-all;
}

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

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--border);
}

.modal-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.endpoint-display {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.endpoint-url {
    font-family: "Courier New", monospace;
    font-size: 0.875rem;
    color: var(--accent);
    word-break: break-all;
}

.copy-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    white-space: nowrap;
    margin-left: 1rem;
}

.copy-btn:hover {
    background: var(--accent-hover);
}

@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}
