/**
 * Rainbow Bridge 彩虹橋模組樣式
 * 星空療癒風主題
 */

/* ===== CSS Variables ===== */
:root {
    --rb-primary: #1a1a2e;
    --rb-secondary: #16213e;
    --rb-accent: #e94560;
    --rb-accent-light: #ff6b9d;
    --rb-star: #f1c40f;
    --rb-purple: #9b59b6;
    --rb-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    /* Fallback variables for sites without global definitions */
    --text-muted: var(--paws-text-muted, #999999);
    --text-color: var(--paws-text, #333333);
    --bg-secondary: var(--paws-bg, #f5f5f5);
    --border-color: var(--paws-border, #e0e0e0);
}

/* ===== Common Form Styles ===== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-label.required::after {
    content: ' *';
    color: var(--rb-accent);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--paws-card, #ffffff);
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--rb-purple);
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Date input fixes for iOS */
input[type="date"].form-control {
    -webkit-appearance: none;
    appearance: none;
    max-width: 100%;
    min-height: 44px;
}

input[type="date"].form-control::-webkit-date-and-time-value {
    text-align: left;
}

/* =====================================================
   Landing Page Styles
   ===================================================== */

/* Hero Section */
.rb-landing {
    min-height: 100vh;
}

.rb-hero {
    position: relative;
    background: var(--rb-gradient);
    padding: 20px;
    text-align: center;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
    margin-bottom: 10px;
}

.rb-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(155, 89, 182, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Animated Stars */
.rb-stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.rb-stars::before,
.rb-stars::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        50px 20px 0 rgba(255,255,255,0.8),
        120px 60px 0 rgba(255,255,255,0.6),
        200px 30px 0 rgba(255,255,255,0.5),
        280px 80px 0 rgba(255,255,255,0.7),
        350px 40px 0 rgba(255,255,255,0.4),
        420px 70px 0 rgba(255,255,255,0.6),
        80px 120px 0 rgba(255,255,255,0.5),
        180px 100px 0 rgba(255,255,255,0.3),
        260px 140px 0 rgba(255,255,255,0.6),
        340px 110px 0 rgba(255,255,255,0.4),
        400px 150px 0 rgba(255,255,255,0.5);
    animation: twinkle 3s ease-in-out infinite;
}

.rb-stars::after {
    top: 50%;
    animation-delay: 1.5s;
    box-shadow:
        30px 10px 0 rgba(255,255,255,0.6),
        100px 50px 0 rgba(255,255,255,0.4),
        170px 20px 0 rgba(255,255,255,0.7),
        240px 70px 0 rgba(255,255,255,0.5),
        310px 30px 0 rgba(255,255,255,0.6),
        380px 60px 0 rgba(255,255,255,0.4),
        450px 40px 0 rgba(255,255,255,0.5);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.rb-hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.rb-hero-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.3), rgba(233, 69, 96, 0.3));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 30px rgba(155, 89, 182, 0.4),
        0 0 60px rgba(233, 69, 96, 0.2);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow:
            0 0 30px rgba(155, 89, 182, 0.4),
            0 0 60px rgba(233, 69, 96, 0.2);
    }
    50% {
        box-shadow:
            0 0 40px rgba(155, 89, 182, 0.6),
            0 0 80px rgba(233, 69, 96, 0.3);
    }
}

.rb-hero-icon .material-icons {
    font-size: 56px;
    color: #fff;
}

.rb-hero-title {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.rb-hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    margin-bottom: 24px;
}

.rb-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.rb-divider::before,
.rb-divider::after {
    content: '';
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.rb-divider .material-icons {
    font-size: 20px;
    color: var(--rb-star);
}

/* Content Section */
.rb-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Action Buttons */
.rb-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.rb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.rb-btn .material-icons {
    font-size: 20px;
}

.rb-btn-primary {
    background: linear-gradient(135deg, var(--rb-purple), var(--rb-accent));
    color: #fff;
    box-shadow: 0 4px 20px rgba(155, 89, 182, 0.4);
    font-weight: 600;
    border: 2px solid transparent;
}

.rb-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(155, 89, 182, 0.5);
}

.rb-btn-secondary {
    background: var(--card-bg);
    color: var(--rb-purple);
    border: 2px solid var(--rb-purple);
    font-weight: 600;
}

.rb-btn-secondary:hover {
    background: rgba(155, 89, 182, 0.1);
    transform: translateY(-2px);
}

.rb-btn-outline {
    background: #fff;
    color: var(--rb-purple);
    border: 2px solid var(--rb-purple);
    font-weight: 600;
}

.rb-btn-outline:hover {
    background: rgba(155, 89, 182, 0.1);
    transform: translateY(-2px);
    color: var(--rb-purple);
}

.rb-btn-large {
    padding: 16px 36px;
    font-size: 1.05rem;
}

/* Section Title */
.rb-section {
    margin-bottom: 40px;
}

.rb-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.rb-section-title .material-icons {
    color: var(--rb-accent);
}

/* Memorial Grid (Landing) */
.rb-memorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    justify-content: center;
}

