:root {
    --bg-primary: #0B0E11;
    --bg-secondary: #1E2329;
    --bg-tertiary: #2B3139;
    --text-primary: #EAECEF;
    --text-secondary: #848E9C;
    --accent-yellow: #FCD535;
    --accent-green: #0ECB81;
    --accent-red: #F6465D;
}

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



/* .fas {
    --fa-style: 900;
    color: black;
     background-color: #000000;
} */

.fa-arrow-down {
    --fa: "\f063";
     /* background-color: #272424; */
}

.fa-arrow-up {
    --fa: "\f062";
    /* background-color: #0e0d0d; */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
}

.container {
    padding: 0 12px;
}

/* Header */
.header {
    padding: 16px 0;
    border-bottom: 1px solid var(--bg-tertiary);
    margin-bottom: 16px;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tabs */
.tabs {
    display: flex;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--bg-tertiary);
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: #000000;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
}

.tab-btn.active {
    background-color: #000000;
    color: #888888;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Ad Type Tabs */
.ad-type-tabs {
    display: flex;
    margin-bottom: 16px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--bg-tertiary);
}

.ad-type-btn {
    flex: 1;
    padding: 14px 8px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    text-transform: uppercase;
    background-color: black;
}

.ad-type-btn.active {
    color: var(--text-primary);
}

.ad-type-btn[data-type="sell"].active {
    background: linear-gradient(135deg, var(--accent-red), #D9304E);
}

.ad-type-btn[data-type="buy"].active {
    background: linear-gradient(135deg, var(--accent-green), #0BAF7A);
}

/* Filters */
.filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    /* background-color: var(--bg-secondary); */
    border-radius: 6px;
    border: 1px solid var(--bg-tertiary);
}

.filter-group label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
}

.filter-group input, .filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--bg-tertiary);
    border-radius: 4px;
    font-size: 14px;
    background-color: #000000;
    color: var(--text-primary);
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.checkbox-container input {
    margin-right: 6px;
    accent-color: var(--accent-yellow);
}

.btn-primary {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 19px;
    text-align: center;
    width: 100%;
}

/* Ads List */
.ads-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

/* Ad Card */
.ad-card {
    /* background: var(--bg-secondary); */
    border-radius: 6px;
    padding: 16px;
    border: 1px solid var(--bg-tertiary);
    cursor: pointer;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* display: flex; */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid var(--bg-tertiary);
}

.user-details .username {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.user-status {
    display: flex;
    gap: 6px;
    font-size: 12px;
    align-items: center;
    margin-top: 2px;
}

.online {
    color: var(--accent-green);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.online::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-green);
}

.price {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
    text-align: right;
}

.price::after {
    content: ' NGN';
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.ad-details {
    margin-bottom: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    align-items: center;
}

.detail-row .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-row .value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.ad-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--bg-tertiary);
}

.completion-rate {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 12px;
}

.reviews {
    color: var(--text-secondary);
    font-size: 12px;
}

.btn-trade {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    text-transform: uppercase;
    min-width: 100px;
    color: #FFFFFF;
}

.ad-card[data-type="buy"] .btn-trade {
    background: var(--accent-red);
}

.ad-card[data-type="sell"] .btn-trade {
    background: var(--accent-green);
}

/* My Ads */
.my-ads-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.my-ads-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.my-ads-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.my-ad-card {
    background: #000000;
    border-radius: 6px;
    padding: 16px;
    border: 1px solid var(--bg-tertiary);
}

.my-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.ad-type-badge {
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
}

.ad-type-badge.buy {
    background: var(--accent-green);
}

.ad-type-badge.sell {
    background: var(--accent-red);
}

.ad-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--accent-green);
}

.my-ad-details {
    margin-bottom: 12px;
}

.my-ad-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ad-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.stat {
    color: var(--text-secondary);
}

.ad-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 8px 12px;
    border: 1px solid var(--bg-tertiary);
    border-radius: 4px;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}

.btn-offline {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.btn-online {
    color: var(--accent-green);
    border-color: var(--accent-green);
}

.btn-edit {
    color: var(--accent-yellow);
    border-color: var(--accent-yellow);
}

/* Modal */
/* Modal overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto; /* Always allow scrolling */
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  padding: 40px 0; /* Adds breathing space on desktop */
}

/* Modal box */
.modal-content {
  background: #000000;
  margin: 0 auto; /* Center horizontally */
  padding: 20px;
  border-radius: 10px;
  width: 95%;
  max-width: 400px;
  border: 1px solid var(--bg-tertiary);
  color: #fff;
  overflow-y: auto; /* Allow internal scroll if needed */
  max-height: calc(100vh - 80px); /* Keep it within the screen */
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}

/* Optional close button styling */
.modal-close {
  color: #aaa;
  float: right;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--primary);
}


.modal-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.modal-actions {
    text-align: center;
    margin-top: 16px;
}

.btn-trade-modal {
    padding: 14px 20px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    width: 100%;
    /* background: linear-gradient(135deg, var(--accent-yellow), #F0B90B); */
    color: var(--bg-primary);
}

/* Empty States */
.no-ads {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--bg-tertiary);
}

.no-ads p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Verification Badges */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    /* background: var(--accent-green); */
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

/* Edit Form */
.edit-form {
    margin-top: 16px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--bg-tertiary);
    border-radius: 4px;
    background-color: #000000;
    color: var(--text-primary);
    font-size: 14px;
}

h2 {
    width: 100%;
    padding: 10px;
    /* border: 1px solid var(--bg-tertiary); */
    border-radius: 4px;
    background-color: #000000;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
    font-size: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--bg-tertiary);
}

.btn-secondary {
    padding: 10px 16px;
    border: 1px solid var(--bg-tertiary);
    background: none;
    color: var(--text-secondary);
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    font-size: 13px;
}

/* Notifications */
.notification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.notification-header h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.notification-body p {
    color: var(--text-primary);
    line-height: 1.5;
    text-align: center;
    font-size: 14px;
}

/* Tablet adjustments */
@media (min-width: 768px) {
    .container {
        padding: 0 16px;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .filters {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ads-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .my-ads-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Desktop adjustments */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }
    
    .ads-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .my-ads-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .filters {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Loading and Error States */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.error-message {
    padding: 12px;
    background: var(--accent-red);
    color: #FFFFFF;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    font-size: 13px;
}

.btn-primary:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
}