/**
 * iampaws App Style CSS
 * Mobile-first 社群 App 風格
 */

/* ========================================
   CSS Variables
======================================== */
:root {
    /* 基準字體大小 - 調整此值可全站縮放字體 */
    --base-font-size: 17px;

    --paws-primary: #ffbd59;
    --paws-primary-light: #FFCE80;
    --paws-primary-dark: #E5A340;
    --paws-hover-bg: #ffe8c5;
    --paws-bg: #f5f5f5;
    --paws-card: #ffffff;
    --paws-border: #eeeeee;
    --paws-text: #3d3d3d;
    --paws-text-secondary: #666666;
    --paws-text-muted: #999999;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --bottom-nav-height: 60px;
    /* 容器寬度 */
    --container-width: 640px;
    --container-width-lg: 740px;
}

/* ========================================
   Base Styles
======================================== */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    /* 基準字體：使用 CSS 變數，方便全站調整 */
    font-size: var(--base-font-size);
}

body {
    margin: 0;
    padding: 0;
    padding-top: calc(56px + var(--safe-area-top));
    padding-bottom: calc(60px + var(--safe-area-bottom));
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    background: var(--paws-bg);
    color: var(--paws-text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* 爪子背景圖案 - 固定重複 */
    background-color: var(--paws-bg);
    background-image: url('../images/bg-paws.png');
    background-repeat: repeat;
    background-attachment: fixed;
    background-size: auto;
    background-position: center;
}

/* Links - 全域去除底線 */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* ========================================
   Container Utilities
======================================== */
.paws-container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 768px) {
    .paws-container {
        max-width: var(--container-width-lg);
    }
}

/* Fixed Bottom Action - 統一的底部固定按鈕區 */
.fixed-bottom-action {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: var(--container-width);
    z-index: 100;
}

@media (min-width: 768px) {
    .fixed-bottom-action {
        max-width: var(--container-width-lg);
    }
}

/* ========================================
   App Header
======================================== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(56px + var(--safe-area-top));
    padding-top: var(--safe-area-top);
    background: var(--paws-card);
    border-bottom: 1px solid var(--paws-border);
    z-index: 1000;
}

.app-header .header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: relative;
}

@media (min-width: 768px) {
    .app-header {
        height: calc(68px + var(--safe-area-top));
    }

    .app-header .header-inner {
        max-width: var(--container-width-lg);
        height: 68px;
    }
}

.app-header .header-left,
.app-header .header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 88px;
}

.app-header .header-left {
    justify-content: flex-start;
}

.app-header .header-right {
    justify-content: flex-end;
}

.app-header .logo {
    height: 50px;
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.app-header .logo img {
    height: 100%;
    width: auto;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--paws-text);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.header-btn:hover {
    background: var(--paws-bg);
}

.header-btn .material-icons {
    font-size: 1.2rem;
    background-color: #fbf1e1;
    color: #573b0f;
    border-radius: 10px 8px 10px 8px;
    padding: 1px;
}

/* Notification Badge */
.notification-btn {
    position: relative;
}
.notification-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    color: white;
    background: #FF4757;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ========================================
   Off-canvas Menu
======================================== */
.uk-offcanvas {
    z-index: 1001 !important;
}