.rb-memorial-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: var(--card-bg);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.rb-memorial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.15);
    border-color: var(--rb-purple);
}

.rb-memorial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 3px solid transparent;
    background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
                linear-gradient(135deg, var(--rb-purple), var(--rb-accent)) border-box;
}

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

.rb-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--rb-purple), var(--rb-accent));
    display: flex;
    align-items: center;
    justify-content: center;
}

.rb-avatar-placeholder .material-icons {
    font-size: 32px;
    color: #fff;
}

.rb-memorial-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    text-align: center;
}

.rb-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-top: 6px;
}

.rb-badge-draft {
    background: rgba(241, 196, 15, 0.2);
    color: var(--rb-star);
}

/* Empty Notice */
.rb-empty-notice {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.05), rgba(233, 69, 96, 0.05));
    border-radius: 16px;
    border: 1px dashed rgba(155, 89, 182, 0.3);
    margin-bottom: 30px;
}

.rb-empty-notice .material-icons {
    font-size: 48px;
    color: var(--rb-purple);
    opacity: 0.5;
    margin-bottom: 12px;
}

.rb-empty-notice p {
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0;
}

/* Feature Cards */
.rb-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.rb-feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.rb-feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--rb-purple);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.1);
}

.rb-feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.15), rgba(155, 89, 182, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rb-feature-icon .material-icons {
    font-size: 28px;
    color: var(--rb-purple);
}

.rb-feature-icon-warm {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.15), rgba(233, 69, 96, 0.05));
}

.rb-feature-icon-warm .material-icons {
    color: var(--rb-accent);
}

.rb-feature-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.rb-feature-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* CTA Section */
.rb-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

/* Quote */
.rb-quote {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.08), rgba(233, 69, 96, 0.08));
    border-radius: 16px;
    margin-bottom: 30px;
}

.rb-quote .material-icons {
    font-size: 32px;
    color: var(--rb-purple);
    opacity: 0.5;
    transform: rotate(180deg);
    display: block;
    margin-bottom: 8px;
}

.rb-quote p {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
    line-height: 1.6;
}

/* Back Link */
.rb-back {
    text-align: center;
}

.rb-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.rb-back a:hover {
    color: var(--rb-purple);
}

.rb-back .material-icons {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 600px) {
    .rb-hero {
        padding: 60px 16px 50px;
    }

    .rb-hero-icon {
        width: 100px;
        height: 100px;
    }

    .rb-hero-icon .material-icons {
        font-size: 48px;
    }

    .rb-hero-title {
        font-size: 1.6rem;
    }

    .rb-hero-subtitle {
        font-size: 1rem;
    }

    .rb-actions {
        flex-direction: column;
        align-items: center;
    }

    .rb-btn {
        /* max-width: 280px; */
        justify-content: center;
    }

    .rb-features {
        grid-template-columns: 1fr 1fr;
    }

    .rb-feature-card {
        padding: 20px 16px;
    }

    .rb-cta {
        flex-direction: column;
        align-items: center;
    }

    .rb-btn-large {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* ===== Page Container ===== */
.rb-page {
    padding-bottom: 40px;
}

.rb-page .page-header {
    text-align: center;
    margin-bottom: 30px;
}

.rb-page .page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.rb-page .page-title .material-icons {
    color: var(--rb-purple);
}

.rb-page .page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== Empty State ===== */
.rb-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    margin: 20px 0;
}

.rb-empty-state .empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--rb-purple), var(--rb-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rb-empty-state .empty-icon .material-icons {
    font-size: 40px;
    color: #fff;
}

.rb-empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.rb-empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.rb-back-link {
    display: flex;
    align-items: center;
    color: #fff;
    gap: 10px;
}
.rb-back-link:hover {
    color:#fff;
}

/* ===== CTA Banner ===== */
.rb-cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.1), rgba(233, 69, 96, 0.1));
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.rb-cta-banner .banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rb-cta-banner .banner-content .material-icons {
    font-size: 32px;
    color: var(--rb-purple);
}

