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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f1419;
    color: #ffffff;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: #1a1f2e;
    border-right: 1px solid #2a3441;
    padding: 20px 0;
    z-index: 100;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #1a1f2e;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #2a3441;
    border-radius: 3px;
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 101;
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 15px 15px;
    border-bottom: 1px solid #2a3441;
    margin-bottom: 20px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 10px;
    color: #8b949e;
    margin-top: 2px;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-title {
    font-size: 10px;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    padding: 0 15px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #c9d1d9;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.nav-item:hover {
    background: #21262d;
    color: #ffffff;
}

.nav-item.active {
    background: #1f2937;
    color: #667eea;
    border-left-color: #667eea;
}

.nav-item-icon {
    margin-right: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

.main-content {
    margin-left: 240px;
    padding: 30px;
    min-height: 100vh;
}

.header {
    margin-bottom: 30px;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.header p {
    color: #8b949e;
    font-size: 14px;
    line-height: 1.5;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #1a1f2e;
    border: 1px solid #2a3441;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.stat-icon.green {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stat-icon.orange {
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
}

.stat-icon.purple {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.stat-title {
    font-size: 12px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.stat-subtitle {
    font-size: 12px;
    color: #8b949e;
}

.endpoints-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-icon {
    margin-right: 10px;
    font-size: 22px;
}

.endpoints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.endpoint-card {
    background: #1a1f2e;
    border: 1px solid #2a3441;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.endpoint-card:hover {
    border-color: #667eea;
}

.endpoint-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.endpoint-method {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.method-get {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.method-post {
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
}

.method-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.endpoint-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.endpoint-description {
    color: #8b949e;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.endpoint-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.endpoint-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.form-section {
    background: #1a1f2e;
    border: 1px solid #2a3441;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #c9d1d9;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    background: #0d1117;
    border: 1px solid #2a3441;
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.response-section {
    background: #0d1117;
    border: 1px solid #2a3441;
    border-radius: 12px;
    padding: 20px;
}

.response-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.response-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.response-content {
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: #c9d1d9;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    word-break: break-word;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #667eea;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.connection-item {
    background: #21262d;
    border: 1px solid #2a3441;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.connection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.connection-email {
    font-weight: 500;
    color: #ffffff;
}

.connection-id {
    font-size: 11px;
    color: #8b949e;
    background: #0d1117;
    padding: 2px 8px;
    border-radius: 4px;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-connected {
    background: #22c55e;
}

.status-disconnected {
    background: #ef4444;
}

.btn-small {
    background: #ef9a44;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 8px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.table th { text-align: left; }
.btn-delete { background: #ef4444; color: white; border: none; padding:6px 8px; border-radius:4px; cursor:pointer; }
.btn-reconnect { background: #10b981; color: white; border: none; padding:6px 8px; border-radius:4px; cursor:pointer; margin-left:6px; }


/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 80px 20px 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .header p {
        font-size: 13px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .endpoints-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .nav-section {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 80px 15px 15px;
    }

    .endpoint-card,
    .stat-card,
    .form-section,
    .response-section {
        padding: 16px;
    }

    .header h1 {
        font-size: 20px;
    }
}