.offcanvas-menu {
    padding: 0 !important;
    background: var(--paws-card) !important;
    width: 280px !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.offcanvas-menu .uk-offcanvas-close {
    top: 16px;
    right: 16px;
    color: var(--paws-text-muted);
}

/* Profile Section */
.offcanvas-profile {
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
}

.offcanvas-profile .profile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

.offcanvas-profile .profile-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.offcanvas-profile .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offcanvas-profile .avatar-initial {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.offcanvas-profile .profile-info {
    flex: 1;
    min-width: 0;
}

.offcanvas-profile .profile-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.offcanvas-profile .profile-email {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.offcanvas-profile .login-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

.offcanvas-profile .login-prompt .material-icons:first-child {
    font-size: 2.4rem;
}

.offcanvas-profile .login-prompt span:nth-child(2) {
    flex: 1;
}

/* Navigation */
.offcanvas-nav {
    padding: 16px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.offcanvas-nav .nav-section {
    padding: 8px 0;
}

.offcanvas-nav .nav-section-title {
    padding: 8px 20px;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--paws-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offcanvas-nav .nav-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 20px;
    height: auto;
    flex: none;
    color: var(--paws-text);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.offcanvas-nav .nav-item:hover {
    background: var(--paws-hover-bg);
    color: var(--paws-text) !important;
}

.offcanvas-nav .nav-item:hover .material-icons {
    color: var(--paws-text);
}

.offcanvas-nav .nav-item.active {
    color: var(--paws-primary);
    background: rgba(255, 189, 89, 0.12);
}

.offcanvas-nav .nav-item .material-icons {
    font-size: 1.1rem;
    color: var(--paws-text-secondary);
}

.offcanvas-nav .nav-item .nav-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.offcanvas-nav .nav-item.active .material-icons {
    color: var(--paws-primary);
}

.offcanvas-nav .nav-item-danger {
    color: #ef4444;
}

.offcanvas-nav .nav-item-danger .material-icons {
    color: #ef4444;
}

/* Offcanvas Footer */
.offcanvas-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--paws-border);
    text-align: center;
    background: var(--paws-card);
    flex-shrink: 0;
    margin-top: auto;
}

.offcanvas-footer .footer-links {
    font-size: .75rem;
    color: var(--paws-text-muted);
    margin-bottom: 6px;
}

.offcanvas-footer .footer-links a {
    color: var(--paws-text-secondary);
    transition: color 0.2s;
}

.offcanvas-footer .footer-links a:hover {
    color: var(--paws-primary);
}

.offcanvas-footer .footer-links .divider {
    margin: 0 4px;
    color: var(--paws-border);
}

.offcanvas-footer .footer-contact {
    margin-bottom: 4px;
}

.offcanvas-footer .footer-contact a {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .8rem;
    color: var(--paws-text-secondary);
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--paws-bg);
    transition: all 0.2s;
}

.offcanvas-footer .footer-contact a:hover {
    background: var(--paws-hover-bg);
    color: var(--paws-primary);
}

.offcanvas-footer .footer-contact .material-icons {
    font-size: 14px;
}

.offcanvas-footer .footer-copyright {
    font-size: 10px;
    color: var(--paws-text-muted);
}

/* ========================================
   PWA Install Banner
======================================== */
.pwa-install-banner {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: calc(100% - 24px);
    max-width: 400px;
    background: var(--paws-card);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.pwa-install-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    padding: 12px 12px 12px 16px;
    gap: 12px;
}

.pwa-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-banner-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--paws-text);
    margin-bottom: 2px;
}

.pwa-banner-desc {
    font-size: 0.75rem;
    color: var(--paws-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--paws-primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.pwa-banner-btn:hover {
    background: var(--paws-primary-light);
}

.pwa-banner-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--paws-text-muted);
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.pwa-banner-close:hover {
    background: var(--paws-hover-bg);
}

.pwa-banner-close .material-icons {
    font-size: 18px;
}

/* ========================================
   Main Content
======================================== */
.app-main {
    max-width: 640px;
    margin: 0 auto;
    min-height: calc(100vh - 116px);
}

@media (min-width: 768px) {
    .app-main {
        max-width: 740px!important;
    }
}

/* ========================================
   Quick Post
======================================== */
.quick-post {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--paws-card);
    border-radius: 6px;
    margin-bottom: 15px;
    margin-top: 5px;
}

.quick-post .user-avatar,
.quick-post .post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
    overflow: hidden;
}

.quick-post .user-avatar img,
.quick-post .post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-post .post-avatar .material-icons {
    font-size: 1.1rem;
}

.quick-post .post-avatar .avatar-text {
    font-size: 0.8rem;
    font-weight: 600;
}

.quick-post .post-trigger {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border: 1px solid var(--paws-primary);
    border-radius: 24px;
    font-size: 0.7rem;
    color: var(--paws-text-muted);
    cursor: pointer;
    background: rgba(255, 189, 89, 0.05);
    transition: all 0.2s;
    text-decoration: none;
}

.quick-post .post-trigger .material-icons {
    font-size: 0.9rem;
    color: var(--paws-primary);
}

/* ========================================
   Guest Banner
======================================== */
.guest-banner {
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
    color: white;
    padding: 24px 20px;
    text-align: center;
    border-bottom: 8px solid var(--paws-bg);
}

.guest-banner h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.guest-banner p {
    font-size: 0.7rem;
    opacity: 0.9;
    margin: 0 0 20px;
    line-height: 1.5;
}

.guest-banner .btn-join {
    background: white;
    color: var(--paws-primary);
    padding: 12px 32px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.guest-banner .btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Feed Container
======================================== */
.feed-container {
    background: var(--paws-bg);
}

/* ========================================
   Diary Card
======================================== */
.diary-card {
    background: var(--paws-card);
    border-radius: 6px;
}

.diary-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.diary-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--paws-border);
    flex-shrink: 0;
}

.diary-user-info {
    flex: 1;
    min-width: 0;
}

