/* ============================================
   基礎重置
============================================ */
.daily-signin-card * {
    box-sizing: border-box;
}

.daily-signin-card {
    max-width: 420px;
    margin: 0 auto;
    font-family: 'Microsoft JhengHei', '微軟正黑體', sans-serif;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

/* ============================================
   主體結構
============================================ */
.daily-signin-card .signin-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* 小語置中 */
    gap: 12px;
}

/* ============================================
   頂部資訊列：左資訊 + 右按鈕
============================================ */
.daily-signin-card .signin-top-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.daily-signin-card .signin-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.daily-signin-card .signin-stats-compact {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.daily-signin-card .signin-right {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
}

/* ============================================
   按鈕
============================================ */
.daily-signin-card .signin-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: 0.3s ease;
}

.daily-signin-card .signin-btn.signed,
.daily-signin-card .signin-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* ============================================
   小語框（本次重點）
============================================ */
.daily-signin-card .quote-area {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0;
}

.daily-signin-card .signin-quote-box {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-style: italic;
    color: #666;
    text-align: center;
    font-size: 15px;
    background: #f9f9f9;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

/* 簽到後亮色框 */
.daily-signin-card .signin-quote-box.signed {
    border-color: #ffcc33;
    background: linear-gradient(135deg,#fff9e6,#fff0cc);
    color: #333;
    font-weight: 500;
}

/* ============================================
   日曆
============================================ */
.daily-signin-card .calendar-container {
    width: 100%;
}

.daily-signin-card .signin-calendar {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

/* 日曆標頭 */
.daily-signin-card .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.daily-signin-card .calendar-header button {
    background: #ffcc33;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.daily-signin-card .month-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

/* 日曆格子 */
.daily-signin-card .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.daily-signin-card .calendar-weekday {
    font-weight: bold;
    text-align: center;
    padding: 8px 0;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}

.daily-signin-card .calendar-day {
    text-align: center;
    padding: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    border: 1px solid #f0f0f0;
    font-size: 14px;
}

.daily-signin-card .calendar-day.empty {
    background: transparent;
    cursor: default;
    border: none;
}

.daily-signin-card .calendar-day.today {
    border: 2px solid #ff6b00;
    font-weight: bold;
    color: #ff6b00;
}

.daily-signin-card .calendar-day.today.signed {
    background: #ff6b00;
    color: #fff;
    border: none;
}

.daily-signin-card .calendar-day.signed:not(.today) {
    background: #ffd700;
    color: #333;
}

/* ============================================
   手機排版
============================================ */
@media (max-width: 480px) {
    .daily-signin-card .signin-top-row {
        flex-direction: column;
        align-items: center;
    }
    .daily-signin-card .signin-left {
        text-align: center;
        align-items: center;
    }
    .daily-signin-card .signin-right {
        width: 100%;
        justify-content: center;
    }
    .daily-signin-card .signin-quote-box {
        max-width: 100%;
    }
}

/* 日曆外框 + 漸層背景 */
#daily-signin-root .calendar-container {
    margin-top: 20px;
    padding: 15px;
    border: 2px solid #ffcc33;       /* 明亮邊框 */
    border-radius: 12px;
    background: linear-gradient(135deg, #fff8e1, #ffe0b2); /* 漸層背景 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 日曆內格子 */
#daily-signin-root .signin-calendar .day {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    margin: 3px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 今日或已簽到的日子 */
#daily-signin-root .signin-calendar .day.signed {
    background: #ffcc33;  /* 金黃色 */
    color: #fff;
}

/* 未簽到日子 */
#daily-signin-root .signin-calendar .day.unsigned {
    background: #ffe0b2;  /* 淺橙色 */
    color: #333;
}

/* 滑過效果 */
#daily-signin-root .signin-calendar .day:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* 可選：週末特殊顏色 */
#daily-signin-root .signin-calendar .day.weekend {
    background: #ffb3b3;   /* 淺粉色 */
}

/* 左側統計框：本月累計 & 連續簽到 */
#daily-signin-root .signin-stats-compact .stat-box {
    background: linear-gradient(135deg, #fff0b3, #ffd24d); /* 漸層背景 */
    border: 2px solid #ffcc33;
    color: #333;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* 滑過效果 */
#daily-signin-root .signin-stats-compact .stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 可選：不同數據不同色系（例如連續簽到更亮） */
#daily-signin-root .signin-stats-compact .streak-box {
    background: linear-gradient(135deg, #ffe066, #ffc107);
    border-color: #ffb300;
}

/* 標題置中並放大 */
#daily-signin-root .signin-header h2 {
    font-size: 32px;       /* 大一點 */
    font-weight: 700;
    margin-bottom: 25px;   /* 與下方統計框保持距離 */
    color: #ff9900;        /* 可選：和日曆/統計框配色統一 */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); /* 微立體感 */
    text-align: center;
}

/* 保持統計框與標題間距 */
#daily-signin-root .signin-top-row {
    margin-top: 10px; /* 可視需求微調 */
}

/* ============================================
   日夜背景
============================================ */
.daily-signin-card {
    position: relative; /* 背景元素定位參考 */
    overflow: hidden;
     /* 白天背景 */
    background: linear-gradient(to bottom, #87ceeb 0%, #a0d8ff 100%);
     
}

/* 太陽與光暈 */
.daily-signin-card .sun-img {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 96px;
    height: 96px;
    display: none; /* JS 判斷白天再顯示 */
    z-index: 1;
      /* 光暈效果 */
  filter: drop-shadow(0 0 8px #fff)
          drop-shadow(0 0 16px #ffd54f)
          drop-shadow(0 0 24px #ffb300);
}

/* 可加呼吸動畫 */
.sun-img {
  animation: sunGlow 2s ease-in-out infinite alternate;
}
@keyframes sunGlow {
  0% { filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 16px #ffd54f); }
  50% { filter: drop-shadow(0 0 12px #fff) drop-shadow(0 0 24px #ffd54f); }
  100% { filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 16px #ffd54f); }
}
.daily-signin-card .sun-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255,255,255,0.6) 0%,
        rgba(255,255,255,0.35) 30%,
        rgba(255,255,255,0.15) 55%,
        rgba(255,255,255,0.05) 70%,
        rgba(255,255,255,0.0) 85%
        );
    display: none;
    z-index: 0;
}

/* 月亮與夜空 */
.daily-signin-card .moon-layer {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #f0f0f0 0%, #999 80%);
    display: none; /* JS 判斷夜晚再顯示 */
    z-index: 1;
}
.daily-signin-card .night-sky-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #001848 0%, #3a3a6b 100%);
    display: none;
    z-index: 0;
}

/* ===========================
   雲朵容器（背景層）
=========================== */
#daily-signin-root .daily-signin-card {
    position: relative; /* 背景元素定位參考 */
    overflow: hidden;   /* 避免雲朵溢出卡片 */
}

#daily-signin-root .cloud-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none; /* 不阻擋點擊卡片內容 */
    z-index: 0;           /* 背景層，低於內容 */
}

/* ===========================
   雲朵主體
=========================== */
#daily-signin-root .cloud {
    position: absolute;
    width: 120px;
    height: 45px;
    background: #fff;
    border-radius: 30px;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.12));
    z-index: 0;           /* 保證在內容下面 */
}

