/* 🌟 무료 웹 폰트 'Pretendard' 적용 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root { color-scheme: light; }

* { 
    box-sizing: border-box; margin: 0; padding: 0; 
    font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif; 
    -webkit-tap-highlight-color: transparent !important; 
}

body { background-color: #f7f9fc; color: #1d1d1f; padding: 20px; -webkit-user-select: none; user-select: none; }

input, textarea { 
    -webkit-user-select: text; user-select: text; padding: 14px; 
    border: 1.5px solid #e1e4e8; border-radius: 12px; font-size: 15px; 
    width: 100%; transition: all 0.2s ease; 
    background-color: #ffffff !important; color: #1d1d1f !important; color-scheme: light;
}
input:focus, textarea:focus { outline: none; border-color: #4361ee; box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15); }

select {
    padding: 14px; border: 1.5px solid #e1e4e8; border-radius: 12px; font-size: 15px; width: 100%;
    background-color: #ffffff !important; color: #1d1d1f !important; color-scheme: light;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right 15px center; background-size: 16px; padding-right: 40px;
    transition: none !important;
}
select:focus { outline: none; border-color: #4361ee; box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15); }
select option { background-color: #ffffff !important; color: #1d1d1f !important; }

.container { max-width: 1100px; margin: 0 auto; position: relative; overflow-x: hidden; width: 95%; }
header { text-align: center; margin-bottom: 20px; }
.header-logo { height: 50px; vertical-align: middle; margin-right: 10px; }
h1 { color: #111827; font-size: 28px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.3; }
.subtitle { color: #6b7280; margin-top: 8px; font-size: 15px; font-weight: 500; }

.card { background: white; padding: 24px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); border: 1px solid #f1f3f5; margin-bottom: 20px; }
.card:last-child { margin-bottom: 0; }
.hidden { display: none !important; }

.notice-card { background-color: #fffbeb; border: 1px solid #fde68a; margin-bottom: 20px; transition: all 0.3s ease; }
.notice-card li { margin-bottom: 6px; }

.form-group { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.form-group.inline { display: flex; flex-direction: row; gap: 10px; align-items: center; }
.form-group.inline > input, .form-group.inline > select { flex: 1; min-width: 0; }
.form-group.inline > button { flex-shrink: 0; white-space: nowrap; }

button { 
    display: inline-flex; justify-content: center; align-items: center; text-align: center;
    padding: 14px 20px; background-color: #10b981; color: white; border: none; border-radius: 12px; 
    font-weight: 600; cursor: pointer; transition: all 0.2s ease; font-size: 15px; 
    line-height: 1.4; white-space: nowrap; word-break: keep-all;
}
button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }
button:disabled { background-color: #d1d5db; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary { background-color: #4361ee; }
.btn-primary:hover { box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2); }
.btn-danger { background-color: #ef4444; }
.btn-danger:hover { box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-outline { background: transparent; color: #4361ee; border: 1.5px solid #4361ee; }

.auction-layout { 
    display: grid; 
    grid-template-columns: 1.4fr 1.1fr; 
    gap: 20px; 
    align-items: stretch;
    width: 100%;
}

.left-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.right-col { display: flex; flex-direction: column; gap: 15px; min-width: 0; height: 1px; min-height: 100%; }

.left-col .card, .right-col .card { margin-bottom: 0; display: flex; flex-direction: column; min-height: 0; }
.left-col .card { flex: 1; }
.right-col .card:nth-child(1), .right-col .card:nth-child(3) { flex: 1; min-height: 0; }
.right-col .card:nth-child(2) { flex: none; } 

.slider-container { position: relative; width: 100%; height: auto; aspect-ratio: 4/3; background-color: #f8fafc; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid #e2e8f0; }
#main-slider-image { width: 100%; height: 100%; object-fit: contain; cursor: pointer; transition: opacity 0.2s ease; }
.slider-counter { position: absolute; bottom: 15px; right: 15px; background: rgba(0,0,0,0.6); color: white; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; pointer-events: none; }
.thumbnail-gallery { display: flex; gap: 12px; margin-top: 15px; overflow-x: auto; padding-bottom: 8px; }
.thumbnail-gallery img { height: 65px; width: 85px; object-fit: cover; border-radius: 10px; cursor: pointer; opacity: 0.5; transition: 0.2s; border: 2px solid transparent; }
.thumbnail-gallery img:hover { opacity: 0.8; }
.thumbnail-gallery img.active { border-color: #4361ee; opacity: 1; }

.spec-tags { display: flex; gap: 8px; justify-content: center; margin: 15px 0 10px; flex-wrap: wrap; }
.tag { background: #fef3c7; color: #d97706; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.tag.sex { background: #dcfce7; color: #15803d; }
.tag.weight { background: #fee2e2; color: #b91c1c; }

.timer-box { text-align: center; background: #1e293b; color: #fbbf24; padding: 16px; border-radius: 14px; font-size: 22px; font-weight: 800; margin-bottom: 20px; animation: pulse 2s infinite; box-shadow: 0 4px 15px rgba(0,0,0,0.1); line-height: 1.4; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); } 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); } }

.price-board { display: flex; flex-direction: column; gap: 12px; background: #f8fafc; padding: 20px; border-radius: 16px; border: 1px solid #e2e8f0; border-left: 6px solid #4361ee; margin-top: 20px; }
.price-block { display: flex; justify-content: space-between; align-items: center; background: white; padding: 16px 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.price-block .label { margin-bottom: 0; font-size: 15px; font-weight: 600; color: #64748b; text-align: left; }
.price-block .price { font-size: 24px; font-weight: 800; color: #f97316; }
.price-block .sub-price { font-size: 18px; font-weight: 700; color: #475569; }
.price-block .bidder { font-size: 18px; font-weight: 800; color: #4361ee; }

.quick-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 15px; margin-bottom: 15px; }
.quick-buttons button { background-color: #eff6ff; color: #3b82f6; border: 1px solid #bfdbfe; padding: 16px 5px; font-size: 15px; font-weight: 700; border-radius: 12px; }

.bottom-section { display: flex; gap: 25px; margin-top: 25px; }
.half { flex: 1; min-width: 0; }

.log-list { list-style: none; height: 220px; min-height: 0; overflow-y: auto; flex: 1; background: #f8fafc; padding: 12px; border-radius: 12px; border: 1px solid #e2e8f0; margin-top: 15px; }
.log-list li { padding: 12px; border-bottom: 1px solid #f1f5f9; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; color: #334155; }
.admin-chat { background-color: #fffbeb !important; border-left: 4px solid #f59e0b; color: #b45309; font-weight: 700; border-radius: 4px; }

.modal { position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.9); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-content { max-width: 95%; max-height: 95%; object-fit: contain; border-radius: 12px; }
.close-modal { position: absolute; top: 25px; right: 35px; color: white; font-size: 45px; cursor: pointer; }

#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #ef4444; color: white; padding: 12px 24px; border-radius: 30px; font-weight: bold; font-size: 15px; box-shadow: 0 4px 12px rgba(239,68,68,0.4); opacity: 0; transform: translateY(-20px); transition: all 0.3s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) { .auction-layout { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    body { padding: 12px; }
    .auction-layout, .bottom-section { grid-template-columns: 1fr; display: flex; flex-direction: column; gap: 15px; height: auto; }
    .left-col, .right-col { height: auto; display: flex; flex-direction: column; gap: 15px; }
    .left-col .card, .right-col .card { flex: none !important; margin-bottom: 0; }
    .slider-container { height: 280px; border-radius: 12px; }
    .timer-box { font-size: 18px; padding: 14px; }
    .price-board { padding: 16px; border-radius: 12px; }
    .price-block { padding: 14px 16px; border-radius: 10px; }
    .price-block .label { font-size: 14px; }
    .price-block .price { font-size: 20px; }
    .price-block .sub-price, .price-block .bidder { font-size: 16px; }
    .quick-buttons { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .quick-buttons button { padding: 14px 0; font-size: 14px; border-radius: 10px; }
    .right-col .log-list { height: 200px; flex: none; }
}
