@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

:root {
    --bg-color: #0b1120;
    --card-bg: #1e293b;
    --text-main: #e2e8f0;
    --text-dim: #94a3b8;
    --accent: #f59e0b;
    --primary: #00f2ff;
    --purple: #8b5cf6;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}

/* 特效層 */
#holiday-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    display: none;
}

.app-wrapper {
    position: relative;
    z-index: 5;
    padding: 15px;
    padding-bottom: 80px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.app-title {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, #00f2ff, #10b981);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    transition: 0.5s;
}

.quote-box {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 5px;
    font-style: italic;
    max-width: 200px;
    line-height: 1.4;
}

/* Controls (Admin Only) */
.header-ctrls {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

#admin-holiday-ctrl {
    display: none;
}

.holiday-select {
    background: #334155;
    color: #fff;
    border: 1px solid var(--accent);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    max-width: 130px;
}

/* 生日提醒卡 */
#birthday-card {
    display: none;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
    animation: bounceIn 1s;
    position: relative;
    overflow: hidden;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    60% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.bd-row {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.bd-icon {
    font-size: 2rem;
    animation: pulse 1s infinite;
}

.bd-text {
    font-size: 1.1rem;
    font-weight: bold;
    flex: 1;
}

.bd-sub {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: normal;
}

.bd-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><circle cx="5" cy="5" r="1" fill="white" opacity="0.3"/></svg>');
    opacity: 0.5;
    animation: bgMove 10s linear infinite;
}

@keyframes bgMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 100px 100px;
    }
}

@keyframes pulse {
    50% {
        opacity: 0.5;
    }
}

/* 節慶賀卡 (Modal) */
#holiday-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s;
}

