/* =====================================================
   산지경매사 모의 프로그램 - 메인 스타일시트
   ===================================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
    background: #e8eaed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   초기 설정 화면
   ===================================================== */
.setup-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 400px;
}

.setup-container h1 {
    text-align: center;
    color: #2c5aa0;
    margin-bottom: 30px;
    font-size: 24px;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.start-btn {
    width: 100%;
    padding: 15px;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

.start-btn:hover {
    background: #1e3d6f;
}

/* =====================================================
   메인 경매 화면
   ===================================================== */
.main-container {
    width: 100%;
    max-width: 1400px;
    height: 100vh;
    background: #d4dde4;
    border: 3px solid #a0a8b0;
    display: none;
    flex-direction: column;
}

/* Header Section */
.header {
    background: linear-gradient(to bottom, #e8f0f8, #d4dde4);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #a0a8b0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    background: #2c5aa0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
}

.title {
    font-size: 20px;
    color: #2c5aa0;
    font-weight: bold;
}

.user-info {
    background: #5a9fd4;
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: bold;
}

/* Timer Display */
.timer-display {
    background: white;
    padding: 10px 30px;
    border-radius: 5px;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    border: 2px solid #a0a8b0;
}

.timer-display.warning {
    color: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Content Area */
.content {
    flex: 1;
    display: flex;
    padding: 20px;
    gap: 20px;
}

/* =====================================================
   Left Panel
   ===================================================== */
.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.instruction-text {
    background: #c8d4e0;
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.product-label {
    background: #b8c8d8;
    padding: 10px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    color: #2c5aa0;
}

.image-container {
    flex: 1;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* =====================================================
   Right Panel
   ===================================================== */
.right-panel {
    width: 450px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Info Table */
.info-table {
    background: white;
    border: 2px solid #a0a8b0;
    border-radius: 5px;
    overflow: hidden;
}

.info-table .header-row {
    background: #5a9fd4;
    color: white;
    display: flex;
}

.info-table .header-row > div {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border-right: 1px solid #4a8fc4;
}

.info-table .header-row > div:last-child {
    border-right: none;
}

.info-table .data-row {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.info-table .data-row > div {
    flex: 1;
    padding: 8px;
    text-align: center;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
}

.info-table .data-row > div:last-child {
    border-right: none;
}

.info-table .label {
    background: #e8f0f8;
    font-weight: bold;
    color: #2c5aa0;
}

/* Bid Info */
.bid-info {
    background: #5a9fd4;
    color: white;
    padding: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
}

.bid-info .price {
    color: #ffeb3b;
    font-size: 32px;
}

/* =====================================================
   전자식 모드 - 손가락 표시
   ===================================================== */
.finger-section {
    background: white;
    border: 2px solid #a0a8b0;
    border-radius: 5px;
    padding: 10px;
}

.finger-grid {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.finger-box {
    width: 70px;
    height: 90px;
    background: #f0f0f0;
    border: 2px solid #5a9fd4;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.finger-number {
    position: absolute;
    top: 5px;
    background: #5a9fd4;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.finger-image {
    width: 50px;
    height: 60px;
    object-fit: contain;
}

/* =====================================================
   수기식 모드 - 테이블
   ===================================================== */
.manual-table {
    background: white;
    border: 2px solid #a0a8b0;
    border-radius: 5px;
    overflow: hidden;
}

.manual-table thead {
    background: #5a9fd4;
    color: white;
}

.manual-table th, 
.manual-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.manual-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

/* =====================================================
   Action Buttons
   ===================================================== */
.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bid-btn {
    background: #8bc34a;
    color: white;
}

.bid-btn:hover {
    background: #7cb342;
}

.pass-btn {
    background: #ff9800;
    color: white;
}

.pass-btn:hover {
    background: #fb8c00;
}

.btn-key {
    background: rgba(255,255,255,0.3);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 14px;
}

/* =====================================================
   품목 표시 모달
   ===================================================== */
.item-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.item-modal.show {
    display: flex;
}

.item-display {
    background: white;
    padding: 40px 60px;
    border-radius: 10px;
    text-align: center;
}

.item-display h2 {
    color: #2c5aa0;
    font-size: 28px;
    margin-bottom: 10px;
}

.item-display .item-name {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    margin: 20px 0;
}

.item-display .item-scientific {
    font-size: 20px;
    color: #666;
    font-style: italic;
}

/* =====================================================
   결과 화면
   ===================================================== */
.result-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 600px;
    display: none;
}

.result-container h2 {
    text-align: center;
    color: #2c5aa0;
    margin-bottom: 30px;
}

.result-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 18px;
}

.result-row .label {
    font-weight: bold;
    color: #666;
}

.result-row .value {
    color: #2c5aa0;
    font-weight: bold;
}

.restart-btn {
    width: 100%;
    padding: 15px;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.restart-btn:hover {
    background: #1e3d6f;
}
