/* Google Ads 報表系統 - 自訂樣式 */

/* 載入動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* 卡片懸停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 側邊欄活動項目 */
.sidebar-active {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    color: #dc2626;
}

/* 表格行懸停效果 */
tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: #fef2f2;
}

/* 載入骨架屏 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 數字計數動畫 */
.count-up {
    font-variant-numeric: tabular-nums;
}

/* 平滑滾動 */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

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

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* 響應式文字 */
@media (max-width: 640px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

/* 打印樣式 */
@media print {
    .no-print {
        display: none;
    }

    body {
        background: white;
    }

    .shadow {
        box-shadow: none;
    }
}

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

/* 狀態徽章 */
.badge-active {
    background-color: #dcfce7;
    color: #166534;
}

.badge-paused {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

/* 進度條 */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #ef4444;
    transition: width 0.3s ease;
}

/* 通知樣式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 數據卡片閃爍效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 表格固定表頭 */
.table-fixed-header {
    position: sticky;
    top: 0;
    background-color: #f9fafb;
    z-index: 10;
}

/* 空狀態插圖 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state svg {
    margin: 0 auto 1rem;
}

/* 搜尋高亮 */
.search-highlight {
    background-color: #fef3c7;
    padding: 2px 4px;
    border-radius: 2px;
}

/* 下拉選單動畫 */
.dropdown-menu {
    animation: dropdownFade 0.2s ease-out;
}

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