.rb-cta-banner .banner-text strong {
    display: block;
    margin-bottom: 4px;
}

.rb-cta-banner .banner-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 600px) {
    .rb-cta-banner {
        flex-direction: column;
        text-align: center;
    }

    .rb-cta-banner .banner-content {
        flex-direction: column;
    }
}

/* ===== Step Container ===== */
.rb-step-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.rb-step-container .step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.rb-step-container .step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--rb-purple), var(--rb-accent));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.rb-step-container .step-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.rb-step-container .step-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ===== Pet Selection ===== */
.pet-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.pet-select-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.pet-select-card:hover:not(.has-memorial) {
    border-color: var(--rb-purple);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.15);
}

.pet-select-card.has-memorial {
    cursor: default;
    opacity: 0.8;
}

.pet-select-card .pet-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}

.pet-select-card .pet-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.pet-select-card .pet-avatar-placeholder .material-icons {
    font-size: 36px;
    color: var(--text-muted);
}

.pet-select-card .pet-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.pet-select-card .pet-breed {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.pet-select-card .pet-dates {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pet-select-card .memorial-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 10px;
}

.pet-select-card .memorial-badge .material-icons {
    font-size: 16px;
}

.pet-select-card .select-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--rb-purple);
    font-size: 0.9rem;
}

.pet-select-card .select-indicator .material-icons {
    font-size: 20px;
}

.pet-select-card .edit-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* ===== Selected Pet Card ===== */
.selected-pet-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 20px;
}

.selected-pet-card .pet-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.selected-pet-card .pet-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-pet-card .pet-avatar-placeholder .material-icons {
    font-size: 28px;
    color: var(--text-muted);
}

.selected-pet-card .pet-info {
    flex: 1;
}

.selected-pet-card .pet-info h3 {
    font-size: 1.1rem;
    margin: 0 0 4px;
}

.selected-pet-card .pet-breed,
.selected-pet-card .pet-status {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.selected-pet-card .pet-status.published {
    color: #2ecc71;
}

.selected-pet-card .pet-status.draft {
    color: var(--text-muted);
}

.selected-pet-card .change-pet-link,
.selected-pet-card .view-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
}

/* ===== Auto Recommend Banner ===== */
.auto-recommend-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.1), rgba(233, 69, 96, 0.1));
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 12px;
    margin-bottom: 24px;
}

.auto-recommend-banner .material-icons {
    font-size: 28px;
    color: var(--rb-star);
}

.auto-recommend-banner .banner-text strong {
    display: block;
    margin-bottom: 4px;
}

.auto-recommend-banner .banner-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ===== Form Styles ===== */
.rb-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 500px) {
    .rb-form .form-row {
        grid-template-columns: 1fr;
    }
}

.rb-form .form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.rb-form .letter-textarea {
    font-family: 'Noto Serif TC', serif;
    line-height: 2;
}

/* ===== Cover Photo Selector ===== */
.cover-photo-selector {
    position: relative;
}

.cover-photo-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 200px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.cover-photo-empty:hover {
    border-color: var(--rb-purple);
    color: var(--rb-purple);
}

.cover-photo-empty .material-icons {
    font-size: 48px;
}

.cover-photo-preview {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.cover-photo-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.remove-cover-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Photo Grid ===== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item .photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 0.75rem;
}