.diary-petname {
    font-weight: 600;
    font-size: 1rem;
    color: var(--paws-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.diary-petname .verified {
    color: var(--paws-primary);
    font-size: 0.8rem;
}

.diary-meta {
    font-size: 0.8rem;
    color: var(--paws-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.threads-sync-indicator {
    display: inline-flex;
    align-items: center;
    color: var(--paws-text-muted);
}

.threads-sync-indicator svg {
    vertical-align: middle;
}

.diary-more-btn {
    color: var(--paws-text-secondary);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
}

.diary-more-btn:hover {
    background: var(--paws-bg);
}

/* Diary Content */
.diary-content {
    padding: 0 16px 12px;
}

.diary-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--paws-text);
    white-space: pre-wrap;
    word-break: break-word;
}

.diary-text .hashtag {
    color: var(--paws-primary);
    font-weight: 500;
}

/* Diary Card Link (for clickable cards) */
.diary-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.diary-card-link:hover {
    text-decoration: none;
}

/* Diary Avatar Wrapper */
.diary-avatar-wrapper {
    flex-shrink: 0;
}

.diary-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFBD59, #FFCE80);
    display: flex;
    align-items: center;
    justify-content: center;
}

.diary-avatar-placeholder .material-icons {
    font-size: 1.1rem;
    color: white;
}

/* Diary Author */
.diary-author {
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--paws-text);
}

.diary-time {
    font-size: 0.6rem;
    color: var(--paws-text-muted);
}

/* Diary Participants */
.diary-participants {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px;
    font-size: 0.65rem;
}

.with-label {
    color: var(--paws-text-muted);
}

.participant-tag {
    padding: 4px 10px;
    background: var(--paws-bg);
    border-radius: 12px;
    color: var(--paws-text);
    font-size: 0.6rem;
}

.participant-tag:hover {
    background: var(--paws-primary-light);
    color: var(--paws-primary);
}

.more-participants {
    color: var(--paws-text-muted);
    font-size: 0.6rem;
}

/* Diary Image */
.diary-image {
    border-radius: 12px;
    overflow: hidden;
    margin: 0 16px 12px;
}

.diary-image img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}

/* Diary Footer */
.diary-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 12px;
    font-size: 0.65rem;
    color: var(--paws-text-muted);
}

.diary-mood {
    font-size: 0.8rem;
}

.diary-location {
    display: flex;
    align-items: center;
    gap: 2px;
}

.diary-location .material-icons {
    font-size: 0.7rem;
}

/* ========================================
   Media Slider
======================================== */
.diary-media {
    margin: 0 12px 12px;
}

.diary-media-slider {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.diary-media-slider .uk-slider-items {
    gap: 8px;
}

.media-slide {
    width: auto;
    height: 200px;
    flex-shrink: 0;
}

.media-slide a {
    display: block;
    height: 200px;
}

/* Image & Video thumbnails - fixed height, auto width */
.media-thumb,
.media-image,
.diary-media-slider img,
.diary-media img {
    height: 200px !important;
    max-height: 200px !important;
    width: auto;
    border-radius: 12px;
    border: 2px solid #f0f0f0;
    transition: transform 0.2s, filter 0.2s;
}

.media-thumb:hover,
.media-image:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

/* Single media - same height, centered */
.single-media {
    display: flex;
}

.single-media .media-image {
    height: 200px;
    width: auto;
    max-width: 100%;
}

/* Video wrapper - fixed height container */
.video-media-wrapper,
.video-thumb-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

/* Video preview - fixed height, auto width */
.media-video-preview {
    height: 200px;
    width: auto;
    display: block;
}

/* Single video wrapper */
.video-thumb-wrapper.single {
    display: inline-flex;
    height: 200px;
}

.video-thumb-wrapper.single .media-video-preview {
    height: 200px;
    width: auto;
    max-width: 100%;
}

/* Play overlay */
.media-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
    z-index: 2;
}

.media-play-overlay:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%) scale(1.1);
}

.media-play-overlay .play-icon {
    font-size: 1.6rem;
    margin-left: 2px;
}

/* Type badge */
.media-type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 1;
}

/* Duration */
.media-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.55rem;
    font-family: monospace;
    z-index: 1;
}

/* Media counter */
.media-count-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    z-index: 10;
}

/* Video placeholder */
.video-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    min-height: 200px;
    height: 240px;
    width: 200px;
    border-radius: 12px;
}

.video-bg-icon {
    font-size: 2.4rem;
    opacity: 0.8;
}

/* Audio placeholder */
.audio-placeholder {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    min-height: 180px;
    height: 240px;
    width: 200px;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.audio-bg-icon {
    font-size: 2.4rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.audio-filename {
    font-size: 0.65rem;
    font-weight: 600;
    margin: 8px 0 0;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   Actions
======================================== */
.diary-actions {
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-top: 1px solid var(--paws-border);
    background: #fafafa;
}

.action-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--paws-text-secondary);
    font-size: 0.7rem;
    border-radius: 20px;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #f0f0f0;
}

.action-btn .material-icons {
    font-size: 1.1rem;
}

.action-btn.liked {
    color: #ef4444;
}

.action-btn.liked .material-icons {
    color: #ef4444;
}

.action-btn-spacer {
    flex: 1;
}

/* Comments Preview */
.diary-comments-preview {
    padding: 0 16px 12px;
    font-size: 0.7rem;
}

.comment-preview {
    color: var(--paws-text-secondary);
    line-height: 1.4;
}

.comment-preview .username {
    font-weight: 600;
    color: var(--paws-text);
}

/* Load More */
.load-more {
    padding: 24px 16px;
    text-align: center;
}

.load-more-btn {
    padding: 12px 40px;
    background: var(--paws-card);
    border: 1px solid var(--paws-border);
    border-radius: 24px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--paws-text);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.load-more-btn:hover {
    background: var(--paws-bg);
    border-color: var(--paws-text-muted);
}

/* ========================================
   Bottom Navigation
======================================== */
.app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: var(--paws-card);
    border-top: 1px solid var(--paws-border);
    z-index: 1000;
}

