:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #ec4899;
    --dark: #0f172a;
    --dark-lighter: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gold: #fbbf24;
    --silver: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light);
    color: var(--dark);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Navigation Styles */
.navbar {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0.75rem 0;
    position: relative;
    z-index: 1050;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -0.025em;
    color: white !important;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: white !important;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: visible;
    z-index: 1;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero {
    padding: 160px 0 120px;
    color: white;
    text-align: center;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    color: #e2e8f0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Content Styles */
.endpoint {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

.feature-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
}

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

.feature-card p {
    color: var(--gray);
    margin-bottom: 0;
}

/* Method and Code Styles */
.method {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-right: 12px;
}

.method.get { background: #dcfce7; color: #166534; }
.method.post { background: #dbeafe; color: #1e40af; }

.path {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

.code-block {
    background: var(--dark-lighter);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    border: 1px solid #334155;
}

/* Table Styles */
.param-table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: separate;
    border-spacing: 0;
}

.param-table th {
    background: #f1f5f9;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    border-bottom: 2px solid #e2e8f0;
}

.param-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.param-table code {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--primary);
    font-family: monospace;
    font-size: 0.9em;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary-custom {
    background: var(--primary);
    border: none;
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
}

.btn-primary-custom:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    color: white;
}

.btn-light {
    background: white;
    color: var(--primary);
    border: none;
}

.btn-light:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    color: var(--primary);
}

/* Service Tag Styles */
.service-tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    color: white;
    border-radius: 9999px;
    margin: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

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

/* Service tags inside modals */
.modal .service-tag {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid var(--primary);
}

.modal .service-tag:hover {
    background: var(--primary);
    color: white;
}

/* Account Dropdown Styles */
.account-dropdown {
    position: static;
    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: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    z-index: 1060;
}

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

.account-window {
    position: fixed;
    top: 70px;
    right: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 380px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

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

.account-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.account-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.account-section h6 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    margin-bottom: 1rem;
    font-weight: 700;
}

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

.star-rating {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

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

.error-message {
    background: #fef2f2;
    color: #991b1b;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid #fca5a5;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

/* Seat Badge Styles */
.seat-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.seat-badge.gold {
    background: var(--gold);
    color: #92400e;
}

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

/* Chat Styles */
.chat-inbox {
    max-height: 600px;
    overflow-y: auto;
    border-right: 1px solid #e2e8f0;
}

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

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

.conversation-item.active {
    background: #eff6ff;
    border-left: 3px solid var(--primary);
}

.message-history {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #f8fafc;
}

.message-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    max-width: 80%;
}

.message-item.sent {
    background: var(--primary);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

.message-item.received {
    background: white;
    border: 1px solid #e2e8f0;
    margin-right: auto;
    border-bottom-left-radius: 2px;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    text-align: right;
}

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

.bulletin-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

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

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

.bulletin-title {
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    font-size: 1.1rem;
}

.bulletin-category {
    background: #e0e7ff;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Map & Search Styles */
.map-container {
    height: 450px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.search-panel {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

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

.ping-section {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
}

.ping-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
}

.ping-result.ping-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.ping-result.ping-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* API Status Indicator */
.api-status-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #94a3b8;
    animation: pulse 1.5s infinite;
    cursor: help;
}

.api-status-indicator.online {
    background: #22c55e;
    animation: none;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.api-status-indicator.offline {
    background: #ef4444;
    animation: none;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.api-status-indicator.checking {
    background: #eab308;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Base URL Copy Block */
.base-url-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.base-url-text {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    user-select: all;
    cursor: text;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Dashboard Styles */
.provider-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
    height: 100%;
}

.job-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.job-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-sm);
}

/* Modal Polish */
.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: var(--dark);
}

.form-control {
    border: 1px solid #cbd5e1;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Footer */
.footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 4rem 0;
    margin-top: 6rem;
}

.footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    margin-bottom: 0.75rem;
}

.footer a:hover {
    color: white;
}

/* Stat Badges */
.stat-badge {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 100px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.letter-spacing-2 {
    letter-spacing: 0.1em;
    font-weight: 700;
    font-size: 0.85rem;
}

/* User Type Selector */
.user-type-selector {
    display: flex;
    gap: 0.75rem;
}

.user-type-option {
    flex: 1;
    cursor: pointer;
}

.user-type-option input[type="radio"] {
    display: none;
}

.user-type-card {
    display: block;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.2s ease;
}

.user-type-card strong {
    display: block;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.user-type-card small {
    color: var(--gray);
    font-size: 0.8rem;
}

.user-type-option input[type="radio"]:checked + .user-type-card {
    border-color: var(--primary);
    background: #eff6ff;
}

.user-type-option:hover .user-type-card {
    border-color: #cbd5e1;
}

/* Mobile */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .header {
        padding: 40px 0;
    }
    
    .account-window {
        width: 300px;
    }
    
    .stat-badge {
        padding: 0.75rem 1rem;
        min-width: 70px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .user-type-selector {
        flex-direction: column;
    }
}

/* Dashboard Specific Styles */
.dashboard-container {
    padding: 2rem 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.console-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-lg);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.activity-feed {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    background: #0f172a;
    color: #4ade80;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid #1e293b;
}

.map-controls {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1;
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
}

.map-controls label {
    display: block;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.map-controls label:last-child {
    margin-bottom: 0;
}

.button-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.button-container button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#grab-job {
    background: var(--primary);
    color: white;
}

#submit-bid {
    background: white;
    border: 1px solid #cbd5e1;
    color: var(--dark);
}

#grab-job:hover {
    background: var(--primary-hover);
}

#submit-bid:hover {
    background: #f1f5f9;
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .map-container, .console-container {
        height: 450px;
    }
}