/* Photo actions bar */
.photo-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.photo-actions .photo-count {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.photo-actions .photo-count span {
    font-weight: 600;
    color: var(--rb-purple);
}

/* Photo selection states */
.photo-item {
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}

.photo-item:not(.add-photo):hover {
    transform: scale(1.02);
}

.photo-item.selected {
    border-color: var(--rb-accent);
}

.photo-item .photo-select-check {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #2ecc71;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-item.selected .photo-select-check {
    opacity: 1;
}

.photo-item .photo-select-check .material-icons {
    font-size: 24px;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.photo-item .remove-photo-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.photo-item .remove-photo-btn .material-icons {
    font-size: 16px;
}

.photo-item.add-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.photo-item.add-photo:hover {
    border-color: var(--rb-purple);
    color: var(--rb-purple);
}

.photo-item.add-photo .material-icons {
    font-size: 28px;
}

/* ===== Timeline Editor ===== */
.timeline-editor {
    position: relative;
    padding-left: 30px;
}

.timeline-editor::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--rb-star), var(--rb-accent), var(--rb-purple));
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
    display: flex;
    gap: 10px;
}

.timeline-item .timeline-dot {
    position: absolute;
    left: -26px;
    top: 0;
    width: 18px;
    height: 18px;
    background: var(--rb-star);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-item .timeline-dot .material-icons {
    font-size: 12px;
    color: var(--rb-primary);
}

.timeline-item .timeline-content {
    flex: 1;
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 10px;
}

.timeline-item .timeline-date {
    font-size: 0.85rem;
    color: var(--rb-star);
    margin-bottom: 8px;
}

.timeline-item .timeline-date-input {
    font-size: 0.85rem;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    margin-bottom: 8px;
}

.timeline-item .timeline-title-input {
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    margin-bottom: 8px;
}

.timeline-item .timeline-desc-input {
    width: 100%;
    font-size: 0.9rem;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    resize: vertical;
    min-height: 150px;
}

.timeline-item .remove-timeline-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-item .timeline-title-input,
.timeline-item .timeline-date-input,
.timeline-item .timeline-desc-input,
.timeline-add-photo-btn {
    background-color: #fff!important;
}

.timeline-item .remove-timeline-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.btn-add-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-add-timeline:hover {
    border-color: var(--rb-purple);
    color: var(--rb-purple);
}

/* ===== Privacy Options ===== */
.privacy-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.privacy-option {
    cursor: pointer;
}

.privacy-option input {
    display: none;
}

.privacy-option .option-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.privacy-option input:checked + .option-content {
    border-color: var(--rb-purple);
    background: rgba(155, 89, 182, 0.1);
}

.privacy-option .option-content .material-icons {
    font-size: 24px;
    color: var(--text-muted);
}

.privacy-option input:checked + .option-content .material-icons {
    color: var(--rb-purple);
}

.privacy-option .option-label {
    font-weight: 600;
}

.privacy-option .option-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* ===== Toggle Options ===== */
.toggle-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-option input {
    width: 20px;
    height: 20px;
    accent-color: var(--rb-purple);
}

.toggle-option .toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-option .toggle-label .material-icons {
    font-size: 20px;
    color: var(--text-muted);
}

/* ===== Form Actions ===== */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 1rem;
}

.form-actions .btn-publish {
    background: linear-gradient(135deg, var(--rb-purple), var(--rb-accent));
}

/* ===== Danger Zone ===== */
.danger-zone {
    margin-top: 40px;
    padding: 20px;
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 12px;
}

.danger-zone h3 {
    color: #e74c3c;
    font-size: 1rem;
    margin-bottom: 8px;
}

