/* 自定義樣式增強 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 深色主題增強 */
body {
    background: linear-gradient(135deg, #0c0c0f 0%, #131318 100%);
    min-height: 100vh;
}

/* 卡片懸停效果 */
.company-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.company-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

/* 潛力評分進度條 */
.score-bar {
    height: 8px;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 25%, #eab308 50%, #22c55e 75%, #10b981 100%);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.score-indicator {
    position: absolute;
    top: -2px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    border: 2px solid #3b82f6;
    transition: left 0.3s ease;
}

/* 技術標籤 */
.tech-tag {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
    margin: 0.125rem;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
}

/* 狀態指示器 */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-active {
    background-color: #10b981;
}

.status-warning {
    background-color: #f59e0b;
}

.status-error {
    background-color: #ef4444;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 圖表容器優化 */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* 模態框動畫 */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 按鈕懸停效果增強 */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
}

/* 篩選器樣式增強 */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

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

::-webkit-scrollbar-track {
    background: #1a1a20;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* 響應式優化 */
@media (max-width: 768px) {
    .company-card {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* 加載動畫 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #1a1a20;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #1a1a20;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    border: 1px solid #3b82f6;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 成功/錯誤消息 */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-left-color: #10b981;
    color: #10b981;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
    color: #ef4444;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
    color: #f59e0b;
}