/* 家具競標管理控制台樣式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 頭部樣式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.1em;
    color: #666;
}

/* 主要內容區域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* 區塊樣式 */
section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

section h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

/* 連線狀態 */
.status-indicator {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.status {
    font-size: 1.2em;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    margin-bottom: 10px;
}

.status.offline {
    background: #ff6b6b;
    color: white;
}

.status.online {
    background: #4ecdc4;
    color: white;
}

.status.connecting {
    background: #feca57;
    color: #333;
}

/* 使用說明 */
.instructions {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.instructions ol {
    margin-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.instructions a {
    color: #007bff;
    text-decoration: none;
}

.instructions a:hover {
    text-decoration: underline;
}

/* 控制組 */
.control-group {
    margin-bottom: 25px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 按鈕樣式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 按鈕顏色 */
.btn-primary {
    background: #007bff;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* 檔案輸入 */
.import-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.file-input {
    display: none;
}

.file-label {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-label:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* 日誌區域 */
.log-section {
    grid-column: 1 / -1;
}

.log-container {
    background: #1e1e1e;
    color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin-bottom: 10px;
}

.log-entry {
    margin-bottom: 5px;
    line-height: 1.4;
}

.timestamp {
    color: #6c757d;
    margin-right: 10px;
}

.message {
    color: #f8f9fa;
}

/* 滾動條樣式 */
.log-container::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-track {
    background: #2c2c2c;
}

.log-container::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* 響應式設計 */
@media (max-width: 576px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    section {
        padding: 15px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .import-section {
        flex-direction: column;
        align-items: stretch;
    }
}