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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    background-image: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    min-height: 100vh;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, #d4691e 0%, #8b4513 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.main-nav a:hover {
    opacity: 0.8;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

/* Typography */
h1 {
    color: #d4691e;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

h2 {
    color: #8b4513;
    margin: 1.5rem 0 1rem;
    font-size: 1.5rem;
}

h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: #d4691e;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

.btn:hover {
    background: #c55a15;
}

.btn-primary {
    background: #d4691e;
}

.btn-primary:hover {
    background: #c55a15;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #d4691e;
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Login Box */
.login-box {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-box h1 {
    text-align: center;
    color: #d4691e;
    margin-bottom: 0.5rem;
}

.login-box h2 {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.register-link {
    text-align: center;
    margin-top: 1rem;
}

.register-link a {
    color: #d4691e;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Messages */
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
}

/* Actions */
.actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Grids */
.auctions-grid,
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Cards */
.auction-card,
.item-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.auction-card:hover,
.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.auction-image,
.item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 200px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.auction-details,
.item-details {
    padding: 1.5rem;
}

.auction-info,
.item-info {
    margin: 1rem 0;
}

.auction-info p,
.item-info p {
    margin: 0.5rem 0;
}

.description {
    color: #666;
    margin: 1rem 0;
}

.category {
    color: #8b4513;
    font-style: italic;
    margin: 0.5rem 0;
}

/* Item Detail */
.item-detail {
    margin-top: 2rem;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-badge {
    background: #8b4513;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.item-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.item-image-large img {
    width: 100%;
    border-radius: 8px;
}

.no-image-large {
    width: 100%;
    height: 400px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border-radius: 8px;
}

.item-meta {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.item-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Auction Detail */
.auction-detail {
    margin-top: 2rem;
}

.auction-main {
    margin-bottom: 2rem;
}

.auction-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.auction-image-large img {
    width: 100%;
    border-radius: 8px;
}

.auction-info-panel {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.auction-status {
    padding: 0.8rem;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auction-status.active {
    background: #d1ecf1;
    color: #0c5460;
}

.auction-status.sold {
    background: #d4edda;
    color: #155724;
}

.auction-status.expired {
    background: #f8d7da;
    color: #721c24;
}

.price-info {
    margin: 2rem 0;
    text-align: center;
}

.current-price {
    font-size: 2rem;
    color: #d4691e;
    font-weight: bold;
}

.buyout-info {
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem;
    background: #d4edda;
    border-radius: 4px;
}

.winner-info {
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem;
    background: #fff3cd;
    border-radius: 4px;
}

.bid-form,
.buyout-form {
    margin-top: 2rem;
}

.bid-form button,
.buyout-form button {
    width: 100%;
}

.item-description {
    margin: 2rem 0;
}

/* Bid History */
.bid-history {
    margin-top: 3rem;
}

.bid-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.bid-table th,
.bid-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bid-table th {
    background: #f8f9fa;
    font-weight: 600;
}

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

/* Filters */
.filters {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    margin: 2rem 0;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form input,
.filter-form select {
    flex: 1;
    min-width: 200px;
}

/* Status Badge */
.status-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-badge.active {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.sold {
    background: #d4edda;
    color: #155724;
}

.status-badge.expired {
    background: #f8d7da;
    color: #721c24;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Help Box */
.help-box {
    background: #e7f3ff;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 2rem;
}

.help-box h3 {
    color: #004085;
    margin-bottom: 1rem;
}

.help-box ul {
    margin-left: 1.5rem;
}

.help-box li {
    margin: 0.5rem 0;
}

.help-box a {
    color: #004085;
}

/* Special States */
.winning-bid {
    color: #28a745;
    font-weight: bold;
}

.won-auction {
    color: #155724;
    font-weight: bold;
}

/* Sections */
.my-auctions-section,
.my-bids-section {
    margin: 3rem 0;
}

.back-link {
    margin-top: 2rem;
}

/* Form Container */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .auctions-grid,
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .item-content,
    .auction-content {
        grid-template-columns: 1fr;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form input,
    .filter-form select {
        width: 100%;
    }
}
