/**
 * JSON 轉換器樣式
 */

/* 主要容器樣式 */
.json-converter-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 輸入框樣式 */
#jsonInput, #arrayOutput, #formattedJson {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

#jsonInput:focus, #arrayOutput:focus, #formattedJson:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 按鈕樣式 */
.btn-group-custom {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-custom {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 狀態訊息樣式 */
#statusMessage {
    border-radius: 8px;
    border: none;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 範例代碼樣式 */
pre code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
}

.bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .btn-group-custom {
        flex-direction: column;
    }

    .btn-custom {
        width: 100%;
        margin-bottom: 8px;
    }

    #jsonInput, #arrayOutput, #formattedJson {
        font-size: 12px;
    }
}

/* 輸入驗證樣式 */
.json-input-valid {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.1);
}

.json-input-invalid {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.1);
}

/* 輸出區域樣式 */
.output-area {
    position: relative;
}

.output-area::after {
    content: "點擊複製";
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 12px;
    color: #6c757d;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.output-area:hover::after {
    opacity: 1;
}

/* 卡片樣式增強 */
.json-converter-card {
    border: 1px solid #e9ecef;
    box-shadow: none;
    border-radius: 8px;
}

.json-converter-header {
    background: #ffffff;
    color: #212529;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0 !important;
    padding: 20px;
}

.json-converter-header .card-title {
    margin: 0;
    font-weight: 600;
    color: #212529;
}

.json-converter-header .card-subtitle {
    margin: 8px 0 0 0;
    color: #6c757d;
}

.card-title {
    margin: 0;
    font-weight: 600;
}

.card-subtitle {
    margin: 8px 0 0 0;
}

/* 表單標籤樣式 */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* 範例區域樣式 */
.example-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.example-section h5 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

.example-section h6 {
    color: #6c757d;
    margin-bottom: 10px;
    font-weight: 500;
}

/* 滾動條樣式 */
textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