.danger-zone p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.danger-zone .btn-danger {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ===== Memorial List ===== */
.memorial-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.memorial-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.memorial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.memorial-card .memorial-cover {
    position: relative;
    height: 160px;
    background: var(--rb-gradient);
}

.memorial-card .memorial-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.memorial-card .memorial-cover .cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.memorial-card .memorial-cover .cover-placeholder .material-icons {
    font-size: 60px;
    color: rgba(255, 255, 255, 0.3);
}

.memorial-card .status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.memorial-card .status-badge.published {
    background: rgba(46, 204, 113, 0.9);
    color: #fff;
}

.memorial-card .status-badge.draft {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.memorial-card .status-badge .material-icons {
    font-size: 14px;
}

.memorial-card .memorial-info {
    padding: 16px;
}

.memorial-card .memorial-name {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.memorial-card .memorial-dates {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.memorial-card .memorial-epitaph {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 12px;
}

.memorial-card .memorial-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.memorial-card .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.memorial-card .stat-item .material-icons {
    font-size: 16px;
}

.memorial-card .privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    background: var(--bg-secondary);
}

.memorial-card .privacy-badge .material-icons {
    font-size: 14px;
}

.memorial-card .memorial-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.memorial-card .memorial-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* ===== Photo Selector Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.photo-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.photo-selector-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.photo-selector-item:hover {
    border-color: var(--rb-purple);
}

.photo-selector-item.selected {
    border-color: var(--rb-accent);
}

.photo-selector-item.selected::after {
    content: 'check_circle';
    font-family: 'Material Icons';
    position: absolute;
    top: 5px;
    right: 5px;
    color: var(--rb-accent);
    font-size: 24px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.photo-selector-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-selector-item .photo-date {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.7rem;
    text-align: center;
}

/* ===== Bottom Links ===== */
.rb-bottom-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.rb-bottom-links .link-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.rb-bottom-links .link-item:hover {
    color: var(--rb-purple);
}

/* ===== Alert ===== */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.alert .material-icons {
    font-size: 20px;
}

/* ===== Spinning Animation ===== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning {
    animation: spin 1s linear infinite;
}

/* =====================================================
   Member Page Styles
   ===================================================== */

.rb-member-page {
    min-height: 80vh;
    overflow-x: hidden;
}

/* Member Mini Hero */
.rb-member-hero {
    position: relative;
    background: var(--rb-gradient);
    padding: 40px 20px 30px;
    text-align: center;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
    margin-bottom: 20px;
}

.rb-member-hero .rb-stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.6;
}

.rb-member-hero-content {
    position: relative;
    z-index: 1;
}

.rb-member-hero-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.4), rgba(233, 69, 96, 0.4));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(155, 89, 182, 0.5);
}

.rb-member-hero-icon .material-icons {
    font-size: 36px;
    color: #fff;
}

.rb-member-hero h1 {
    font-size: 1.4rem;
    color: #fff;
    margin: 0 0 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.rb-member-hero p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Member Content */
.rb-member-content {
    padding: 0 4px;
}

/* Alert */
.rb-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.rb-alert-success {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(46, 204, 113, 0.05));
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.rb-alert .material-icons {
    font-size: 20px;
}

/* Member CTA Banner */
.rb-member-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.1), rgba(233, 69, 96, 0.1));
    border: 1px solid rgba(155, 89, 182, 0.25);
    border-radius: 16px;
    margin-bottom: 24px;
}

