:root {
    --primary: #6366f1;
    --dark: #1e293b;
    --light: #f8fafc;
    --gold: #fbbf24;
    --silver: #94a3b8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light);
    margin: 0;
    padding: 0;
}

/* Navigation Styles */
.navbar {
    background: var(--dark) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
}

.navbar-nav .nav-link {
    color: #94a3b8 !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.header h1 {
    color: white;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.hero {
    padding: 120px 0;
    color: white;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: white;
}

/* Content Styles */
.endpoint {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* Method and Code Styles */
.method {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    margin-right: 10px;
}

.method.get { background: #22c55e; color: white; }
.method.post { background: #3b82f6; color: white; }

.path {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 600;
}

.code-block {
    background: var(--dark);
    color: #22d3ee;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
}

/* Table Styles */
.param-table {
    width: 100%;
    margin: 15px 0;
}

.param-table th {
    background: var(--light);
    padding: 10px;
    text-align: left;
}

.param-table td {
    padding: 10px;
    border-bottom: 1px solid var(--light);
}

.param-table code {
    background: var(--light);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--primary);
}

/* Button Styles */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-primary,
.btn-outline-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Service Tag Styles */
.service-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 20px;
    margin: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.service-tag:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Account Dropdown Styles */
.account-dropdown {
    position: relative;
    display: inline-block;
}

.account-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.account-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.account-window {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 400px;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 500px;
    overflow-y: auto;
}

.account-dropdown:hover .account-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid var(--light);
}

.account-section {
    padding: 15px 20px;
}

.account-section:not(:last-child) {
    border-bottom: 1px solid var(--light);
}

.reputation-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.star-rating {
    color: #fbbf24;
    font-size: 18px;
}

.bid-item, .job-item {
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 8px;
}

.bid-item h6, .job-item h6 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.bid-item p, .job-item p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.btn-xs {
    padding: 3px 8px;
    font-size: 12px;
}

.logout-btn {
    background: #dc2626;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #b91c1c;
}

/* Loading and Error Styles */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Seat Badge Styles */
.seat-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    margin-left: 10px;
}

.seat-badge.gold {
    background: var(--gold);
    color: white;
}

.seat-badge.silver {
    background: var(--silver);
    color: white;
}

/* Alert Styles */
.alert-seat {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.alert-seat h5 {
    color: #92400e;
    margin-bottom: 10px;
}

/* Form Styles */
.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.duration-input-group, .payment-method-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.duration-input-group input,
.payment-method-group input {
    flex: 1;
}

.duration-input-group select {
    width: 100px;
}

.payment-method-group select {
    width: 120px;
}

/* Chat Styles */
.chat-inbox {
    max-height: 500px;
    overflow-y: auto;
}

.conversation-item {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background 0.2s;
}

.conversation-item:hover {
    background: #f8fafc;
}

.conversation-item.active {
    background: #e0e7ff;
}

.conversation-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.conversation-user {
    font-weight: 600;
    color: var(--dark);
}

.conversation-time {
    font-size: 12px;
    color: #64748b;
    margin-left: auto;
}

.conversation-preview {
    font-size: 14px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-history {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
}

.message-item {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 6px;
}

.message-item.sent {
    background: #e0e7ff;
    margin-left: 20px;
}

.message-item.received {
    background: #f1f5f9;
    margin-right: 20px;
}

.message-sender {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
}

.message-text {
    font-size: 14px;
}

.message-time {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

/* Bulletin Styles */
.bulletin-feed {
    max-height: 500px;
    overflow-y: auto;
}

.bulletin-item {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

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

.bulletin-title {
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.bulletin-category {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: auto;
}

.bulletin-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.bulletin-content {
    font-size: 14px;
    color: #334155;
    line-height: 1.4;
}

/* Map Styles */
.map-container {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.search-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.service-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.service-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.service-distance {
    color: var(--silver);
    font-size: 0.9rem;
}

.reputation-stars {
    color: var(--gold);
}

.exchange-stats {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.stat-card {
    text-align: center;
    padding: 15px;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--silver);
    font-size: 0.9rem;
}

.filter-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.mapboxgl-popup-content {
    border-radius: 8px;
}

/* Ping Test Styles */
.ping-section {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.ping-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.ping-success {
    background: #dcfce7;
    border: 1px solid #16a34a;
    color: #15803d;
}

.ping-error {
    background: #fef2f2;
    border: 1px solid #dc2626;
    color: #dc2626;
}

.ping-loading {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Sidebar Navigation */
.nav-sidebar {
    position: sticky;
    top: 20px;
}

.nav-sidebar a {
    display: block;
    padding: 8px 12px;
    color: var(--dark);
    text-decoration: none;
    border-left: 2px solid transparent;
}

.nav-sidebar a:hover {
    background: var(--light);
    border-left-color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .account-window {
        width: 300px;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
}

/* Provider Dashboard */
.provider-dashboard {
    padding: 60px 0;
    background: var(--light);
}

.provider-dashboard h2 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

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

.provider-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.provider-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.12);
}

.provider-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.profile-dropzone {
    border: 2px dashed rgba(99, 102, 241, 0.4);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: rgba(248, 250, 252, 0.9);
    margin-bottom: 1rem;
}

.profile-dropzone input[type="file"] {
    display: none;
}

.profile-dropzone label {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}

.capabilities-editor {
    width: 100%;
    min-height: 160px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 12px;
    font-family: 'Courier New', monospace;
    background: #f8fafc;
    resize: vertical;
}

.provider-action {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.provider-action button {
    flex: 1 1 160px;
}

.job-list {
    display: grid;
    gap: 12px;
}

.job-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.job-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.job-meta {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 0.25rem;
}

.job-status {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.grab-result {
    margin-top: 1rem;
    padding: 16px;
    border-radius: 10px;
    background: #ecfeff;
    border: 1px solid #06b6d4;
    color: #0f172a;
}

.grab-result.error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.provider-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.provider-meta div {
    flex: 1;
    min-width: 150px;
}

.provider-meta span {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
}

.provider-meta strong {
    font-size: 1.1rem;
    color: var(--dark);
}