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

:root {
    --primary: #1e3a5f;
    --primary-light: #2c5282;
    --secondary: #c9a227;
    --secondary-light: #f4d03f;
    --light: #f8f9fa;
    --light-gray: #e9ecef;
    --dark: #212529;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--light);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(30, 58, 95, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 162, 39, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

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

.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.8rem 0;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.3);
    position: relative;
    overflow: hidden;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.navbar .logo img {
    height: 40px;
}

.navbar .logo:hover {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--secondary);
    transform: translateY(-2px);
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0d2137 50%, var(--primary-light) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255,255,255,0.02) 50px, rgba(255,255,255,0.02) 51px),
        repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(255,255,255,0.02) 50px, rgba(255,255,255,0.02) 51px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 100px;
    background: var(--light);
    border-radius: 50% 50% 0 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.hero h1 span {
    color: var(--secondary);
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.main-content {
    flex: 1;
    padding: 2rem 20px;
    position: relative;
}

.search-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(201, 162, 39, 0.2);
}

.search-bar form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-bar input,
.search-bar select {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-bar input:focus,
.search-bar select:focus {
    outline: none;
    border-color: var(--secondary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(30, 58, 95, 0.3);
}

.btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
}

.btn-secondary {
    background: #6c757d;
}

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

.btn-buy-now {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--dark);
    width: 100%;
    margin-top: 0.5rem;
    font-weight: bold;
}

.btn-buy-now:hover {
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary) 100%);
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.4);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

.btn-danger {
    background: var(--danger);
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.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;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title h2 {
    color: var(--primary);
    font-size: 1.8rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), transparent);
}

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

.auction-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.auction-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.auction-card a {
    text-decoration: none;
    color: inherit;
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.auction-card:hover .card-image img {
    transform: scale(1.05);
}

.card-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 1.2rem;
}

.card-image .no-image::before {
    content: '🏎️';
    font-size: 3rem;
    opacity: 0.5;
}

.time-badge,
.sold-badge-card,
.ended-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.time-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.sold-badge-card {
    background: linear-gradient(135deg, var(--success) 0%, #34ce57 100%);
    color: white;
}

.ended-badge {
    background: #6c757d;
    color: white;
}

.card-content {
    padding: 1.2rem;
}

.card-category {
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card-content h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--dark);
    min-height: 2.7em;
}

.card-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 0.8rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
}

.current-bid {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary);
}

.buy-now {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: bold;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.auth-form,
.form-container {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(201, 162, 39, 0.1);
}

.form-container {
    max-width: 700px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

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

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #666;
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.auth-link a {
    color: var(--secondary);
    font-weight: 600;
}

.auth-link a:hover {
    color: var(--primary);
}

.auth-form h1,
.form-container h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-size: 2rem;
}

.auth-form .subtitle,
.form-container .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.auction-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.auction-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    overflow: hidden;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auction-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.auction-image .no-image {
    color: #999;
    font-size: 1.2rem;
}

.auction-image .no-image::before {
    content: '🏎️';
    font-size: 5rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.category-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--dark);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.auction-info h1 {
    font-size: 1.8rem;
    margin: 1rem 0;
    color: var(--dark);
    line-height: 1.3;
}

.auction-meta {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

.auction-meta div {
    margin-bottom: 0.6rem;
    display: flex;
    gap: 0.5rem;
}

.auction-meta strong {
    color: var(--primary);
    min-width: 80px;
}

.bid-history {
    margin-top: 2rem;
}

.bid-history h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.bid-history table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
}

.bid-history th,
.bid-history td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.bid-history th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 600;
}

.bid-history tr:hover {
    background: #f8f9fa;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    color: #666;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(30, 58, 95, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.activity-table,
.admin-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.activity-table th,
.activity-table td,
.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.activity-table th,
.admin-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 600;
}

.item-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--dark);
}

.item-link:hover {
    color: var(--primary);
}

.item-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-win {
    background: #d4edda;
    color: var(--success);
}

.status-lost {
    background: #f8d7da;
    color: var(--danger);
}

.status-ended {
    background: #e2e3e5;
    color: #6c757d;
}

.status-active {
    background: #cce5ff;
    color: var(--info);
}

.status-sold {
    background: #d4edda;
    color: var(--success);
}

.status-cancelled {
    background: #f8d7da;
    color: var(--danger);
}