.app-nav .nav-inner {
    max-width: 640px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

@media (min-width: 768px) {
    .app-nav .nav-inner {
        max-width: 740px;
    }
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 56px;
    color: var(--paws-text-muted);
    text-decoration: none;
    font-size: 0.5rem;
    gap: 2px;
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--paws-text);
}

.nav-item .material-icons {
    font-size: 1.2rem;
}

.nav-item .nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.nav-item.active .nav-label {
    color: var(--paws-primary);
}

.nav-item.active .material-icons {
    color: var(--paws-primary);
}

.nav-item.create-btn {
    color: white;
}

.nav-item.create-btn .icon-wrap {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-item.create-btn:hover .icon-wrap {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ========================================
   Empty State
======================================== */
.empty-feed {
    text-align: center;
    padding: 60px 24px;
    color: var(--paws-text-secondary);
}

.empty-feed .material-icons {
    font-size: 3.6rem;
    color: var(--paws-text-muted);
    margin-bottom: 16px;
}

.empty-feed h3 {
    font-size: 0.9rem;
    color: var(--paws-text);
    margin: 0 0 8px;
    font-weight: 600;
}

.empty-feed p {
    font-size: 0.7rem;
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   Responsive - Desktop
======================================== */
@media (min-width: 768px) {
    .diary-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .app-main {
        padding-top: 20px;
    }

    .media-thumb,
    .media-image {
        height: 280px;
    }

    .single-media .media-image {
        height: 360px;
    }
}

/* ========================================
   Responsive - Mobile
======================================== */
@media (max-width: 480px) {
    :root {
    --base-font-size: 19px;
    }
    .offcanvas-nav .nav-item {
        font-size: 0.9rem;
        padding: 6px 20px;
    }
    .media-thumb,
    .media-image {
        height: 200px;
        max-width: 260px;
    }

    .single-media .media-image {
        height: 240px;
    }

    .media-play-overlay {
        width: 48px;
        height: 48px;
    }

    .media-play-overlay .play-icon {
        font-size: 1.4rem;
    }
}

@media (max-width: 660px) {
 .diary-card {
        border-radius: 0;
        border-bottom: 10px solid #e9e9e9;
    }
    .month-separator {
        margin: 0!important;
        background-color: #e9e9e9;
    }
}

@media (min-width: 660px) {
 .diary-card {
        margin-bottom: 15px;
    }
}

/* ========================================
   Language Switcher
======================================== */
.lang-switcher-wrap {
    position: relative;
    z-index: 1010;
}

.lang-btn {
    width: auto;
    padding: 0 12px;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 500;
}

.lang-btn .material-icons {
    font-size: 1rem;
}

.lang-btn .lang-code {
    display: none;
}

@media (min-width: 480px) {
    .lang-btn .lang-code {
        display: inline;
    }
}

/* 確保語系下拉選單預設隱藏 */
.lang-dropdown {
    display: none !important;
    visibility: hidden;
}

.lang-dropdown.uk-dropdown.uk-open {
    display: block !important;
    visibility: visible;
}

.lang-dropdown.uk-dropdown {
    min-width: 160px;
    padding: 8px 0;
    background: var(--paws-card);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1020;
}

.lang-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lang-list li {
    margin: 0;
}

.lang-option {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--paws-text);
    text-decoration: none;
    font-size: 0.7rem;
    transition: background 0.2s;
}

.lang-option:hover {
    background: var(--paws-bg);
}

.lang-option .check {
    font-size: 0.9rem;
    color: var(--paws-primary);
    margin-right: 8px;
}

.lang-list li.active .lang-option {
    color: var(--paws-primary);
    font-weight: 600;
}

/* ========================================
   Auth Pages (Login, Register, etc.)
======================================== */
.auth-page {
    padding-bottom: 60px;
}

.auth-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 116px - 60px);
    padding: 24px 16px;
    max-width: 650px;
}

.auth-card {
    background: var(--paws-card);
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    max-width: 100%;
}