.rb-member-cta-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--rb-purple), var(--rb-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rb-member-cta-icon .material-icons {
    font-size: 24px;
    color: #fff;
}

.rb-member-cta-text {
    flex: 1;
}

.rb-member-cta-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.rb-member-cta-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

@media (max-width: 600px) {
    .rb-member-cta {
        flex-direction: column;
        text-align: center;
    }

    .rb-member-cta .rb-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Member Card List */
.rb-member-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rb-member-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.rb-member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(155, 89, 182, 0.15);
    border-color: var(--rb-purple);
}

.rb-member-card-cover {
    position: relative;
    height: 140px;
    background: var(--rb-gradient);
}

.rb-member-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rb-member-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rb-member-card-placeholder .material-icons {
    font-size: 50px;
    color: rgba(255, 255, 255, 0.3);
}

.rb-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.rb-status-badge.published {
    background: rgba(46, 204, 113, 0.95);
    color: #fff;
}

.rb-status-badge.draft {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}

.rb-status-badge .material-icons {
    font-size: 14px;
}

.rb-member-card-body {
    padding: 16px;
}

.rb-member-card-name {
    font-size: 1.15rem;
    margin: 0 0 8px;
}

.rb-member-card-dates {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.rb-member-card-dates .material-icons {
    font-size: 16px;
    color: var(--rb-purple);
}

.rb-member-card-epitaph {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0 0 12px;
    line-height: 1.5;
}

.rb-member-card-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.rb-member-card-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rb-member-card-stats .stat-item .material-icons {
    font-size: 16px;
}

.rb-member-card-stats .stat-item:nth-child(2) .material-icons {
    color: var(--rb-accent);
}

.rb-privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    background: var(--bg-secondary);
}

.rb-privacy-badge .material-icons {
    font-size: 14px;
}

.rb-privacy-badge.privacy-public .material-icons {
    color: #2ecc71;
}

.rb-privacy-badge.privacy-unlisted .material-icons {
    color: var(--rb-star);
}

.rb-privacy-badge.privacy-private .material-icons {
    color: var(--rb-accent);
}

.rb-member-card-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

.rb-member-card-actions .rb-btn {
    flex: 1;
    justify-content: center;
}

/* Small Buttons */
.rb-btn-sm {
    padding: 10px 16px;
    font-size: 0.9rem;
}

.rb-btn-sm .material-icons {
    font-size: 18px;
}

/* Member Empty State */
.rb-member-empty {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.05), rgba(233, 69, 96, 0.05));
    border-radius: 20px;
    border: 1px dashed rgba(155, 89, 182, 0.3);
    margin-bottom: 30px;
}

.rb-member-empty-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--rb-purple), var(--rb-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(155, 89, 182, 0.3);
}

.rb-member-empty-icon .material-icons {
    font-size: 42px;
    color: #fff;
}

