/* สไตล์หลักสำหรับหน้าประมูล */
.auction-container {
    padding: 20px 0;
    position: relative;
}

.auction-title {
    color: #ffc107;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.auction-subtitle {
    color: #aaa;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* สไตล์แสดงข้อมูลผู้ใช้ */
.user-info-bar {
    position: absolute;
    top: 0;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 8px 8px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    z-index: 100;
    border: 1px solid #444;
    border-top: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.user-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-id {
    background-color: #444;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.user-name {
    color: #ffc107;
    font-weight: 600;
}

.user-points {
    background: linear-gradient(135deg, #ff7e00 0%, #ffc107 100%);
    color: #000;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* สไตล์แท็บ */
.auction-tabs {
    border-bottom: 2px solid #555;
    margin-bottom: 30px;
}

.auction-tabs .nav-link {
    color: #ddd;
    background-color: #222;
    border-radius: 10px 10px 0 0;
    padding: 12px 20px;
    margin-right: 5px;
    border: 1px solid #444;
    border-bottom: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.auction-tabs .nav-link i {
    margin-right: 8px;
}

.auction-tabs .nav-link:hover {
    background-color: #333;
    color: #ffc107;
}

.auction-tabs .nav-link.active {
    background-color: #333;
    color: #ffc107;
    border-bottom: 2px solid #ffc107;
    transform: translateY(2px);
}

.auction-tab-content {
    background-color: #222;
    border-radius: 0 10px 10px 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
}

/* สไตล์การ์ดประมูล */
.auction-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #444;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.auction-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: #ffc107;
}

.auction-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.auction-status-badge.active {
    background: linear-gradient(135deg, #ff7e00 0%, #ffc107 100%);
    color: #000;
}

.auction-status-badge.upcoming {
    background: linear-gradient(135deg, #2196f3 0%, #03a9f4 100%);
    color: #fff;
}

.auction-status-badge i {
    margin-right: 5px;
}

.auction-image {
    position: relative;
    overflow: hidden;
    padding-top: 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

.auction-image img {
    max-width: 80%;
    height: 200px;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.auction-card:hover .auction-image img {
    transform: scale(1.05);
}

.auction-details {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.auction-item-name {
    color: #ffc107;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.auction-item-desc {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.auction-bid-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #444;
}

.current-bid, .current-bidder {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.bid-label, .bidder-label {
    color: #aaa;
}

.bid-amount {
    color: #ffc107;
    font-weight: 600;
}

.bidder-name {
    color: #fff;
    font-weight: 600;
}

.auction-countdown {
    background: linear-gradient(135deg, #333 0%, #222 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #444;
}

.countdown-label {
    color: #aaa;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.countdown-timer {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffc107;
    letter-spacing: 2px;
}

.btn-bid {
    background: linear-gradient(135deg, #ff7e00 0%, #ffc107 100%);
    color: #000;
    font-weight: 600;
    border: none;
    padding: 12px 0;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-bid:hover {
    background: linear-gradient(135deg, #ffc107 0%, #ff7e00 100%);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.btn-bid i {
    margin-right: 8px;
}

/* สไตล์การ์ดประมูลที่กำลังจะมาถึง */
.auction-upcoming {
    opacity: 0.85;
}

.auction-start-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #444;
}

.start-price, .start-time {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.price-label, .time-label {
    color: #aaa;
}

.price-amount {
    color: #2196f3;
    font-weight: 600;
}

.time-value {
    color: #fff;
    font-weight: 600;
}

/* สไตล์ตารางผู้ชนะ */
.auction-winners-table {
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #444;
}

.auction-winners-table th {
    background-color: #333;
    color: #ffc107;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 2px solid #555;
}

.auction-winners-table td {
    vertical-align: middle;
    color: #ddd;
    border-top: 1px solid #444;
}

.winner-item {
    display: flex;
    align-items: center;
}

.winner-item-image {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 5px;
    object-fit: contain;
    background-color: #000;
    padding: 3px;
}

/* สไตล์ Modal เคาะประมูล */
.auction-bid-modal {
    z-index: 1050;
}

.auction-bid-modal .modal-content {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    color: #ddd;
}

.auction-bid-modal .modal-header {
    background-color: #333;
    border-bottom: 1px solid #444;
    border-radius: 10px 10px 0 0;
}

.auction-bid-modal .modal-header .close {
    color: #fff;
    text-shadow: none;
    opacity: 0.8;
}

.auction-bid-modal .modal-title {
    color: #ffc107;
}

.auction-bid-modal .modal-body {
    padding: 20px;
}

.bid-item-info {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
}

.bid-item-image {
    width: 30%;
    padding-right: 15px;
}

.bid-item-image img {
    width: 100%;
    border-radius: 5px;
    border: 1px solid #444;
    background-color: #000;
    padding: 5px;
}

.bid-item-details {
    width: 70%;
}

.bid-item-details h4 {
    color: #ffc107;
    margin-bottom: 10px;
}

.current-price, .min-bid, .your-points {
    margin-bottom: 5px;
}

.bid-form .form-control {
    background-color: #333;
    border: 1px solid #555;
    color: #fff;
}

.bid-form .form-control:focus {
    background-color: #444;
    border-color: #ffc107;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.quick-bid-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.quick-bid {
    flex: 1;
    min-width: calc(25% - 10px);
    text-align: center;
}

.ending-soon {
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { box-shadow: 0 0 0 rgba(255, 0, 0, 0.4); }
    to { box-shadow: 0 0 15px rgba(255, 0, 0, 0.8); }
}

/* สไตล์สำหรับอุปกรณ์มือถือ */
@media (max-width: 767.98px) {
    .auction-tab-content {
        padding: 15px;
    }
    
    .auction-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .auction-tabs .nav-link i {
        margin-right: 5px;
    }
    
    .auction-title {
        font-size: 1.8rem;
    }
    
    .auction-subtitle {
        font-size: 1rem;
    }
    
    .user-info-bar {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 20px;
        border-radius: 8px;
        border-top: 1px solid #444;
        width: 100%;
    }
    
    .user-details {
        width: 100%;
        justify-content: space-around;
    }
    
    .bid-item-info {
        flex-direction: column;
    }
    
    .bid-item-image {
        width: 100%;
        margin-bottom: 15px;
        padding-right: 0;
        text-align: center;
    }
    
    .bid-item-image img {
        width: 60%;
    }
    
    .bid-item-details {
        width: 100%;
    }
}

/* เพิ่มสไตล์สำหรับการแสดงเวลาและเอฟเฟกต์ */
.server-time {
    color: #17a2b8;
    font-size: 0.9rem;
    margin-left: 15px;
    padding: 2px 8px;
    background-color: rgba(23, 162, 184, 0.1);
    border-radius: 4px;
}

.auction-countdown.warning .countdown-timer {
    color: #ffc107;
    animation: pulse 1s infinite;
}

.auction-countdown.urgent .countdown-timer {
    color: #dc3545;
    animation: flash 0.5s infinite;
    font-weight: bold;
}

.auction-countdown.expired .countdown-timer {
    color: #6c757d;
}

.auction-countdown.expired .countdown-label::after {
    content: " (หมดเวลาแล้ว)";
    color: #dc3545;
    font-weight: bold;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.ending-soon {
    animation: bounceIn 0.5s ease-in-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ปรับแต่งการแสดงผลบนมือถือ */
@media (max-width: 768px) {
    .server-time {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
}
