/* 重置和基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #12295D;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 導航欄 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #12295D;
    text-decoration: none;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    margin-right: 10px;
    object-fit: contain;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.logo-img {
    height: 40px;
    width: auto;
    margin-right: 12px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #12295D;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #12295D;
    border-radius: 1px;
}

.nav-auth,
.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: #666;
    font-weight: 500;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 按鈕樣式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background: #12295D;
    color: white;
    box-shadow: 0 4px 15px rgba(18, 41, 93, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(18, 41, 93, 0.6);
}

.btn-outline {
    background: transparent;
    color: #12295D;
    border: 2px solid #12295D;
}

.btn-outline:hover {
    background: #12295D;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-copy {
    padding: 8px 12px;
    background: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.btn-copy:hover {
    background: #e9ecef;
    color: #495057;
}

/* 首頁區域 */
.hero {
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content {
    color: white;
    width: 100%;
    max-width: 600px;
}

.hero-brand {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* 頁面底部的品牌標識 */
main + .hero-brand {
    margin-bottom: 0;
    margin-top: 60px;
    padding: 40px 20px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-logo {
    height: 50px;
    width: auto;
    margin-right: 15px;
    object-fit: contain;
}

.brand-text {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    color: #F23A1D;
}

.hero-description {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* 短網址生成器 */
.url-shortener {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.input-group input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(18, 41, 93, 0.3);
}

/* 高級選項 */
.advanced-options {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(18, 41, 93, 0.1);
}

.custom-url-group {
    margin-bottom: 1rem;
}

.custom-url-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.custom-url-group input:focus {
    outline: none;
    border-color: #12295D;
    box-shadow: 0 0 0 3px rgba(18, 41, 93, 0.1);
}

.url-preview {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.url-preview #customPreview {
    color: #12295D;
    font-weight: 600;
}

.note-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.note-group input:focus {
    outline: none;
    border-color: #12295D;
    box-shadow: 0 0 0 3px rgba(18, 41, 93, 0.1);
}

.result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-item label {
    font-weight: 600;
    color: #666;
    min-width: 100px;
}

.result-url {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.result-url input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    color: #495057;
    font-family: monospace;
}

/* 快速開始區域 */
.quick-start {
    padding: 80px 0;
    background: white;
}

.quick-start-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: white;
}

.step-number {
    width: 50px;
    height: 50px;
    background: #12295D;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.step-content p {
    color: #666;
    line-height: 1.6;
}

.quick-start-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.link-primary {
    color: #12295D;
    text-decoration: none;
    font-weight: 500;
}

.link-primary:hover {
    text-decoration: underline;
}

/* 關於頁面樣式 */
.about-hero {
    padding: 120px 0 80px;
    background: #12295D;
    color: white;
    text-align: center;
}

.about-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.about-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    opacity: 0.9;
}

.about-logo {
    height: 60px;
    width: auto;
    margin-right: 20px;
    object-fit: contain;
}

.about-brand-text {
    font-size: 1.3rem;
    font-weight: 500;
    opacity: 0.8;
    letter-spacing: 0.5px;
}

/* 功能區域 */
.features {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 40px 20px;
    border-radius: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: white;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: #12295D;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* 技術優勢區域 */
.tech-advantages {
    padding: 80px 0;
    background: #f8f9fa;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.tech-item {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.tech-icon {
    width: 80px;
    height: 80px;
    background: #40E0D0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.tech-icon i {
    font-size: 2rem;
    color: white;
}

.tech-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.tech-item p {
    color: #666;
    line-height: 1.6;
}

/* 統計區域 */
.stats {
    padding: 80px 0;
    background: #12295D;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #40E0D0;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* CTA 區域 */
.cta {
    padding: 80px 0;
    background: white;
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 儀表板 */
.dashboard {
    padding: 80px 0;
    background: #f8f9fa;
}

.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #12295D;
    box-shadow: 0 0 0 3px rgba(18, 41, 93, 0.1);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* 表格 */
.links-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #dee2e6;
}

.table-body {
    max-height: 500px;
    overflow-y: auto;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #f1f3f4;
    align-items: center;
    transition: background 0.3s ease;
}

.table-row:hover {
    background: #f8f9fa;
}

.table-row:last-child {
    border-bottom: none;
}

.col-url {
    word-break: break-all;
    font-family: monospace;
    font-size: 14px;
}

.col-short {
    font-family: monospace;
    font-weight: 600;
    color: #12295D;
}

.col-clicks {
    text-align: center;
    font-weight: 600;
    color: #F23A1D;
}

.col-created {
    font-size: 14px;
    color: #666;
}

.col-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.copy {
    background: #e8f4fd;
    color: #12295D;
}

.action-btn.copy:hover {
    background: #d1e7dd;
}

.action-btn.delete {
    background: #ffe8e8;
    color: #F23A1D;
}

.action-btn.delete:hover {
    background: #ffd6d6;
}

/* 模態框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #666;
}

.modal-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #12295D;
    box-shadow: 0 0 0 3px rgba(18, 41, 93, 0.1);
}

/* Textarea 樣式 */
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

.form-group textarea:focus {
    border-color: #12295D;
    box-shadow: 0 0 0 3px rgba(18, 41, 93, 0.1);
}

.form-group textarea::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* 複選框樣式 */
.checkbox-group {
    margin-bottom: 15px !important;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: 400 !important;
    color: #666 !important;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin-right: 12px;
    transition: all 0.3s ease;
    background: white;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #12295D;
    border-color: #12295D;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:hover .checkmark {
    border-color: #12295D;
    box-shadow: 0 0 0 3px rgba(18, 41, 93, 0.1);
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.modal-footer a {
    color: #12295D;
    text-decoration: none;
    font-weight: 500;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* 通知 */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 載入中 */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 4000;
    align-items: center;
    justify-content: center;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #12295D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 20px;
        transition: left 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-brand {
        justify-content: center;
    }
    
    .about-brand {
        flex-direction: column;
        gap: 15px;
    }
    
    .about-logo {
        margin-right: 0;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .col-url,
    .col-short,
    .col-clicks,
    .col-created,
    .col-actions {
        text-align: left;
    }
    
    .col-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .url-shortener {
        padding: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-form,
    .modal-footer {
        padding: 20px;
    }
}

/* 後台管理介面樣式 */
.main-content {
    min-height: calc(100vh - 70px);
    background: #f8f9fa;
    padding-top: calc(70px + 2rem); /* 導航欄高度 + 額外間距 */
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    color: #12295D;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #60607D;
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #12295D;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    color: #12295D;
    font-size: 2rem;
    margin: 0;
}

.stat-content p {
    color: #60607D;
    margin: 0;
    font-size: 0.9rem;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #60607D;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #12295D;
    box-shadow: 0 0 0 3px rgba(18, 41, 93, 0.1);
}

.links-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
}

.section-header h2 {
    color: #12295D;
    margin: 0;
}

.view-controls {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    border-color: #12295D;
    color: #12295D;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.links-grid.list-view {
    grid-template-columns: 1fr;
}

.link-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    background: white;
}

.link-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.link-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.link-title {
    color: #12295D;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.link-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-btn.copy {
    background: #e8f4fd;
    color: #12295D;
}

.action-btn.copy:hover {
    background: #12295D;
    color: white;
}

.action-btn.edit {
    background: #fff3cd;
    color: #856404;
}

.action-btn.edit:hover {
    background: #856404;
    color: white;
}

.action-btn.stats {
    background: #e8f5e8;
    color: #28a745;
}

.action-btn.stats:hover {
    background: #28a745;
    color: white;
}

.action-btn.delete {
    background: #ffe8e8;
    color: #F23A1D;
}

.action-btn.delete:hover {
    background: #F23A1D;
    color: white;
}

.link-url {
    color: #60607D;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.link-hash {
    color: #12295D;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.link-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.link-clicks {
    color: #F23A1D;
    font-weight: 600;
}

.link-date {
    color: #60607D;
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #60607D;
}

.empty-state i {
    font-size: 4rem;
    color: #e9ecef;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #12295D;
    margin-bottom: 0.5rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* 分頁樣式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: #60607D;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e9ecef;
    background: white;
    color: #60607D;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #12295D;
    color: white;
    border-color: #12295D;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
    border: 1px solid #e9ecef;
    background: white;
    color: #60607D;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-number:hover {
    background: #12295D;
    color: white;
    border-color: #12295D;
}

.pagination-number.active {
    background: #12295D;
    color: white;
    border-color: #12295D;
    font-weight: 600;
}

.pagination-ellipsis {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60607D;
    font-weight: bold;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #60607D;
    font-size: 0.9rem;
}

.pagination-size label {
    margin: 0;
    font-weight: 500;
}

.pagination-size select {
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: white;
    color: #60607D;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.pagination-size select:focus {
    border-color: #12295D;
    box-shadow: 0 0 0 2px rgba(18, 41, 93, 0.1);
}

/* 響應式分頁 */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .pagination {
        order: 1;
    }
    
    .pagination-info {
        order: 2;
    }
    
    .pagination-size {
        order: 3;
    }
}