@media (min-width: 480px) {
    .auth-card {
        padding: 40px 32px;
    }
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo img {
    height: 48px;
    width: auto;
}

.auth-title {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--paws-text);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-title h1 .material-icons {
    color: var(--paws-primary);
    font-size: 1.4rem;
}

.auth-title p {
    font-size: 0.7rem;
    color: var(--paws-text-muted);
    margin: 0;
}

/* Auth Form */
.auth-form .uk-form-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--paws-text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-form .uk-form-label .material-icons {
    font-size: 0.9rem;
    color: var(--paws-primary);
}

.auth-form .uk-input,
.auth-form .uk-select,
.auth-form .uk-textarea {
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--paws-border);
    font-size: 0.75rem;
    padding: 0 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form .uk-input:focus,
.auth-form .uk-select:focus,
.auth-form .uk-textarea:focus {
    border-color: var(--paws-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-form .uk-margin {
    margin-bottom: 20px;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-btn .material-icons {
    font-size: 1rem;
}

/* Auth Links */
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.7rem;
}

.auth-links a {
    color: var(--paws-primary);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    color: var(--paws-text-muted);
    font-size: 0.65rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--paws-border);
}

.auth-divider span {
    padding: 0 16px;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--paws-border);
    background: var(--paws-card);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--paws-text);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.social-btn:hover {
    background: var(--paws-bg);
    border-color: var(--paws-text-muted);
    color: var(--paws-text);
    text-decoration: none;
}

.social-btn img {
    width: 20px;
    height: 20px;
}

.social-btn-line {
    background: #06C755;
    border-color: #06C755;
    color: white;
}

.social-btn-line:hover {
    background: #05B54D;
    border-color: #05B54D;
    color: white;
}

.social-btn-line img {
    filter: brightness(0) invert(1);
}

/* Auth Footer Text */
.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--paws-border);
    font-size: 0.7rem;
    color: var(--paws-text-secondary);
}

.auth-footer-text a {
    color: var(--paws-primary);
    font-weight: 500;
    text-decoration: none;
}

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

.auth-footer-text p {
    margin: 8px 0;
}

/* Auth Footer Bar */
.auth-footer-bar {
    text-align: center;
    padding: 16px;
    font-size: 0.65rem;
    color: var(--paws-text-muted);
}

.auth-footer-bar p {
    margin: 0;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    font-size: 0.6rem;
    font-weight: 500;
}