.rb-member-empty h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.rb-member-empty p {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Member Footer */
.rb-member-footer {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.rb-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    color: var(--rb-purple);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.rb-footer-link:hover {
    background: rgba(155, 89, 182, 0.1);
}

.rb-footer-link .material-icons {
    font-size: 20px;
}

/* Responsive for Member Page */
@media (max-width: 600px) {
    .rb-member-hero {
        margin: -16px -12px 20px;
        padding: 30px 16px 24px;
    }

    .rb-member-hero-icon {
        width: 60px;
        height: 60px;
    }

    .rb-member-hero-icon .material-icons {
        font-size: 30px;
    }

    .rb-member-hero h1 {
        font-size: 1.2rem;
    }

    .rb-member-list {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Create Page Styles
   ===================================================== */

/* Create Page Container */
.rb-create-page {
    --paws-card: var(--paws-card, #ffffff);
    --paws-bg: var(--paws-bg, #f5f5f5);
    --paws-border: var(--paws-border, #e0e0e0);
    --text-color: var(--paws-text, #333333);
    --text-muted: var(--paws-text-muted, #999999);
    overflow-x: hidden;
}

/* Create Page Hero */
.rb-create-hero {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 20px 20px 40px;
    text-align: center;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
    margin-bottom: 20px;
}

.rb-create-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(155, 89, 182, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.rb-create-hero-content {
    position: relative;
    z-index: 1;
}

.rb-create-hero-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.3), rgba(233, 69, 96, 0.3));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(155, 89, 182, 0.4);
}

.rb-create-hero-icon .material-icons {
    font-size: 40px;
    color: #fff;
}

.rb-create-hero h1 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0 0 8px;
}

.rb-create-hero p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.95rem;
}

/* Content */
.rb-create-content {
    padding: 0 16px 40px;
    margin: 0 auto;
}

/* Section Card */
.rb-section {
    background: var(--paws-card, #ffffff);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rb-section .section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.rb-section .section-header h2 {
    font-size: 1.1rem;
    margin: 0;
    flex: 1;
}

.rb-section .section-header .material-icons {
    color: var(--rb-purple);
    font-size: 24px;
}

.rb-section .section-desc {
    color: var(--text-muted, #999);
    font-size: 0.9rem;
    margin: -8px 0 16px;
}

/* Step Badge */
.step-badge {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #9b59b6, #e94560);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.photo-limit-badge {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Pet Selector */
.rb-pet-select-section {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.08), rgba(233, 69, 96, 0.05));
    border: 1px solid rgba(155, 89, 182, 0.2);
}

.rb-pet-selector {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px;
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
}

.rb-pet-selector::-webkit-scrollbar {
    display: none;
}

.rb-pet-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--paws-card, #fff);
    border: 2px solid transparent;
    border-radius: 16px;
    min-width: 90px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.rb-pet-tab:hover {
    border-color: rgba(155, 89, 182, 0.3);
}

.rb-pet-tab.active {
    border-color: var(--rb-purple);
    background: rgba(155, 89, 182, 0.1);
}

.rb-pet-tab.has-memorial {
    opacity: 0.6;
}

.rb-pet-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--paws-bg, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

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

.rb-pet-avatar .material-icons {
    font-size: 28px;
    color: var(--text-muted, #999);
}

.rb-pet-avatar .memorial-check,
.rb-pet-avatar .rainbow-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--paws-card, #fff);
}

.rb-pet-avatar .memorial-check {
    background: #27ae60;
}

.rb-pet-avatar .rainbow-badge {
    background: linear-gradient(135deg, #9b59b6, #e94560);
}

.rb-pet-avatar .memorial-check .material-icons,
.rb-pet-avatar .rainbow-badge .material-icons {
    font-size: 10px;
    color: #fff;
}

.rb-pet-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rb-pet-status {
    font-size: 0.75rem;
    color: #27ae60;
}

.rb-pet-status.rainbow {
    color: #9b59b6;
}

.rb-pet-tab.is-alive {
    opacity: 0.85;
}

/* Rainbow Confirm */
.rb-rainbow-confirm {
    background: var(--paws-card, #fff);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 16px;
    text-align: center;
    border: 2px solid rgba(155, 89, 182, 0.3);
}

.rb-rainbow-confirm .confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.15), rgba(233, 69, 96, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rb-rainbow-confirm .confirm-icon .material-icons {
    font-size: 32px;
    color: #9b59b6;
}

.rb-rainbow-confirm .confirm-content h3 {
    font-size: 1.1rem;
    margin: 0 0 8px;
}

.rb-rainbow-confirm .confirm-content p {
    color: var(--text-muted, #999);
    font-size: 0.9rem;
    margin: 0 0 20px;
    line-height: 1.6;
}

.rb-rainbow-confirm .confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.rb-rainbow-confirm .confirm-actions .rb-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toggle Group */
.rainbow-toggle-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.rainbow-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.rainbow-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rainbow-toggle input:checked+.toggle-slider {
    background: linear-gradient(135deg, #9b59b6, #e94560);
}

.rainbow-toggle input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.95rem;
    color: var(--text-color, #333);
}

.toggle-hint {
    font-size: 0.8rem;
    color: var(--text-muted, #999);
    margin: -12px 0 16px;
    text-align: center;
}

/* Date Group */
.rainbow-date-group {
    max-width: 280px;
    margin: 0 auto 20px;
    text-align: left;
}

.rainbow-date-group .form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-muted, #999);
    margin-bottom: 8px;
}

.rainbow-date-group .form-label .material-icons {
    font-size: 18px;
    color: #9b59b6;
}

.rb-date-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid rgba(155, 89, 182, 0.3);
    border-radius: 12px;
    background: var(--paws-bg, #f5f5f5);
    color: var(--text-color, #333);
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.rb-date-input:focus {
    outline: none;
    border-color: #9b59b6;
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.15);
}

/* Upgrade CTA */
.rb-upgrade-cta {
    background: linear-gradient(135deg, #fff9e6, #fff5d6);
    border: 1px solid #f1c40f;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.rb-upgrade-cta .cta-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rb-upgrade-cta .cta-icon .material-icons {
    color: #fff;
    font-size: 28px;
}

.rb-upgrade-cta .cta-content {
    flex: 1;
}

.rb-upgrade-cta .cta-content h3 {
    font-size: 1rem;
    margin: 0 0 8px;
    color: #b8860b;
}

.rb-upgrade-cta .cta-features {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
    color: #666;
}

.rb-upgrade-cta .cta-features li {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.rb-upgrade-cta .cta-features .material-icons {
    font-size: 16px;
    color: #27ae60;
}

.rb-upgrade-cta .cta-features strong {
    color: #e67e22;
}

.rb-btn-accent {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #fff;
    white-space: nowrap;
}

.rb-btn-sm {
    padding: 10px 16px;
    font-size: 0.9rem;
}

/* Auto Recommend Banner */
.rb-auto-recommend {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.1), rgba(233, 69, 96, 0.05));
    border-radius: 12px;
    margin-bottom: 16px;
}

.rb-auto-recommend .material-icons {
    font-size: 28px;
    color: var(--rb-purple);
}

.rb-auto-recommend .recommend-text strong {
    display: block;
    margin-bottom: 2px;
}

.rb-auto-recommend .recommend-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted, #999);
}

/* Select Hint */
.rb-select-hint {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #999);
}

.rb-select-hint .material-icons {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.rb-select-hint p {
    margin: 0;
}

/* Empty Card */
.rb-empty-card {
    text-align: center;
    padding: 60px 20px;
    background: var(--paws-card, #fff);
    border-radius: 16px;
}

.rb-empty-card .empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--paws-bg, #f5f5f5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rb-empty-card .empty-icon .material-icons {
    font-size: 40px;
    color: var(--text-muted, #999);
}

.rb-empty-card h3 {
    margin: 0 0 8px;
}

.rb-empty-card p {
    color: var(--text-muted, #999);
    margin-bottom: 20px;
}

/* Form Actions */
.rb-form-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: var(--paws-card, #fff);
    border-radius: 16px;
    /* position: sticky; */
    bottom: calc(var(--bottom-nav-height, 60px) + 16px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.rb-form-actions .rb-btn {
    flex: 1;
    justify-content: center;
}

/* Modal */
.rb-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rb-modal-content {
    background: var(--paws-card, #fff);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.rb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--paws-border, #e0e0e0);
}

.rb-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.rb-modal-header .modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted, #999);
}

.rb-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.rb-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--paws-border, #e0e0e0);
}

.rb-modal-footer .rb-btn {
    flex: 1;
    justify-content: center;
}

/* Photo Upload Section */
.photo-upload-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--paws-card, #fff);
    border-radius: 12px;
    border: 2px dashed var(--paws-border, #e0e0e0);
    margin-bottom: 16px;
}

.photo-upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--rb-purple);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.photo-upload-btn:hover {
    background: #8e44ad;
}

.photo-upload-btn .material-icons {
    font-size: 1.2rem;
}

.upload-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--paws-border, #e0e0e0);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--rb-accent);
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.photo-selector-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

@media (max-width: 500px) {
    .photo-upload-section {
        flex-direction: column;
        text-align: center;
    }

    .upload-progress {
        width: 100%;
    }

    .rb-upgrade-cta {
        flex-direction: column;
        text-align: center;
    }
}

/* Timeline Photos */
.timeline-photos {
    margin-top: 12px;
}

.timeline-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.timeline-photo-item {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.timeline-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-photo-item .remove-photo-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.timeline-photo-item .remove-photo-btn .material-icons {
    font-size: 14px;
}

.timeline-add-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px dashed var(--paws-border, #e0e0e0);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-add-photo-btn:hover {
    border-color: var(--rb-purple);
    color: var(--rb-purple);
}

.timeline-add-photo-btn .material-icons {
    font-size: 18px;
}

/* ===== Photo Upload Section ===== */
.photo-upload-section {
    display: flex;
    justify-content: center;
    padding: 16px;
    margin-bottom: 16px;
}

.photo-upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--rb-purple), var(--rb-accent));
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

.photo-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(155, 89, 182, 0.4);
}

.photo-upload-btn .material-icons {
    font-size: 20px;
}

.photo-selector-divider {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
    position: relative;
}

.photo-selector-divider::before,
.photo-selector-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border-color);
}

.photo-selector-divider::before {
    left: 0;
}

.photo-selector-divider::after {
    right: 0;
}

/* Upload Spinner */
.timeline-photo-item.uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.upload-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-spinner .material-icons {
    font-size: 24px;
    color: var(--rb-purple);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning {
    animation: spin 1s linear infinite;
}