.hp-card {
    width: 85%;
    max-width: 350px;
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-default {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-color: var(--primary);
}

.theme-default .hp-title {
    color: var(--primary);
}

.theme-red {
    background: linear-gradient(135deg, #b91c1c, #7f1d1d);
    border-color: #f59e0b;
}

.theme-red .hp-title {
    color: #f59e0b;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.theme-green {
    background: linear-gradient(135deg, #064e3b, #065f46);
    border-color: #ef4444;
}

.theme-green .hp-title {
    color: #fff;
    text-shadow: 0 0 10px #ef4444;
}

.theme-pink {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border-color: #fff;
}

.theme-pink .hp-title {
    color: #fff;
}

.theme-spooky {
    background: linear-gradient(135deg, #4c1d95, #c2410c);
    border-color: #fb923c;
}

.theme-spooky .hp-title {
    color: #fb923c;
    font-family: 'Courier New', monospace;
}

.hp-content {
    padding: 25px 20px;
}

.hp-icon-large {
    font-size: 3.5rem;
    margin-bottom: 10px;
    animation: floatIcon 3s ease-in-out infinite;
    display: block;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hp-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.hp-msg-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-line;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hp-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.hp-btn {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    width: 100%;
    transition: 0.2s;
}

.hp-btn:active {
    transform: scale(0.95);
}

.hp-btn-close {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Dashboard Components */
.admin-radar {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    border-bottom: 1px dashed #334155;
    padding-bottom: 5px;
}

.radar-title-main {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.radar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.radar-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.r-label {
    font-size: 0.75rem;
    color: #94a3b8;
    display: block;
    margin-bottom: 2px;
}

.r-date {
    font-size: 1rem;
    color: #fff;
    font-weight: bold;
}

.r-status {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 4px;
    display: inline-block;
    width: fit-content;
}

.status-ok {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.status-warn {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.status-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.status-none {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.radar-btn {
    font-size: 0.75rem;
    color: #fff;
    background: #334155;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.newbie-card {
    background: linear-gradient(145deg, #2e1065, #1e1b4b);
    border: 1px solid var(--purple);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    display: none;
}

.nb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.nb-title {
    font-weight: bold;
    color: #ddd6fe;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nb-pct {
    font-size: 0.85rem;
    color: #fff;
    background: var(--purple);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 800;
}

.nb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.nb-check {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.nb-check.done {
    background: var(--purple);
    border-color: var(--purple);
    color: #fff;
}

.nb-text {
    font-size: 0.9rem;
    color: #e2e8f0;
}

.nb-text.done {
    text-decoration: line-through;
    color: #94a3b8;
}

.daily-challenge-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.dc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px dashed #334155;
    padding-bottom: 10px;
}

.dc-title {
    font-weight: bold;
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dc-streak {
    font-size: 0.8rem;
    color: #f59e0b;
    font-weight: bold;
    background: rgba(245, 158, 11, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.dc-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.dc-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: 0.3s;
}

.bg-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.bg-gold {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.bg-purple {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.dc-info {
    flex: 1;
}

.dc-label {
    font-size: 0.85rem;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.dc-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dc-bar-bg {
    flex: 1;
    height: 6px;
    background: #334155;
    border-radius: 3px;
    overflow: hidden;
}

.dc-bar-fill {
    height: 100%;
    width: 0%;
    background: #10b981;
    transition: 0.3s;
}

.dc-count-text {
    font-size: 0.75rem;
    color: #94a3b8;
    width: 30px;
    text-align: right;
}

.carousel-container {
    position: relative;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-height: 200px;
}

.carousel-container.has-new {
    border-color: #f59e0b;
    animation: borderPulse 3s infinite;
}

@keyframes borderPulse {
    0% {
        border-color: #f59e0b;
    }

    50% {
        border-color: #fbbf24;
    }

    100% {
        border-color: #f59e0b;
    }
}

.slide {
    display: none;
}

.slide.active {
    display: block;
}

.b-image-box {
    width: 100%;
    height: 200px;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #334155;
}

.b-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.b-content {
    padding: 15px;
    position: relative;
}

.b-tags-row {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.b-tag {
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.tag-big {
    background: #7c3aed;
    color: #fff;
}

.tag-small {
    background: #059669;
    color: #fff;
}

.badge-new {
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    animation: textPulse 1.5s infinite;
    display: inline-block;
    margin-left: 5px;
}

.b-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.b-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 4px;
    font-weight: bold;
}

.b-desc {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
    border-top: 1px dashed #334155;
    padding-top: 8px;
    white-space: pre-line;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.nav-prev {
    left: 10px;
}

.nav-next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: #fff;
    pointer-events: none;
}

.btn-fab-add {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: #000;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: none;
}

.bulletin-admin-btns {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.btn-mini {
    background: transparent;
    border: 1px solid #475569;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-del {
    color: #ef4444;
    border-color: #ef4444;
}

.btn-edit {
    color: #3b82f6;
    border-color: #3b82f6;
}

.section-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #fff;
    border-left: 4px solid var(--primary);
    padding-left: 10px;
    margin-top: 10px;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.action-btn {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.05);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.action-text {
    font-size: 0.95rem;
    font-weight: bold;
}

.top10-section {
    margin-bottom: 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-left: 5px;
    border-left: 3px solid var(--accent);
}

.section-title-sm {
    font-weight: bold;
    color: #fff;
    font-size: 1rem;
    margin-left: 8px;
}

.top10-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.top10-card {
    min-width: 160px;
    max-width: 160px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #475569;
    border-radius: 10px;
    padding: 12px;
    flex-shrink: 0;
    position: relative;
}

.top10-card.high-priority {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}

.t-star {
    position: absolute;
    top: 5px;
    right: 8px;
    color: var(--accent);
    font-size: 0.8rem;
}

.t-name {
    font-weight: bold;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t-next {
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(0, 242, 255, 0.1);
    padding: 4px;
    border-radius: 4px;
    min-height: 36px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.t-status {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 5px;
    text-align: right;
}

.empty-top10 {
    color: #64748b;
    font-size: 0.85rem;
    padding: 10px;
    border: 1px dashed #334155;
    border-radius: 8px;
    width: 100%;
    text-align: center;
}

.group-title {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 20px 0 10px 5px;
    font-weight: bold;
    letter-spacing: 1px;
    border-left: 3px solid #00f2ff;
    padding-left: 10px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.menu-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    color: #fff;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: 0.2s;
}

.menu-item:active {
    transform: scale(0.98);
    background: #2d3748;
}

.icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.label {
    font-weight: bold;
    font-size: 1rem;
}

.sub-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.bd-gold {
    border-left: 4px solid #f59e0b;
}

.bd-blue {
    border-left: 4px solid #3b82f6;
}

.bd-green {
    border-left: 4px solid #10b981;
}

.bd-purple {
    border-left: 4px solid #8b5cf6;
}

.bd-red {
    border-left: 4px solid #ef4444;
}

.footer {
    margin-top: 40px;
    text-align: center;
}

.btn-logout {
    background: transparent;
    border: 1px solid #475569;
    color: var(--text-dim);
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
}

/* 導覽列 & 彈窗 (保持隱藏) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-form {
    background: #1e293b;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--accent);
    max-height: 90vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    color: #94a3b8;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 10px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #fff;
    border-radius: 6px;
    box-sizing: border-box;
}

.btn-save {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: #000;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    margin-top: 10px;
    cursor: pointer;
}

.btn-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
}

/* [NEW] 社交邀請卡樣式 */
.social-card-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-card {
    width: 100%;
    max-width: 320px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.sc-header {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sc-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #334155;
    border: 2px solid #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
    overflow: hidden;
}

.sc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sc-info {
    flex: 1;
}

.sc-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
}

.sc-role {
    font-size: 0.75rem;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.sc-body {
    padding: 30px 20px;
    text-align: center;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.sc-title {
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(90deg, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.sc-qr-box {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}

.sc-qr-img {
    width: 160px;
    height: 160px;
    display: block;
}

.sc-note {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 15px;
}

/* [NEW] Toast Notification Styles */
.toast-notification {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    opacity: 0;
    transition: 0.3s;
    min-width: 250px;
    border: 1px solid #334155;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-msg {
    font-size: 0.9rem;
}

/* [NEW] Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    color: transparent !important;
    user-select: none;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.sc-actions {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 10px;
}

.btn-sc {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.2s;
}

.btn-sc-copy {
    background: #334155;
    color: #fff;
    border: 1px solid #475569;
}

.btn-sc-share {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: #000;
}

.btn-sc:active {
    transform: scale(0.96);
}

.sc-close-btn {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-modal-body {
    text-align: center;
}

.digital-card {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 20px auto;
    border-radius: 16px;
    padding: 25px 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 9/14;
}

.style-minimal {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

.style-minimal .dc-avatar {
    background: #f1f5f9;
    color: #1e293b;
    border: 2px solid #cbd5e1;
}

.style-minimal .dc-name {
    color: #0f172a;
}

.style-minimal .dc-link {
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

.style-tech {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #00f2ff;
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
}

.style-tech .dc-avatar {
    background: rgba(0, 242, 255, 0.1);
    color: #00f2ff;
    border: 2px solid #00f2ff;
}

.style-tech .dc-name {
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.5);
}

.style-tech .dc-link {
    color: #00f2ff;
    background: rgba(0, 242, 255, 0.05);
    border: 1px dashed #00f2ff;
}

.style-vibrant {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border: none;
    color: #fff;
}

.style-vibrant .dc-avatar {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
}

.style-vibrant .dc-name {
    color: #fff;
    font-weight: 900;
    letter-spacing: 1px;
}

.style-vibrant .dc-link {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.style-premium {
    background: #000000;
    border: 1px solid #f59e0b;
    color: #f59e0b;
}

.style-premium .dc-avatar {
    background: transparent;
    color: #f59e0b;
    border: 2px solid #f59e0b;
}

.style-premium .dc-name {
    color: #f59e0b;
    font-family: 'Times New Roman', serif;
    letter-spacing: 1px;
}

.style-premium .dc-link {
    color: #d97706;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid #78350f;
}

.dc-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 15px;
    overflow: hidden;
}

.dc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dc-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.dc-role {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dc-qr-box {
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.dc-qr-box img {
    display: block;
    width: 140px;
    height: 140px;
}

.dc-link {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    width: 90%;
    word-break: break-all;
    margin-bottom: 10px;
}

.style-switcher {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
}

.style-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #334155;
    cursor: pointer;
    transition: 0.2s;
}

.style-btn:active {
    transform: scale(0.9);
}

#toast-msg {
    display: none;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10002;
    pointer-events: none;
    border: 1px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Help Sheet Styles */
#help-trigger-btn {
    position: fixed;
    bottom: 85px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(51, 65, 85, 0.8);
    border: 2px solid var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

#help-trigger-btn:active {
    transform: scale(0.95);
}

#help-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s;
}

#help-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background: var(--card-bg);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 2001;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.1, 0.7, 0.1, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--purple);
}

#help-sheet.active {
    transform: translateY(0);
}

.sheet-handle-bar {
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    flex-shrink: 0;
}

.sheet-handle {
    width: 50px;
    height: 5px;
    background: #64748b;
    border-radius: 5px;
}

.sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.help-header {
    margin-bottom: 25px;
    text-align: center;
}

.help-title {
    font-size: 1.6rem;
    font-weight: bold;
    background: linear-gradient(90deg, #c084fc, #6366f1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.help-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
}

.help-section-title {
    font-size: 1rem;
    color: #cbd5e1;
    margin: 20px 0 10px 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #334155;
    padding-bottom: 5px;
}

.scenario-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: 0.2s;
}

.scenario-head {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
}

.scenario-title {
    font-weight: bold;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.scenario-icon {
    color: #64748b;
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.scenario-card.active .scenario-body {
    max-height: 500px;
    padding: 15px;
    border-top: 1px dashed #334155;
}

.scenario-card.active .scenario-icon {
    transform: rotate(180deg);
}

.scenario-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s;
    background: rgba(0, 0, 0, 0.2);
}

.scenario-content {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.step {
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.step::before {
    content: '✔️';
    color: var(--accent);
    font-size: 0.8rem;
}

.tips {
    margin-top: 10px;
    padding: 10px;
    background: rgba(253, 224, 71, 0.1);
    border-left: 3px solid #facc15;
    font-size: 0.85rem;
    color: #fef08a;
    border-radius: 4px;
}
/* --- 模??? (繼承??設?風格) --- */
:root {
    --sheet-bg: #1e293b;
    --sheet-text: #f8fafc;
    --sheet-primary: #ec4899;
    --sheet-accent: #8b5cf6;
    --sheet-dim: #94a3b8;
}

/* 1. ?浮?? */
#help-trigger-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--sheet-primary), var(--sheet-accent));
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.2s;
    animation: pulseBtn 3s infinite;
}

#help-trigger-btn:active {
    transform: scale(0.9);
}

@keyframes pulseBtn {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(236, 72, 153, 0);
    }
}

/* 2. ?罩 */
#help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}

#help-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 3. 上??板 */
#help-sheet {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 80vh;
    background: #0f172a;
    border-radius: 20px 20px 0 0;
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

#help-sheet.active {
    transform: translateY(0);
}

/* ?容?? */
.sheet-handle-bar {
    padding: 10px;
    display: flex;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.sheet-handle {
    width: 40px;
    height: 5px;
    background: #475569;
    border-radius: 10px;
}

.sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px 20px;
}

.help-header {
    text-align: center;
    margin-bottom: 20px;
}

.help-title {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, var(--sheet-primary), var(--sheet-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.help-subtitle {
    color: var(--sheet-dim);
    font-size: 0.85rem;
}

.help-section-title {
    font-size: 1rem;
    font-weight: bold;
    margin: 20px 0 10px;
    color: #fff;
    border-left: 3px solid var(--sheet-primary);
    padding-left: 10px;
}

/* ???? (User Style) */
.scenario-card {
    background: var(--sheet-bg);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.scenario-head {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 0.95rem;
    color: #fff;
}

.scenario-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0, 0, 0, 0.2);
}

.scenario-content {
    padding: 15px;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.6;
}

.scenario-card.open {
    border-color: var(--sheet-accent);
}

.scenario-card.open .scenario-head {
    background: rgba(139, 92, 246, 0.1);
    color: var(--sheet-accent);
}

.step {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.step::before {
    content: '??';
    position: absolute;
    left: 0;
}

.tips {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-top: 10px;
    border: 1px dashed #10b981;
}

/* ?能 Grid */
.map-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.map-item {
    background: var(--sheet-bg);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: 0.2s;
}

.map-item:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

.map-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.map-label {
    font-weight: bold;
    font-size: 0.9rem;
}

.map-desc {
    font-size: 0.7rem;
    color: var(--sheet-dim);
}
/* Bulletin 2.0 Styles */

/* Carousel Header */
.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #334155;
    background: rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 5;
}

.carousel-title {
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-add {
    background: var(--accent);
    color: #000;
    border: none;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Adjust carousel wrapper padding to account for header */
#carousel-wrapper {
    padding-top: 45px;
}

/* Category Tags */
.b-tag-sys {
    background: #3b82f6;
    color: #fff;
}

/* System */
.b-tag-evt {
    background: #10b981;
    color: #fff;
}

/* Event */
.b-tag-hnr {
    background: #f59e0b;
    color: #000;
}

/* Honor */
.b-tag-art {
    background: #8b5cf6;
    color: #fff;
}

/* Article */

/* Sticky Pin */
.sticky-pin {
    font-size: 0.8rem;
    color: #f59e0b;
    margin-right: 5px;
    transform: rotate(45deg);
    display: inline-block;
}

/* List View */
.bulletin-list-container {
    padding: 10px 0;
    animation: fadeIn 0.3s;
}

.b-list-item {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.b-list-item:active {
    background: #334155;
}

.b-list-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    background: #0f172a;
}

.b-list-content {
    flex: 1;
}

.b-list-title {
    font-weight: bold;
    color: #e2e8f0;
    font-size: 0.95rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.b-list-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* RSVP Button in Carousel */
.rsvp-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #334155;
    text-align: center;
}

.btn-rsvp {
    background: linear-gradient(90deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    transition: 0.2s;
    font-size: 0.9rem;
}

.btn-rsvp:disabled {
    background: #334155;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-rsvp:active {
    transform: scale(0.95);
}

.rsvp-count {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 5px;
}

/* --- Bulletin Styles (Moved from bulletin_styles.css) --- */
#carousel-wrapper {
    position: relative;
    width: 100%;
    min-height: 250px;
    overflow: hidden;
    border-radius: 12px;
    background: #1e293b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.slide {
    display: none;
    animation: fadeIn 0.5s;
    padding-bottom: 40px;
}

.slide.active {
    display: block;
}

/* Crucial Image Box Styles */
.b-image-box {
    width: 100%;
    height: 180px; /* Fixed height container */
    overflow: hidden;
    position: relative;
    background: #000;
}

.b-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop to fill without distortion */
    opacity: 0.9;
}

.b-content {
    padding: 15px;
    position: relative;
}

.b-tags-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.b-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #fff;
    font-weight: bold;
}

.b-tag-sys { background: #64748b; }
.b-tag-evt { background: #10b981; }
.b-tag-hnr { background: #f59e0b; }
.b-tag-art { background: #3b82f6; }

.tag-big { border: 1px solid #a855f7; color: #d8b4fe; background: rgba(168, 85, 247, 0.1); }
.tag-small { border: 1px solid #22d3ee; color: #a5f3fc; background: rgba(34, 211, 238, 0.1); }

.badge-new {
    background: #ef4444;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    animation: pulse 2s infinite;
}

.b-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
}

.sticky-pin {
    margin-right: 5px;
}

.b-info-row {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.b-desc {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.6;
    white-space: pre-wrap;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    pointer-events: none;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.carousel-nav:hover { background: rgba(0, 0, 0, 0.8); }
.nav-prev { left: 10px; }
.nav-next { right: 10px; }

/* RSVP */
.rsvp-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #475569;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-rsvp {
    background: linear-gradient(90deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-rsvp:active { transform: scale(0.95); }
.btn-rsvp:disabled { background: #475569; cursor: default; transform: none; }

.rsvp-count {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* List View */
#bulletin-list-container {
    display: none;
    margin-top: 20px;
    animation: slideDown 0.3s;
}

.b-list-item {
    display: flex;
    gap: 12px;
    background: #1e293b;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.2s;
}

.b-list-item:hover {
    border-color: #475569;
    background: #273548;
}

.b-list-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: #0f172a;
    object-fit: cover;
    flex-shrink: 0;
}

.b-list-content {
    flex: 1;
    overflow: hidden;
}

.b-list-title {
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.b-list-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
}

.btn-toggle-list {
    width: 100%;
    background: transparent;
    border: 1px dashed #475569;
    color: #94a3b8;
    padding: 8px;
    margin-top: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

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

/* Gallery Styles for Multi-Image */
.b-gallery {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.b-gallery img {
    height: 400px; /* Increased height */
    width: auto;
    max-width: 100%;
    object-fit: contain; /* Full Image */
    background: #000;
    border-radius: 8px;
    flex-shrink: 0;
    cursor: zoom-in;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.b-gallery::-webkit-scrollbar {
    height: 6px;
}
.b-gallery::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}



/* --- Bulletin 3.0 Social Feed Styles --- */

.feed-section {
    margin: 20px 0;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

.filter-pill {
    background: #1e293b;
    color: #94a3b8;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #334155;
    transition: 0.2s;
}

.filter-pill.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* Feed Container */
.feed-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Feed Card */
.feed-card {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    border: 1px solid #334155;
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 10px;
}

.card-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 1.2rem;
}

.card-meta {
    flex: 1;
}

.card-author {
    color: #fff;
    font-weight: bold;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-sub {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 2px;
}

.card-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 5px;
}
.tag-sys { background: #475569; color: #cbd5e1; }
.tag-evt { background: #059669; color: #a7f3d0; }
.tag-hnr { background: #d97706; color: #fde68a; }
.tag-art { background: #2563eb; color: #bfdbfe; }

.badge-new-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
}

/* Card Body */
.card-body {
    padding: 0 15px 15px 15px;
}

.card-title {
    color: #fff;
    font-size: 1.1rem;
    margin: 5px 0 8px 0;
    line-height: 1.4;
}

.card-text {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.card-loc, .card-time {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Gallery (Instagram style) */
.card-gallery {
    width: 100%;
    /* Keep aspect ratio or max-height */
    /* Mobile feed look */
    background: #000;
    overflow-x: auto;
    display: flex;
    scroll-snap-type: x mandatory;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.card-gallery img {
    width: 100%;
    height: auto;
    max-height: 500px;
    flex-shrink: 0;
    scroll-snap-align: center;
    object-fit: contain; /* Full image */
}

.gallery-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    pointer-events: none;
}

/* RSVP Area */
.card-rsvp-area {
    padding: 12px 15px;
    border-top: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.5);
}

.btn-rsvp {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn-rsvp.active {
    background: #10b981;
    pointer-events: none;
}

.rsvp-avatars {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Admin Opts */
.card-admin-opts {
    display: flex;
    gap: 5px;
}
.card-admin-opts button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    padding: 5px;
}
.card-admin-opts button:hover { opacity: 1; }

.feed-empty, .feed-loading, .feed-error {
    text-align: center;
    padding: 40px;
    color: #64748b;
}



/* --- Super App Homepage Styles --- */

/* 1. Glass Header */
.modern-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 20px 10px 20px; /* Top Bottom */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    border: 2px solid rgba(255,255,255,0.2);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-greet {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
}

.user-status {
    font-size: 0.8rem;
    color: #94a3b8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.level-badge-sm {
    background: rgba(255, 255, 255, 0.1);
    color: #f59e0b;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid #f59e0b;
    font-weight: bold;
}

.btn-icon-sm {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 1.2rem;
    padding: 5px;
    cursor: pointer;
}

.header-xp-container {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-bottom: 8px;
    overflow: hidden;
}

.header-xp-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #a855f7);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px #a855f7;
}

.header-quote {
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* 2. Daily Hero Rings */
.hero-section {
    padding: 20px;
}

.daily-rings-card {
    background: #1e293b;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.05);
}

.rings-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
}

.streak-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.rings-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.ring-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s;
}

.ring-item:active { transform: scale(0.95); }

.progress-ring-box {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.5s;
    transform-origin: 50% 50%;
    /* r=34, C=2*pi*34 ~= 213.6 */
    stroke-dasharray: 213.6 213.6; 
}
.progress-ring__circle.bg { stroke-dashoffset: 0; opacity: 0.3; }
.progress-ring__circle.val { stroke-dashoffset: 213.6; stroke-linecap: round; } 
/* val starts empty, JS will animate it */

.ring-icon {
    position: absolute;
    font-size: 1.8rem;
}

.ring-label {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 2px;
}

.ring-count {
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
}


/* 3. Horizontal App Tray */
.tray-section {
    padding-left: 20px; /* Only left padding to allow scroll bleed */
    margin-bottom: 25px;
}

.tray-title {
    font-size: 1rem;
    font-weight: bold;
    color: #e2e8f0;
    margin-bottom: 12px;
    padding-right: 20px;
}

.app-tray {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px; /* space for scrollbar/touch */
    padding-right: 20px; /* scroll padding */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Hide scrollbar visually */
    scrollbar-width: none; 
}
.app-tray::-webkit-scrollbar { display: none; }

.app-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 70px; /* Fixed width for alignment */
    cursor: pointer;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px; /* Squircle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    color: #fff;
    transition: transform 0.2s;
}

.app-icon:hover { transform: translateY(-3px); }

.app-icon-item span {
    font-size: 0.8rem;
    color: #cbd5e1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Gradients for App Icons */
.bg-gradient-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.bg-gradient-gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bg-gradient-purple { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.bg-gradient-green { background: linear-gradient(135deg, #10b981, #059669); }
.bg-gradient-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.bg-dark { background: #334155; }
.bg-slate { background: #475569; }

/* Top 10 Compact List */
.top10-list-compact {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-right: 20px;
    padding-bottom: 10px;
}

.top10-list-compact .top10-card {
    min-width: 140px;
    padding: 10px;
    background: #1e293b;
    border: 1px solid #334155;
    flex-shrink: 0;
}

/* --- Status Radar (Dates) Redesign v3 --- */
.status-radar-card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 20px;
    padding: 15px;
    margin: 15px 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.radar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 5px;
}

.radar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radar-widget {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s, background 0.2s;
}

.radar-widget:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.1);
}

.radar-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.radar-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 2px;
}

.radar-date-big {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.radar-action-btn {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
}

.radar-action-btn:hover {
    background: rgba(59, 130, 246, 0.3);
}

.radar-action-btn.done {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
    pointer-events: none;
}

.radar-alert {
    color: #ef4444 !important;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.radar-widget:has(.radar-alert) {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
}

.btn-pill-add {
    background: linear-gradient(135deg, #ec4899 0%, #d946ef 100%);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.3);
    white-space: nowrap;
    margin-right: 8px;
}

.btn-pill-add span {
    font-weight: bold;
    font-size: 1rem;
}
/* --- Status Radar (Dates) Horizontal List v4 --- */
.status-radar-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    padding: 20px;
    margin: 15px 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.radar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.radar-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radar-list-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 15px;
    gap: 15px;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
}

.radar-list-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.1);
}

.radar-list-left {
    flex-shrink: 0;
}

.progress-ring-box-sm {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring-icon-sm {
    position: absolute;
    font-size: 1.5rem;
    line-height: 1;
    pointer-events: none;
}

.radar-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.radar-list-label {
    font-size: 1rem;
    /* User requested larger font */
    color: #94a3b8;
    margin-bottom: 4px;
}

.radar-list-date {
    font-size: 1.5rem;
    /* User requested larger font */
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.radar-list-action {
    color: #475569;
    font-size: 1.5rem;
    font-weight: 300;
}

/* Alert Styles */
.radar-alert {
    color: #ef4444 !important;
}

.radar-list-item:has(.radar-alert) {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}
/* --- Multi-Image Gallery (v25) --- */
.card-gallery {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 0 12px;
    /* Bottom padding for scrollbar if visible */
    scroll-snap-type: x mandatory;
    margin-top: 10px;
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.card-gallery::-webkit-scrollbar {
    height: 6px;
}

.card-gallery::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.card-gallery img {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    scroll-snap-align: start;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.card-gallery img:active {
    transform: scale(0.96);
}

.gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    pointer-events: none;
}

/* Zoom Modal Navigation */
.zoom-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background 0.2s;
    user-select: none;
    z-index: 100000;
}

.zoom-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.zoom-nav-btn.prev {
    left: 20px;
}

.zoom-nav-btn.next {
    right: 20px;
}

.zoom-nav-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}
/* --- Adaptive Gallery Layouts (v26) --- */

/* Single Image - Full Width */
.gallery-single {
    display: block !important;
    overflow: hidden;
}

.gallery-single img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

/* 2 Images - Side by Side */
.gallery-duo {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.gallery-duo img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

/* 3 Images - 1 Large + 2 Stacked */
.gallery-trio {
    display: grid !important;
    grid-template-columns: 2fr 1fr;
    gap: 4px;
    height: 240px;
}

.gallery-trio .gallery-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

.gallery-trio .gallery-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gallery-trio .gallery-side img {
    width: 100%;
    flex: 1;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

/* 4+ Images - 2x2 Grid */
.gallery-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    height: 280px;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

.gallery-more {
    position: relative;
    cursor: pointer;
}

.gallery-more img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.gallery-more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    border-radius: 6px;
    pointer-events: none;
}
/* --- Gallery Single Fix (v27.1) --- */
.gallery-single img {
    width: 100%;
    max-height: 400px;
    object-fit: contain !important;
    /* Show full image without cropping */
    border-radius: 8px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.1);
    /* Background for letterboxing */
}

/* --- Global Safe Area & Navigation fix --- */
body {
    padding-bottom: 100px !important; /* Ensure content is above nav */
}

.safe-area-bottom {
    padding-bottom: 100px;
}

/* --- Guide FAB Auto-Hide --- */
.guide-help-trigger {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998; /* Below Nav (9999) but above content */
    backdrop-filter: blur(4px);
    transition: opacity 0.5s, transform 0.5s;
    opacity: 1;
    transform: translateX(0);
}

.guide-help-trigger.faded {
    opacity: 0.3;
    pointer-events: none; /* Prevent accidental clicks when hidden */
}

/* Make sure FABs don't overlap */
.fab {
    bottom: 140px !important; /* Push main FAB up above guide button */
}

/* Guide Close Button */
.guide-close-btn {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10001;
    font-family: Arial, sans-serif;
    line-height: 1;
    cursor: pointer;
}
