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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.logo h1 {
    color: #e74c3c;
    font-size: 28px;
    font-weight: bold;
}

nav {
    display: flex;
    gap: 25px;
}

nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #e74c3c;
}

main {
    padding: 30px 20px;
}

.article-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.article-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    max-height: 500px;
}

.article-info h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.price-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.current-price, .auction-end {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.current-price:last-child, .auction-end:last-child {
    margin-bottom: 0;
}

.label {
    color: #666;
    font-size: 14px;
}

.price {
    font-size: 32px;
    font-weight: bold;
    color: #e74c3c;
}

.bid-section {
    background: #fff;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 25px;
}

.bid-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.bid-form {
    display: flex;
    gap: 10px;
}

.bid-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.bid-author {
    display: flex;
    gap: 10px;
}

.bid-author input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #e74c3c;
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.recent-bids {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.recent-bids h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.bid-item {
    padding: 10px;
    background: white;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bid-item:last-child {
    margin-bottom: 0;
}

.bid-amount {
    font-weight: bold;
    color: #e74c3c;
}

.bid-time {
    font-size: 12px;
    color: #666;
}

.article-description {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.article-description h3 {
    margin-bottom: 15px;
    font-size: 22px;
}

.article-description p {
    white-space: pre-line;
    line-height: 1.8;
}

.comments-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comments-section h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

.comment-form {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

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

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.no-comments {
    color: #999;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.comment-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #e74c3c;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
}

.comment-date {
    font-size: 12px;
    color: #666;
}

.comment-content {
    color: #333;
    line-height: 1.6;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

.article-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.article-gallery img {
    width: 100%;
    max-width: 280px;
    height: 220px;
    object-fit: contain;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
}


.image-gallery {
    position: relative;
    width: 100%;
    height: 420px;
    background: #f4f4f4;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-gallery > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #222;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#prev-image {
    left: 12px;
}

#next-image {
    right: 12px;
}

.gallery-arrow:hover {
    background: white;
}

.image-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 13px;
}

.image-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
}

.image-thumbnails img {
    width: 75px;
    height: 65px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.image-thumbnails img.active {
    border-color: #1769aa;
}

@media (max-width: 600px) {
    .image-gallery {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .article-grid {
        grid-template-columns: 1fr;
    }

    nav {
        flex-direction: column;
        gap: 10px;
    }

    .bid-form {
        flex-direction: column;
    }

    .current-price, .auction-end {
        flex-direction: column;
        gap: 5px;
    }

    .price {
        font-size: 24px;
    }

    .article-gallery img {
        max-width: 100%;
        height: 200px;
    }
}
