/* 
 * 本程序由【小马克程序定制】设计与制作，如有售后和开发需求请联系： 微信同号：19918881666，官网：https://xiaomaker.cn
 */
:root {
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --bg-color: #f0f2f5;
    --white: #ffffff;
    --text-color: #333333;
    --secondary-text: #666666;
    --border-color: #e8e8e8;
    --error-color: #ff4d4f;
    --success-color: #52c41a;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

/* 通用样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-block {
    display: block;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

.error-msg {
    color: var(--error-color);
    margin-top: 10px;
    text-align: center;
    display: none;
}

/* 登录页面 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.site-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 32px;
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 20px;
}

/* 竞拍页面 */
.auction-header {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-info {
    font-size: 14px;
    color: var(--secondary-text);
}

.logout-link {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 10px;
}

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

.auction-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.stall-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background-color: #f5f5f5;
}

.stall-info {
    padding: 20px;
}

.stall-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stall-status {
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #999;
}

.status-active {
    background: #e6f7ff;
    color: var(--primary-color);
}

.status-ended {
    background: #fff1f0;
    color: var(--error-color);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.current-price {
    font-size: 36px;
    color: var(--error-color);
    font-weight: bold;
}

.price-label {
    font-size: 14px;
    color: var(--secondary-text);
    margin-bottom: 4px;
}

.timer {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bid-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.bid-input-group {
    flex: 1;
    position: relative;
}

.bid-hint {
    font-size: 12px;
    color: var(--secondary-text);
    margin-top: 4px;
}

.bid-history {
    background: #fafafa;
    border-radius: 4px;
    padding: 15px;
}

.history-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item.top {
    color: var(--error-color);
    font-weight: bold;
}

.history-time {
    color: #999;
    font-size: 12px;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .stall-image {
        height: 200px;
    }
    
    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .timer {
        width: 100%;
        justify-content: space-between;
    }
    
    .current-price {
        font-size: 28px;
    }
}
