/* 全域樣式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 導航列樣式 */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* 卡片樣式 */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: none;
    font-weight: 600;
}

/* 按鈕樣式 */
.btn {
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    padding: 10px 25px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-lg {
    padding: 12px 35px;
    font-size: 1.1rem;
}

/* 表單樣式 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: translateY(-1px);
}

.form-control-lg {
    padding: 15px 20px;
    font-size: 1.1rem;
}

/* 進度條樣式 */
.progress {
    height: 12px;
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
    background: linear-gradient(45deg, #007bff, #0056b3);
}

/* 警告框樣式 */
.alert {
    border-radius: 12px;
    border: none;
    padding: 15px 20px;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

/* 特色框樣式 */
.feature-box {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

/* 分數框樣式 */
.score-box {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 3px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.score-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.score-box:hover::before {
    transform: translateX(0);
}

.score-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.score-value {
    font-size: 3rem;
    font-weight: 800;
    margin: 15px 0;
    background: linear-gradient(45deg, #007bff, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 排序選項樣式 */
.sortable-container {
    min-height: 300px;
    padding: 10px;
}

.option-item {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: move;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
}

.option-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.option-item.ui-sortable-helper {
    transform: rotate(3deg) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.option-rank {
    position: absolute;
    top: -12px;
    left: -12px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.option-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option-item:hover .option-controls {
    opacity: 1;
}

.option-controls .btn {
    padding: 8px 12px;
    font-size: 14px;
    margin-left: 5px;
    border-radius: 20px;
}

.option-text {
    font-weight: 500;
    font-size: 1.1rem;
    margin-right: 100px;
    line-height: 1.4;
}

/* 解釋框樣式 */
.interpretation-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.interpretation-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 載入動畫 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 頁腳樣式 */
footer {
    background: rgba(248, 249, 250, 0.95) !important;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .card-body {
        padding: 20px;
    }
    
    .score-value {
        font-size: 2rem;
    }
    
    .option-text {
        margin-right: 50px;
        font-size: 1rem;
    }
    
    .option-controls {
        position: static;
        opacity: 1;
        margin-top: 10px;
    }
    
    .btn-lg {
        padding: 10px 25px;
        font-size: 1rem;
    }
}

/* 列印樣式 */
@media print {
    body {
        background: white !important;
    }
    
    .navbar, .btn, footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        margin-bottom: 20px !important;
    }
    
    .card-header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

/* 自定義滾動條 */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
}