/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.admin-dashboard .listing-username {
    color: #000000;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #0E1A2B 0%, #1B2333 100%);
    color: #e6eaf2;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(140px 140px at 20% 15%, rgba(204, 143, 76, 0.25), transparent 60%),
                radial-gradient(180px 180px at 80% 10%, rgba(170, 107, 57, 0.20), transparent 65%),
                radial-gradient(120px 120px at 30% 85%, rgba(140, 90, 60, 0.18), transparent 60%),
                radial-gradient(200px 200px at 70% 75%, rgba(189, 124, 72, 0.22), transparent 70%);
    filter: blur(30px);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Jet Black Banner */
.banner {
    background-color: transparent;
    padding: 24px 0 16px 0;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #ffffff;
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.tagline {
    color: #dfe6ef;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 8px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sell-btn {
    background-color: #000000;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.sell-btn:hover {
    background-color: #1a1a1a;
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Admin Access Button */
.admin-access {
    text-align: right;
    margin-bottom: 30px;
}

.admin-btn {
    background-color: #ff7a00;
    color: #ffffff;
    padding: 10px 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 122, 0, 0.25);
}

.admin-btn:hover {
    background-color: #e56f00;
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0 auto;
    max-width: 1100px;
}

/* Individual Listing Card */
.listing-card {
    background: #0F6FAF;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.listings-grid .listing-card:nth-child(2) {
    background: #3AA7F0;
}

.listings-grid .listing-card:nth-child(2) .extended-info {
    background-color: #3AA7F0;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.listing-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.listing-username {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.admin-dashboard .listing-username {
    color: #000000;
}


.divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    margin: 15px 0;
}

.listing-info {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.4;
}

.listing-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin: 15px 0;
}

/* CTA Button */
.buy-button {
    background-color: #4DB8FF;
    color: #ffffff;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.buy-button:hover {
    background-color: #3AA7F0;
}

.page-link {
    background-color: #3AA7F0;
    color: #ffffff;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    margin: 6px 0 10px 0;
}

.page-link:hover {
    filter: brightness(0.95);
}

.chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007aff;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 122, 255, 0.25);
    z-index: 900;
    max-width: 280px;
    line-height: 1.3;
}

.chat-bubble:hover {
    background-color: #0066e6;
}

.tos-footer {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
    color: #9aa3ad;
    font-size: 12px;
    text-decoration: none;
    z-index: 950;
}

.tos-footer:hover {
    color: #b8bfca;
}

/* View More Button */
.view-more-btn {
    background-color: #F2F7FA;
    color: #0F6FAF;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    filter: brightness(0.95);
}

/* Extended Info (Dropdown) */
.extended-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: none;
    background-color: #0F6FAF;
}

.extended-info.show {
    display: block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 30px;
    border: 2px solid #000000;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #000000;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 14px;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.modal-content button:hover {
    background-color: #333333;
}

/* Admin Dashboard */
.admin-dashboard {
    padding: 40px 0;
    min-height: 100vh;
    background-color: #f5f5f5;
}

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

.admin-header h2 {
    color: #000000;
    font-size: 2rem;
}

.logout-btn {
    background-color: #dc3545;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.logout-btn:hover {
    background-color: #c82333;
}

/* Add Listing Form */
.add-listing-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #dddddd;
    margin-bottom: 40px;
}

.add-listing-form h3 {
    margin-bottom: 20px;
    color: #000000;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000000;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 14px;
    margin-left: 20px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.back-btn {
    background-color: #6c757d;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.back-btn:hover {
    background-color: #5a6268;
}

.confirm-btn {
    background-color: #28a745;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.confirm-btn:hover {
    background-color: #218838;
}

/* Admin Listings */
.admin-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.admin-listing-card {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 10px;
    padding: 20px;
    position: relative;
}

.admin-listing-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.admin-actions button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.edit-btn {
    background-color: #007bff;
    color: #ffffff;
}

.edit-btn:hover {
    background-color: #0056b3;
}

.delete-btn {
    background-color: #dc3545;
    color: #ffffff;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .listings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .banner {
        padding: 30px 0;
    }
    
    .buy-button {
        position: static;
        width: 100%;
        margin-top: 15px;
    }
}