/* 雲冠疊球 – 讓雲更自然 */
#daily-signin-root .cloud::before,
#daily-signin-root .cloud::after {
    content: '';
    position: absolute;
    background: #fff;
    border-radius: 50%;
}

#daily-signin-root .cloud::before {
    width: 55px;
    height: 55px;
    left: 15px;
    top: -28px;
}

#daily-signin-root .cloud::after {
    width: 70px;
    height: 70px;
    left: 45px;
    top: -35px;
}

/* 漂浮動畫 */
@keyframes driftCloud {
    0% { transform: translateX(-160px); }
    100% { transform: translateX(110%); }
}

/* 夜晚小星星可選 */
.daily-signin-card .star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle 2s infinite alternate;
}
@keyframes twinkle {
    from { opacity: 0.2; }
    to { opacity: 1; }
}
/* ============================================
   卡片內容層級調整（修改後）
============================================ */
.daily-signin-card .signin-header,
.daily-signin-card .signin-body,
.daily-signin-card .signin-top-row,
.daily-signin-card .signin-left,
.daily-signin-card .signin-right,
.daily-signin-card .quote-area,
.daily-signin-card .signin-calendar,
.daily-signin-card .signin-btn {
    position: relative;
    z-index: 3; /* 卡片內容層級，保證按鈕、日曆、小語可點擊 */
}

/* 背景元素層級（修改後） */
.daily-signin-card .night-sky-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #001848 50%, #3a3a6b 100%);
    display: none; /* JS 判斷夜晚再顯示 */
    z-index: 0;    /* 底層，卡片內容在上方 */
}

.daily-signin-card .moon-layer {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #F0F0F0 60%, #B0B0B0 100%);
    box-shadow:0 0 20px rgba(240,240,240,0.5),0 0 35px rgba(200,200,255,0.3);
    display: none;
    z-index: 1; /* 星星上層，但仍低於卡片內容 */
}

.daily-signin-card .star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle 2s infinite alternate;
    z-index: 0; /* 星星在夜空層之上，但低於卡片內容 */
}

.daily-signin-card .sun-img,
.daily-signin-card .sun-glare,
.daily-signin-card .cloud-container {
    z-index: 0; /* 太陽與雲朵在底層，白天使用 */
}

/* 星星閃爍動畫 */
@keyframes twinkle {
    from { opacity: 0.2; }
    to { opacity: 1; }
}