.status-pending_payment, .status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-pending_approval {
    background: #cce5ff;
    color: var(--info);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    text-align: center;
    border: 1px solid rgba(201, 162, 39, 0.1);
    transition: transform 0.3s;
}

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

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card:nth-child(2) .stat-number {
    background: linear-gradient(135deg, var(--success) 0%, #34ce57 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-card:nth-child(3) .stat-number {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-card:nth-child(4) .stat-number {
    background: linear-gradient(135deg, var(--info) 0%, #20c997 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.no-results h2 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.no-results p {
    color: #666;
    margin-bottom: 1.5rem;
}

.no-results::before {
    content: '🏎️';
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

footer {
    background: linear-gradient(135deg, var(--dark) 0%, #1a1a1a 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--secondary-light), var(--secondary));
}

footer p {
    opacity: 0.8;
}

footer a {
    color: var(--secondary);
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .main-content {
        padding: 1rem 0.5rem;
    }
    
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.85rem;
        gap: 0.25rem;
    }
    
    .nav-links a {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Forms - Mobile */
    .form-container {
        width: 100%;
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        font-size: 14px;
        padding: 0.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Buttons - Mobile */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
    
    .btn-small {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    /* Tables - Mobile */
    .activity-table,
    .admin-table {
        font-size: 0.75rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .activity-table th,
    .activity-table td {
        padding: 0.4rem 0.3rem;
        min-width: 70px;
    }
    
    /* Cards - Mobile */
    .auction-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .auction-card {
        padding: 0.75rem;
    }
    
    .auction-image {
        height: 150px;
    }
    
    /* Search - Mobile */
    .search-bar form {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-bar input,
    .search-bar select {
        width: 100%;
    }
    
    /* My Bids Tabs - Mobile */
    .tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.3rem;
        padding: 0.5rem;
    }
    
    .tabs a.tab-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.7rem;
        white-space: nowrap;
        flex: 0 0 auto;
    }
    
    .tab-content {
        padding: 0.5rem;
    }
    
    /* Messages - Mobile */
    .messages-container {
        flex-direction: column;
    }
    
    .conversation-list {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .chat-container {
        width: 100%;
    }
    
    /* Stats - Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer - Mobile */
    footer {
        padding: 1rem 0.5rem;
        font-size: 0.8rem;
    }
}
    
    /* My Bids Tabs - Mobile */
    .tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.3rem;
        padding: 0.5rem;
    }
    
    .tabs a.tab-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
        white-space: nowrap;
        flex: 0 0 auto;
        border-radius: 6px;
        background: #f0f0f0;
        color: #666;
        text-decoration: none;
    }
    
    .tabs a.tab-btn.active {
        background: var(--primary);
        color: white;
    }
    
    .tab-content {
        padding: 0.5rem;
    }
    
    /* Notifications - Mobile */
    .notification-full-list {
        gap: 0.5rem;
    }
    
    .notification-full-item {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .notification-icon-large {
        width: 32px;
        height: 32px;
    }
    
    .notification-full-title {
        font-size: 0.85rem;
    }
    
    .notification-full-message {
        font-size: 0.75rem;
    }
    
    .activity-table {
        font-size: 0.7rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .activity-table th,
    .activity-table td {
        padding: 0.4rem 0.3rem;
        min-width: 80px;
    }
    
    .activity-table .item-thumb {
        width: 35px;
        height: 35px;
    }
    
    .item-link {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        font-size: 0.75rem;
    }
}
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .search-bar form {
        flex-direction: column;
    }
    
    .search-bar input,
    .search-bar select {
        width: 100%;
    }
    
    .auction-detail {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .price-box {
        flex-direction: column;
    }
    
    .bid-form {
        flex-direction: column;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-info {
        width: 100%;
        text-align: center;
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    .form-container {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .form-container h2,
    .form-container h3 {
        font-size: 1.2rem;
    }
    
    .form-container input,
    .form-container select,
    .form-container textarea {
        font-size: 0.9rem;
    }
    
    .auth-form {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .auctions-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 1rem 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
    }
    
    .admin-table {
        display: block;
        overflow-x: auto;
    }
    
    .activity-table {
        display: block;
        overflow-x: auto;
    }
    
    .admin-table {
        display: block;
        overflow-x: auto;
        font-size: 0.75rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.4rem 0.3rem;
        white-space: nowrap;
    }
    
    .admin-table .actions {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .admin-table .btn-small {
        font-size: 0.7rem;
        padding: 0.3rem 0.4rem;
    }
    
    .tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        min-width: 70px;
        text-align: center;
        padding: 0.5rem 0.3rem;
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .stat-card p {
        font-size: 0.8rem;
    }
    
    .item-link {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .item-thumb {
        width: 100%;
        max-width: 80px;
        height: auto;
    }
    
    footer {
        padding: 1rem;
    }
    
    footer p {
        font-size: 0.85rem;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.pagination .page-info {
    color: #666;
    font-weight: 500;
}

/* Enhanced Mobile Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .navbar {
        padding: 0.6rem 0;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .nav-links li {
        margin: 0;
    }
    
    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    
    .logo img {
        height: 35px;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .btn-small {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .alert {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Tables */
    .activity-table {
        font-size: 0.8rem;
    }
    
    .activity-table th,
    .activity-table td {
        padding: 0.5rem 0.3rem;
    }
    
    .activity-table .item-thumb {
        width: 40px;
        height: 40px;
    }
    
    .activity-table .actions {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    /* Grid layouts */
    .auction-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .auction-card {
        padding: 1rem;
    }
    
    .auction-image {
        height: 150px;
    }
    
    /* Tabs */
    .tab-buttons {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    /* Settings grid */
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .settings-section {
        padding: 1rem;
    }
    
    /* Admin tabs */
    .admin-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .admin-tab-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Forms */
    .form-container {
        padding: 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row .form-group {
        flex: 1;
    }
    
    /* Hero section */
    .hero {
        padding: 2rem 0;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    /* Search and filters */
    .search-bar {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .search-bar input {
        margin: 0;
    }
    
    .search-bar select {
        margin: 0;
    }
    
    .search-bar .btn {
        width: 100%;
    }
    
    /* Categories */
    .categories {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.85rem;
    }
    
    .pagination .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Footer */
    footer {
        padding: 1rem 0;
        text-align: center;
    }
    
    footer p {
        font-size: 0.8rem;
    }
    
    /* Notification dropdown */
    .notification-dropdown {
        width: 300px;
        right: -50px;
    }
    
    .notification-item-link {
        padding: 0.8rem;
    }
    
    .notification-content {
        margin-left: 2.5rem;
    }
    
    .notification-title {
        font-size: 0.9rem;
    }
    
    .notification-message {
        font-size: 0.8rem;
    }
    
    .notification-time {
        font-size: 0.75rem;
    }
    
    /* Sold badge and payment sections */
    .sold-badge {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .sold-badge h2 {
        font-size: 1.3rem;
    }
    
    .sold-badge h3 {
        font-size: 1.1rem;
    }
    
    /* Modal popups */
    .modal-popup {
        width: 90%;
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        text-align: center;
    }
    
    .stat-card h3 {
        font-size: 1.3rem;
    }
    
    .stat-card p {
        font-size: 0.8rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    body {
        font-size: 13px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .nav-links {
        font-size: 0.7rem;
    }
    
    .nav-links a {
        padding: 0.3rem 0.4rem;
    }
    
    .logo img {
        height: 30px;
    }
    
    /* Forms - Extra Small */
    .form-container {
        padding: 0.75rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 13px;
        padding: 0.4rem;
    }
    
    /* Buttons - Extra Small */
    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Tables - Extra Small */
    .activity-table {
        font-size: 0.65rem;
    }
    
    .activity-table th,
    .activity-table td {
        padding: 0.3rem 0.2rem;
    }
    
    /* Tabs - Extra Small */
    .tabs a.tab-btn {
        padding: 0.4rem 0.5rem;
        font-size: 0.6rem;
    }
    
    /* Cards - Extra Small */
    .auction-image {
        height: 100px;
    }
    
    /* Hero - Extra Small */
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero h1 {
        font-size: 1.2rem;
    }
    
    .hero p {
        font-size: 0.85rem;
    }
    
    /* Pagination - Extra Small */
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}
    
    .activity-table {
        font-size: 0.75rem;
    }
    
    .activity-table th,
    .activity-table td {
        padding: 0.4rem 0.2rem;
    }
    
    .auction-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .auction-card {
        padding: 0.8rem;
    }
    
    .auction-image {
        height: 120px;
    }
    
    .tab-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .notification-dropdown {
        width: 280px;
        right: -70px;
    }
    
    .modal-popup {
        width: 95%;
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.6rem;
    }
    
    .stat-card h3 {
        font-size: 1.2rem;
    }
    
    .stat-card p {
        font-size: 0.75rem;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 1rem 0;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .chat-messages {
        min-height: calc(100vh - 250px);
    }
    
    .chat-form {
        padding: 0.8rem;
    }
    
    .chat-form textarea {
        min-height: 40px;
        max-height: 80px;
    }
}

/* Ensure messages page works well on mobile */
@media (max-width: 768px) {
    .conversation-item {
        padding: 0.8rem;
    }
    
    .conversation-image {
        width: 50px;
        height: 50px;
        margin-right: 0.8rem;
    }
    
    .conversation-title {
        font-size: 0.9rem;
    }
    
    .conversation-meta {
        font-size: 0.8rem;
    }
    
    .conversation-last {
        font-size: 0.8rem;
    }
    
    .unread-badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .chat-header {
        padding: 0.8rem;
    }
    
    .chat-header h3 {
        font-size: 1rem;
    }
    
    .chat-header p {
        font-size: 0.8rem;
    }
    
    .message-bubble {
        max-width: 85%;
        padding: 0.6rem 0.8rem;
    }
    
    .message-info {
        font-size: 0.7rem;
    }
    
    .chat-form textarea {
        font-size: 0.9rem;
    }
    
    .chat-form .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Messages page full width override */
body.messages-page .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

body.messages-page .messages-container {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 100vh !important;
    width: 100% !important;
}

body.messages-page .chat-container,
body.messages-page .conversation-list {
    width: 100% !important;
}

body.messages-page .chat-header,
body.messages-page .messages-header {
    width: 100% !important;
    box-sizing: border-box !important;
}

body.messages-page .chat-messages,
body.messages-page .chat-form {
    width: 100% !important;
    box-sizing: border-box !important;
}

body.messages-page .conversation-item {
    width: 100% !important;
    box-sizing: border-box !important;
}

body.messages-page .no-conversations {
    width: 100% !important;
    box-sizing: border-box !important;
}
