/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #f44336;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --border-color: #ddd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация */
.navbar {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--light-color);
}

.btn-login, .btn-register {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
}

.btn-logout {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    background: rgba(255,255,255,0.2);
}

/* Главный контент */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero секция */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

.btn:hover {
    background: var(--secondary-color);
}

.btn-primary {
    background: var(--primary-color);
}

.btn-secondary {
    background: #6c757d;
}

.btn-success {
    background: var(--success-color);
}

.btn-danger {
    background: var(--danger-color);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Сетка аукционов */
.auction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.auction-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.auction-card:hover {
    transform: translateY(-5px);
}

.auction-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--light-color);
}

.auction-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 4rem;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.auction-info {
    padding: 1.5rem;
}

.auction-info h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.wood-type {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.category {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.current-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.bid-count {
    color: #666;
    font-size: 0.9rem;
}

.auction-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Авторизация */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary-color);
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.demo-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0f0f0;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* Уведомления */
.flash-messages {
    margin-bottom: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Детали аукциона */
.auction-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.main-image {
    width: 100%;
    border-radius: 10px;
}

.no-image-large {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    border-radius: 10px;
}

.seller-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.current-price-large {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.starting-price {
    color: #666;
    font-size: 0.9rem;
}

.time-remaining {
    background: #fff3cd;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.auction-ended {
    background: #f8d7da;
    padding: 1rem;
    border-radius: 5px;
    color: #721c24;
}

.bid-form {
    margin: 2rem 0;
}

.item-details {
    margin-top: 2rem;
}

.item-details ul {
    list-style: none;
    margin: 1rem 0;
}

.item-details li {
    padding: 0.5rem 0;
}

.description {
    line-height: 1.8;
    color: #555;
}

/* История ставок */
.bid-history {
    background: white;
    padding: 2rem;
    border-radius: 10px;
}

.bid-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.bid-table th,
.bid-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.bid-table th {
    background: var(--light-color);
    font-weight: 600;
}

.winning-bid {
    background: #d4edda;
}

/* Список аукционов */
.auction-list-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.item-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-sold {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.winning {
    color: var(--success-color);
    font-weight: bold;
}

.losing {
    color: var(--danger-color);
}

/* Советы */
.tips-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tips-grid {
    display: grid;
    gap: 2rem;
}

.tip-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tip-header {
    margin-bottom: 1rem;
}

.tip-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.tip-tags {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    background: var(--light-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.tip-content {
    line-height: 1.8;
    color: #555;
}

.wood-types-section {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
}

.wood-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.wood-type-card {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
}

.wood-type-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Профиль */
.profile-header {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.reviews-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
}

.review-card {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.review-card:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.rating-input {
    display: flex;
    gap: 1rem;
}

.rating-input input {
    display: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 1.2rem;
}

.rating-input input:checked + label {
    color: gold;
}

/* Админ-панель */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-card.warning {
    border-left: 4px solid var(--warning-color);
}

.stat-icon {
    font-size: 3rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.moderation-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
}

.moderation-item {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.moderation-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Особенности */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Футер */
.footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .auction-grid {
        grid-template-columns: 1fr;
    }
    
    .auction-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .features {
        grid-template-columns: 1fr 1fr;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}