
/* Sticker CDN 主樣式文件 */
:root {
    --primary-color: #4a6cf7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 深色主題樣式 */
body.dark-theme {
    --light-color: #212529;
    --dark-color: #f8f9fa;
    background-color: #1a1a1a;
    color: #f8f9fa;
}

body.dark-theme .card {
    background-color: #2d2d2d;
    color: #f8f9fa;
}

body.dark-theme .card-text,
body.dark-theme .text-muted,
body.dark-theme .card-title {
    color: #e9ecef !important;
}

body.dark-theme .card-text.text-muted {
    color: #adb5bd !important;
}

body.dark-theme .navbar {
    background: linear-gradient(135deg, #2d4aa8, #4a3eb8);
}

body.dark-theme .search-box {
    background-color: #2d2d2d;
    color: #f8f9fa;
}

body.dark-theme .sticker-item {
    background-color: #2d2d2d;
    color: #f8f9fa;
}

/* 深色主題下的模態框樣式 */
body.dark-theme .modal-content {
    background-color: #2d2d2d;
    color: #f8f9fa;
    border-color: #3d3d3d;
}

body.dark-theme .modal-header {
    border-bottom-color: #3d3d3d;
}

body.dark-theme .modal-footer {
    border-top-color: #3d3d3d;
}

body.dark-theme .modal-title {
    color: #f8f9fa;
}

body.dark-theme .form-label {
    color: #e9ecef;
}

body.dark-theme .form-control {
    background-color: #1a1a1a;
    border-color: #3d3d3d;
    color: #f8f9fa;
}

body.dark-theme .form-control:focus {
    background-color: #1a1a1a;
    border-color: #4a6cf7;
    color: #f8f9fa;
    box-shadow: 0 0 0 0.25rem rgba(74, 108, 247, 0.25);
}

body.dark-theme .form-select {
    background-color: #1a1a1a;
    border-color: #3d3d3d;
    color: #f8f9fa;
}

body.dark-theme .form-select:focus {
    background-color: #1a1a1a;
    border-color: #4a6cf7;
    color: #f8f9fa;
    box-shadow: 0 0 0 0.25rem rgba(74, 108, 247, 0.25);
}

body.dark-theme .form-text {
    color: #adb5bd;
}

body.dark-theme .form-check-input {
    background-color: #1a1a1a;
    border-color: #3d3d3d;
}

body.dark-theme .form-check-input:checked {
    background-color: #4a6cf7;
    border-color: #4a6cf7;
}

body.dark-theme .form-check-label {
    color: #e9ecef;
}

/* 導航欄樣式 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* 主內容區域 */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* 卡片樣式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-top {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    object-fit: cover;
    height: 200px;
}

/* 貼圖網格樣式 */
.sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.sticker-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    cursor: pointer;
}

.sticker-item:hover {
    transform: scale(1.05);
}

.sticker-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* 按鈕樣式 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3a5bd9, #5a4bd7);
}

/* 分頁樣式 */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 搜尋框樣式 */
.search-box {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* 頁尾樣式 */
.footer {
    background: #f8f9fa;
    color: #212529;
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

.footer .text-muted {
    color: #6c757d !important;
}

/* 深色主題下的頁尾樣式 */
body.dark-theme .footer {
    background: #1a1a1a;
    color: #f8f9fa;
}

body.dark-theme .footer .text-muted {
    color: #adb5bd !important;
}

/* 載入動畫 */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.loading-spinner.show {
    display: block;
}

/* 主題切換按鈕 */
.theme-toggle {
    cursor: pointer;
    padding: 0.5rem;
    background: transparent;
    transition: background 0.2s;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* 在移動設備上優化主題切換按鈕 */
@media (max-width: 768px) {
    .theme-toggle {
        padding: 0.25rem 0.5rem;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .sticker-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