.password-strength.weak { color: #ef4444; }
.password-strength.medium { color: #f59e0b; }
.password-strength.strong { color: #10b981; }

/* Password Toggle */
.password-field {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--paws-text-muted);
    transition: color 0.2s;
}

.password-toggle-btn:hover {
    color: var(--paws-primary);
}

.password-toggle-btn .material-icons {
    font-size: 1rem;
}

/* Alert Messages */
.auth-alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-alert .material-icons {
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-alert-success {
    background: #ecfdf5;
    color: #065f46;
}

.auth-alert-error {
    background: #fef2f2;
    color: #991b1b;
}

.auth-alert-info {
    background: #eff6ff;
    color: #1e40af;
}

/* ========================================
   Member Center (會員中心)
======================================== */
.member-page {
    padding: 16px;
    padding-bottom: calc(var(--bottom-nav-height) + 24px);
}

/* Profile Card */
.profile-card {
    background: var(--paws-card);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--paws-text);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-email {
    font-size: 0.65rem;
    color: var(--paws-text-muted);
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    padding: 4px 10px;
    border-radius: 20px;
}

.profile-badge.verified {
    background: #ecfdf5;
    color: #059669;
}

.profile-badge .material-icons {
    font-size: 0.7rem;
}

.profile-edit-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--paws-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--paws-text-secondary);
    transition: all 0.2s;
}

.profile-edit-btn:hover {
    background: var(--paws-hover-bg);
    color: white;
}

.profile-edit-btn .material-icons {
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.stat-item {
    background: var(--paws-card);
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-item > .material-icons,
.stat-item > .material-symbols-outlined {
    font-size: 1.2rem;
    color: var(--paws-primary);
    margin-bottom: 8px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--paws-text);
}

.stat-label {
    font-size: 0.6rem;
    color: var(--paws-text-muted);
    margin-top: 2px;
}

/* Social Stats Section */
.social-stats-section {
    margin-top: 24px;
}

.social-stats-card {
    display: flex;
    justify-content: space-around;
    background: var(--paws-card);
    border-radius: 16px;
    padding: 20px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.social-stats-card.received {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(249, 115, 22, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.social-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-stat > .material-icons {
    font-size: 1.5rem;
    color: var(--paws-text-muted);
}

.social-stats-card.received .social-stat:nth-child(1) > .material-icons {
    color: #ef4444;
}

.social-stats-card.received .social-stat:nth-child(2) > .material-icons {
    color: #3b82f6;
}

.social-stats-card.received .social-stat:nth-child(3) > .material-icons {
    color: #f59e0b;
}

.social-stat-content {
    display: flex;
    flex-direction: column;
}

.social-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--paws-text);
    line-height: 1.2;
}

.social-stat-label {
    font-size: 0.65rem;
    color: var(--paws-text-muted);
}

@media (max-width: 400px) {
    .social-stats-card {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .social-stat {
        justify-content: flex-start;
        padding-left: 20px;
    }
}

/* Menu Section */
.menu-section {
    margin-top: 24px;
}

.menu-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--paws-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 4px;
}

.menu-list {
    background: var(--paws-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    color: var(--paws-text);
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid var(--paws-border);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: var(--paws-hover-bg);
    color: var(--paws-text);
}

.menu-item:hover .menu-icon {
    color: var(--paws-text);
}

.menu-icon {
    font-size: 1.1rem;
    color: var(--paws-primary);
    margin-right: 14px;
}

.menu-icon-img {
    width: 22px;
    height: 22px;
    margin-right: 14px;
    object-fit: contain;
    box-sizing: content-box;
}

.menu-text {
    flex: 1;
    font-size: 0.85rem;
}

.menu-badge {
    background: var(--paws-primary);
    color: white;
    font-size: 0.55rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 8px;
}

.menu-arrow {
    font-size: 1rem;
    color: var(--paws-text-muted);
}

/* Bind Status */
.bind-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    margin-left: auto;
}

.bind-status.bound {
    color: #059669;
}

.bind-status .material-icons {
    font-size: 0.8rem;
}

.bind-btn {
    background: var(--paws-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 20px;
    margin-left: auto;
    transition: background 0.2s;
}

.bind-btn:hover {
    background: var(--paws-primary-dark);
    color: white;
}

/* Info List */
.info-list {
    background: var(--paws-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--paws-border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.85rem;
    color: var(--paws-text-secondary);
}

.info-value {
    font-size: 0.85rem;
    color: var(--paws-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.success { background: #10b981; }
.status-dot.warning { background: #f59e0b; }
.status-dot.danger { background: #ef4444; }

/* Devices List */
.devices-list {
    background: var(--paws-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.device-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--paws-border);
    gap: 14px;
}

.device-item:last-child {
    border-bottom: none;
}

.device-item.current {
    background: rgba(99, 102, 241, 0.05);
}

.device-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--paws-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.device-icon .material-icons {
    font-size: 1.1rem;
    color: var(--paws-text-secondary);
}

.device-item.current .device-icon {
    background: var(--paws-primary);
}

.device-item.current .device-icon .material-icons {
    color: white;
}

.device-info {
    flex: 1;
    min-width: 0;
}

.device-name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--paws-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.device-badge {
    font-size: 0.55rem;
    background: var(--paws-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
}

.device-meta {
    font-size: 0.6rem;
    color: var(--paws-text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.device-logout-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: none;
    border: 1px solid var(--paws-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--paws-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.device-logout-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #ef4444;
}

.device-logout-btn .material-icons {
    font-size: 0.9rem;
}

/* Logout Section */
.logout-section {
    margin-top: 32px;
    padding: 0;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    background: white;
    border: 1px solid #fca5a5;
    border-radius: 12px;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

.logout-btn .material-icons {
    font-size: 1rem;
}

/* ========================================
   Member Settings Form
======================================== */
.settings-page {
    padding: 16px;
    padding-bottom: calc(var(--bottom-nav-height) + 24px);
}

.settings-card {
    background: var(--paws-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.settings-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--paws-text);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-title .material-icons {
    font-size: 1.1rem;
    color: var(--paws-primary);
}

.settings-subtitle {
    font-size: 0.8rem;
    color: var(--paws-text-muted);
    margin: 0;
}

/* Settings Header */
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.more-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: var(--paws-bg);
    border: 1px solid var(--paws-border);
    border-radius: 20px;
    color: var(--paws-text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.more-settings-btn:hover {
    background: var(--paws-primary-light);
    color: var(--paws-primary-dark);
    border-color: var(--paws-primary);
}

.more-settings-btn .material-icons {
    font-size: 0.9rem;
    margin-right: 4px;
}

/* Avatar Upload */
.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.avatar-upload-wrapper {
    position: relative;
    cursor: pointer;
    z-index: 1;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    overflow: hidden;
    position: relative;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.avatar-upload-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay .material-icons {
    font-size: 1.6rem;
    color: white;
}

.avatar-hint {
    font-size: 0.6rem;
    color: var(--paws-text-muted);
    margin-top: 12px;
}

/* Settings Form */
.settings-form .uk-form-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--paws-text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.settings-form .uk-form-label .material-icons {
    font-size: 0.9rem;
    color: var(--paws-primary);
}

.settings-form .uk-input,
.settings-form .uk-select,
.settings-form .uk-textarea {
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--paws-border);
    font-size: 0.75rem;
    padding: 0 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-form .uk-input:focus,
.settings-form .uk-select:focus {
    border-color: var(--paws-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.settings-form .uk-input:disabled {
    background: var(--paws-bg);
    color: var(--paws-text-muted);
}

.form-hint {
    font-size: 0.7rem;
    color: var(--paws-text-muted);
    margin-top: 6px;
}

/* Username Input */
.username-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s;
}

.username-input-wrapper:focus-within {
    border-color: var(--paws-primary);
}

.username-prefix {
    padding: 0 12px;
    background: var(--paws-bg);
    color: var(--paws-text-muted);
    font-size: 0.65rem;
    white-space: nowrap;
    height: 48px;
    display: flex;
    align-items: center;
    border-right: 1px solid #e5e7eb;
}

.username-input-wrapper .uk-input {
    border: none !important;
    border-radius: 0 !important;
    flex: 1;
    min-width: 0;
}

.username-input-wrapper .uk-input:focus {
    box-shadow: none !important;
}

.username-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--paws-text-muted);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.username-copy-btn:hover {
    color: var(--paws-primary);
    background: var(--paws-bg);
}

.username-copy-btn .material-icons {
    font-size: 1rem;
}

.username-status {
    font-size: 0.6rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.username-status.checking {
    color: var(--paws-text-muted);
}

.username-status.available {
    color: #10b981;
}

.username-status.unavailable {
    color: #ef4444;
}

.username-status .material-icons {
    font-size: 0.8rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.form-actions .uk-button {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.form-actions .uk-button-primary {
    background: linear-gradient(135deg, var(--paws-primary) 0%, var(--paws-primary-light) 100%);
}

/* Security Tips */
.security-tips {
    margin-top: 32px;
    padding: 20px;
    background: var(--paws-bg);
    border-radius: 12px;
    border-left: 4px solid var(--paws-primary);
}

.security-tips h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--paws-text);
}

.security-tips h4 .material-icons {
    font-size: 1rem;
    color: var(--paws-primary);
}

.security-tips ul {
    margin: 0;
    padding-left: 24px;
}

.security-tips li {
    font-size: 0.65rem;
    color: var(--paws-text-secondary);
    line-height: 1.8;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--paws-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.back-link:hover {
    color: var(--paws-primary);
}

.back-link .material-icons {
    font-size: 1rem;
}

/* ========================================
   Notification Z-Index (above loading overlay)
======================================== */
.uk-notification {
    z-index: 10001 !important;
}

.uk-notification-message {
    z-index: 10001 !important;
}

/* ========================================
   Create Action Sheet (+ 按鈕彈出選單)
======================================== */
.action-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.action-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.action-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.action-sheet-content {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.action-sheet-overlay.active .action-sheet-content {
    transform: translateY(0);
}

.action-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.action-sheet-header span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.action-sheet-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #9ca3af;
    border-radius: 50%;
    transition: background 0.2s;
}

.action-sheet-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.action-sheet-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-sheet-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.action-sheet-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.action-sheet-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.action-sheet-icon .material-icons {
    font-size: 24px;
    color: white;
}

.action-sheet-icon.diary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.action-sheet-icon.care {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.action-sheet-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.action-sheet-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.action-sheet-desc {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Create button 需要改成 button 樣式 */
.create-btn {
    background: none;
    border: none;
    cursor: pointer;
}

/* ========================================
   Search Overlay (Global)
======================================== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paws-bg);
    z-index: 1100;
    display: none;
    flex-direction: column;
}

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

.search-overlay-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    padding-top: calc(8px + var(--safe-area-top));
    background: var(--paws-card);
    border-bottom: 1px solid var(--paws-border);
}

.search-overlay-back {
    background: none;
    border: none;
    color: var(--paws-text);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.search-overlay-back:hover {
    background: var(--paws-hover-bg);
}

.search-overlay-form {
    flex: 1;
    display: flex;
    align-items: center;
}

.search-overlay-input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--paws-text);
}

.search-overlay-input:focus {
    outline: none;
}

.search-overlay-input::placeholder {
    color: var(--paws-text-muted);
}

.search-overlay-submit {
    background: none;
    border: none;
    color: var(--paws-primary);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-overlay-submit:disabled {
    color: var(--paws-text-muted);
    cursor: default;
}

.search-overlay-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.search-overlay-history {
    padding: 0;
}

/* Search History in Overlay */
.search-history {
    margin-top: 0;
}

.search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.search-history-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--paws-text);
}

.search-history-clear {
    background: none;
    border: none;
    color: var(--paws-primary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.search-history-clear:hover {
    background: var(--paws-hover-bg);
}

.search-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-history-item {
    display: flex;
    align-items: center;
    background: var(--paws-card);
    border-radius: 8px;
    transition: background 0.2s;
}

.search-history-item:hover {
    background: var(--paws-hover-bg);
}

.search-history-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--paws-text);
    min-width: 0;
}

.search-history-link .material-icons {
    font-size: 20px;
    color: var(--paws-text-muted);
    flex-shrink: 0;
}

.search-history-text {
    flex: 1;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-history-remove {
    background: none;
    border: none;
    color: var(--paws-text-muted);
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.search-history-remove:hover {
    color: #ef4444;
}

.search-history-remove .material-icons {
    font-size: 18px;
}

/* Desktop: Smaller overlay */
@media (min-width: 768px) {
    .search-overlay {
        top: 56px;
        bottom: auto;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: var(--container-width-lg);
        max-height: 400px;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .search-overlay-header {
        padding-top: 8px;
    }

    .search-history {
        max-width: var(--container-width-lg);
        margin-left: auto;
        margin-right: auto;
    }
}

/* ========================================
   Membership Badge Styles
======================================== */

/* Inline Style (名字旁小徽章) */
.membership-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 6px;
}
.membership-badge-inline .material-icons {
    font-size: 12px;
}
/* 免費 - 灰色 */
.membership-badge-inline.gray,
.membership-badge-inline.free {
    background: #e5e7eb;
    color: #6b7280;
}
/* 日記 PRO - 藍色 */
.membership-badge-inline.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}
/* 照護 PRO - 綠色 */
.membership-badge-inline.green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}
/* 彩虹橋 PRO - 紫色 */
.membership-badge-inline.purple {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
}
/* 旗艦 MAX - 金色 */
.membership-badge-inline.gold,
.membership-badge-inline.premium {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
}

/* Compact Style (側邊欄) */
.membership-badge-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    margin-top: 8px;
}
.membership-badge-compact .material-icons {
    font-size: 16px;
}
/* 免費 - 灰色 */
.membership-badge-compact.gray,
.membership-badge-compact.free {
    background: #f3f4f6;
    color: #6b7280;
}
/* 日記 PRO - 藍色 */
.membership-badge-compact.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #1d4ed8;
}
.membership-badge-compact.blue .material-icons {
    color: #3b82f6;
}
/* 照護 PRO - 綠色 */
.membership-badge-compact.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.15));
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #15803d;
}
.membership-badge-compact.green .material-icons {
    color: #22c55e;
}
/* 彩虹橋 PRO - 紫色 */
.membership-badge-compact.purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #7e22ce;
}
.membership-badge-compact.purple .material-icons {
    color: #a855f7;
}
/* 旗艦 MAX - 金色 */
.membership-badge-compact.gold,
.membership-badge-compact.premium {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #b45309;
}
.membership-badge-compact.gold .material-icons,
.membership-badge-compact.premium .material-icons {
    color: #f59e0b;
}
.membership-badge-compact .badge-text {
    font-weight: 600;
}
.membership-badge-compact .badge-expires {
    font-size: 11px;
    opacity: 0.8;
}
.membership-badge-compact .badge-upgrade {
    margin-left: auto;
    padding: 2px 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

/* Full Style (設定頁) */
.membership-badge-full {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}
.membership-badge-full .badge-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}
.membership-badge-full .badge-icon .material-icons {
    color: white;
    font-size: 24px;
}
.membership-badge-full .badge-info {
    flex: 1;
}
.membership-badge-full .badge-level {
    font-weight: 700;
    font-size: 15px;
    color: #1f2937;
}
/* 免費 - 灰色 */
.membership-badge-full.gray,
.membership-badge-full.free {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}
.membership-badge-full.gray .badge-icon,
.membership-badge-full.free .badge-icon {
    background: #e5e7eb;
}
.membership-badge-full.gray .badge-icon .material-icons,
.membership-badge-full.free .badge-icon .material-icons {
    color: #9ca3af;
}
/* 日記 PRO - 藍色 */
.membership-badge-full.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.membership-badge-full.blue .badge-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.membership-badge-full.blue .badge-level {
    color: #1d4ed8;
}
/* 照護 PRO - 綠色 */
.membership-badge-full.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.membership-badge-full.green .badge-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}
.membership-badge-full.green .badge-level {
    color: #15803d;
}
/* 彩虹橋 PRO - 紫色 */
.membership-badge-full.purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.2);
}
.membership-badge-full.purple .badge-icon {
    background: linear-gradient(135deg, #a855f7, #9333ea);
}
.membership-badge-full.purple .badge-level {
    color: #7e22ce;
}
/* 旗艦 MAX - 金色 */
.membership-badge-full.gold,
.membership-badge-full.premium {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.membership-badge-full.gold .badge-icon,
.membership-badge-full.premium .badge-icon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
.membership-badge-full.gold .badge-level,
.membership-badge-full.premium .badge-level {
    color: #b45309;
}
.membership-badge-full .badge-expires {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}
.membership-badge-full .expires-warning {
    color: #dc2626;
    font-weight: 500;
}
.membership-badge-full .badge-upgrade-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f59e0b;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin-top: 2px;
}
.membership-badge-full .badge-upgrade-link:hover {
    color: #d97706;
}
.membership-badge-full .badge-upgrade-link .material-icons {
    font-size: 16px;
}
