/* Real-Time Auction System - Premium Black & White Luxury Theme */
/* Inspired by minimal luxury designs like inventomo.site: clean, high-contrast, modern minimalism */
/* Shades: Black (#000, #111, #222), Grey (#444, #666, #888, #ccc), White (#fff, #f8f8f8, #f0f0f0) */

/* Import Modern Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* Luxury Buttons with Gradient and Shadow */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #000 0%, #111 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #222 0%, #333 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

.btn-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-warning {
    background: linear-gradient(135deg, #ffcc00 0%, #e6b800 100%);
    color: #000;
    box-shadow: 0 2px 8px rgba(255,204,0,0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,204,0,0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

/* Layout - Minimal and Responsive */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
}

/* Header - Luxury Black Bar */
.site-header {
    background: #000;
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo h1 a {
    color: #fff;
    transition: color 0.3s ease;
}

.logo h1 a:hover {
    color: #ccc;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.welcome-user {
    font-weight: 500;
    color: #ccc;
}

/* Sidebar - Elegant Navigation */
.sidebar {
    background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
    padding: 30px 20px;
    border-right: 1px solid #ddd;
    min-height: calc(100vh - 80px);
    width: 250px;
    position: fixed;
    left: 0;
    top: 80px;
    z-index: 100;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #333;
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: linear-gradient(135deg, #000 0%, #111 100%);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Main Content - Clean White Space */
.main-content {
    padding: 30px;
    flex: 1;
    margin-left: 250px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.5px;
}

/* Dashboard - Luxury Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.dashboard-card h2 {
    margin-bottom: 20px;
    color: #000;
    font-size: 22px;
    font-weight: 600;
}

/* Stats - Elegant Metrics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: #000;
    opacity: 0.8;
}

.stat-content h3 {
    font-size: 28px;
    margin-bottom: 5px;
    color: #000;
    font-weight: 700;
}

.stat-content p {
    color: #666;
    font-size: 14px;
    font-weight: 400;
}

/* Tables - Clean and Readable */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.data-table th {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    font-weight: 600;
    color: #000;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background: #f8f8f8;
    transition: background 0.2s ease;
}

/* Forms - Minimal and Elegant */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
}

.auth-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 50px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.auth-card:hover {
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #000;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

.auth-form button {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    font-size: 16px;
    font-weight: 600;
}

.auth-links {
    text-align: center;
    margin-top: 25px;
    color: #666;
    font-size: 14px;
}

.auth-links a {
    color: #000;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #333;
}

.filters-form {
    margin-bottom: 25px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Alerts - Subtle and Clean */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

/* Pagination - Elegant Dots */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 5px;
}

.page-link {
    padding: 10px 14px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-link:hover,
.page-link.active {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Auction Cards - Luxury Product Cards */
.auctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.auction-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.auction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #000, #111, #000);
}

.auction-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.auction-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.auction-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.auction-card:hover .auction-image img {
    transform: scale(1.05);
}

.no-image {
    height: 220px;
    background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 16px;
    font-weight: 500;
}

.auction-info {
    padding: 20px;
}

.auction-info h3 {
    margin-bottom: 10px;
    color: #000;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.auction-seller {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 400;
}

.auction-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.auction-details {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #444;
}

.detail-item strong {
    color: #000;
    font-weight: 500;
}

.auction-actions {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* Auction Detail - Split Layout Luxury */
.auction-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.auction-images {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.main-image {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.auction-info-detail {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.auction-meta {
    margin: 25px 0;
}

.meta-item {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 15px;
}

.meta-item strong {
    color: #000;
    font-weight: 600;
}

.bid-section {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border: 1px solid #e0e0e0;
}

.bid-section h3 {
    margin-bottom: 20px;
    color: #000;
    font-size: 22px;
    font-weight: 600;
}

.my-last-bid {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.chat-section {
    margin-top: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* Action Buttons - Flex Layout */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Bidder List - Clean Rows */
.bidder-list {
    margin-top: 15px;
}

.bidder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.bidder-item:last-child {
    border-bottom: none;
}

.bidder-item strong {
    color: #000;
}

/* Status and Role Badges - Minimal Labels */
.status-badge,
.role-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-closed {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-sold {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-banned {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.role-admin {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
}

.role-seller {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: #fff;
}

.role-buyer {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
}

/* Footer - Simple Black Bar */
.site-footer {
    background: #000;
    color: #ccc;
    text-align: center;
    padding: 25px 0;
    margin-top: 60px;
    font-size: 14px;
}

/* Chat UI - Modern Bubble Style */
.chat-container {
    height: 400px;
    overflow-y: auto;
    background: #f8f8f8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

.message.sent {
    background: linear-gradient(135deg, #000 0%, #111 100%);
    color: #fff;
    margin-left: auto;
    text-align: right;
}

.message.received {
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-family: inherit;
}

.chat-input button {
    padding: 12px 20px;
    border-radius: 25px;
    min-width: 60px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f8f8f8;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #000;
    background: #f0f0f0;
}

.upload-area p {
    color: #666;
    margin-bottom: 10px;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive Design - Mobile First Luxury */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
    }

    .auction-detail-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 20px;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .dashboard-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .auctions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form-row {
        flex-direction: column;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .auth-card {
        padding: 30px 20px;
        margin: 20px;
        max-width: none;
    }

    .action-buttons {
        flex-direction: column;
    }

    .chat-input {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .main-content {
        padding: 15px;
    }

    .auction-card {
        margin: 0 -15px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 13px;
    }

    .page-header h1 {
        font-size: 24px;
    }
}

/* Loading Spinner for AJAX */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

.no-results i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Success Animation */
.success-animation {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(0.95); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}
