* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --warm-gold: #D4AF37;
    --rich-amber: #C17817;
    --deep-brown: #4A3428;
    --soft-cream: #F5EFE6;
    --warm-terracotta: #E07856;
    --deep-plum: #5E3A5F;
    --sage-green: #9CAF88;
    --soft-peach: #FFDAB9;
    --color-highlight: #E2C071;
    --color-primary: #8B5A8E;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, var(--soft-cream) 0%, var(--soft-peach) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--deep-brown);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

h1 {
    font-family: 'Georgia', 'Garamond', serif;
    font-size: 3.5rem;
    color: var(--deep-plum);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.tagline {
    font-family: 'Georgia', 'Garamond', serif;
    font-size: 1.3rem;
    color: var(--rich-amber);
    font-style: italic;
}

/* ====================================================
   ACCESS STATUS & CIRCLE BUTTON
   ==================================================== */

.access-status {
    font-size: 0.8rem;
    color: var(--color-highlight);
    margin-top: 4px;
    margin-bottom: 12px;
    font-style: italic;
}

.circle-upgrade-btn {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 16px;
    box-shadow: 0 0 12px rgba(157, 108, 255, 0.4);
    transition: all 0.3s ease;
    font-family: 'Georgia', serif;
}

.circle-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(157, 108, 255, 0.6);
}

/* ====================================================
   AUTHENTICATION SECTION
   ==================================================== */

.auth-section {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--color-primary);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    color: var(--deep-brown);
    box-shadow: 0 0 16px rgba(157, 108, 255, 0.18);
}

.auth-heading {
    color: var(--color-primary);
    font-family: "Garamond", Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.auth-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.auth-input {
    background: white;
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--deep-brown);
    font-size: 0.95rem;
    width: 100%;
    font-family: 'Georgia', serif;
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--warm-gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.auth-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.auth-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(157, 108, 255, 0.4);
    font-size: 0.9rem;
    font-family: 'Georgia', serif;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(157, 108, 255, 0.6);
}

.auth-status {
    color: var(--color-highlight);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 8px;
    min-height: 1.2em;
    text-align: center;
}

.auth-status.error {
    color: var(--warm-terracotta);
}

/* ====================================================
   WELCOME SECTION (LOGGED IN)
   ==================================================== */

.welcome-section {
    background: linear-gradient(135deg, rgba(139, 90, 142, 0.15), rgba(212, 175, 55, 0.15));
    border: 3px solid var(--color-primary);
    border-radius: 20px;
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(139, 90, 142, 0.25);
    text-align: center;
}

.welcome-message h2 {
    color: var(--color-primary);
    font-family: 'Georgia', 'Garamond', serif;
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.welcome-email {
    color: var(--rich-amber);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Georgia', serif;
}

.welcome-text {
    color: var(--deep-brown);
    font-size: 1.15rem;
    font-style: italic;
    margin-bottom: 25px;
    line-height: 1.7;
}

.logout-btn {
    background: var(--deep-plum);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Georgia', serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(94, 58, 95, 0.3);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(94, 58, 95, 0.5);
    background: var(--color-primary);
}

/* ====================================================
   GENERAL LAYOUT
   ==================================================== */

.language-selector {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--warm-gold);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.language-selector label {
    color: var(--deep-brown);
    font-weight: 600;
}

.language-selector select {
    background: white;
    color: var(--deep-brown);
    border: 2px solid var(--warm-gold);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    flex: 1;
    font-family: 'Georgia', serif;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

h2 {
    font-family: 'Georgia', 'Garamond', serif;
    font-size: 2rem;
    color: var(--deep-plum);
    margin-bottom: 20px;
}

h3 {
    font-family: 'Georgia', 'Garamond', serif;
    font-size: 1.3rem;
    color: var(--warm-terracotta);
    margin-bottom: 10px;
}

.section-description {
    color: var(--deep-brown);
    margin-bottom: 20px;
    font-size: 1.05rem;
    opacity: 0.8;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--deep-brown);
    font-weight: 600;
}

select,
input[type="text"],
textarea {
    width: 100%;
    background: white;
    color: var(--deep-brown);
    border: 2px solid var(--warm-gold);
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Georgia', serif;
    transition: all 0.3s ease;
}

select:focus,
input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--deep-plum);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

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

.btn-primary,
.btn-secondary {
    background: linear-gradient(135deg, var(--warm-gold), var(--rich-amber));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    font-family: 'Georgia', serif;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--warm-gold);
    color: var(--deep-brown);
    padding: 12px 25px;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--warm-gold), var(--rich-amber));
    color: white;
}

/* ====================================================
   AFFIRMATION
   ==================================================== */

.affirmation-display {
    background: linear-gradient(135deg, var(--deep-plum), var(--warm-terracotta));
    border-radius: 12px;
    padding: 30px;
    margin-top: 25px;
    box-shadow: 0 10px 30px rgba(94, 58, 95, 0.3);
    animation: fadeIn 0.5s ease;
}

.affirmation-display.hidden,
.journal-prompt.hidden,
.meditation-display.hidden {
    display: none;
}

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

#affirmation-text {
    font-family: 'Georgia', 'Garamond', serif;
    font-size: 1.4rem;
    line-height: 1.8;
    color: white;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.journal-prompt {
    margin-top: 25px;
    padding: 20px;
    background: var(--soft-cream);
    border-radius: 12px;
    border: 2px solid var(--warm-gold);
}

/* ====================================================
   MEDITATION
   ==================================================== */

.tier-hint {
    color: var(--deep-brown);
    font-size: 0.75rem;
    margin-bottom: 8px;
    font-style: italic;
    opacity: 0.7;
}

.meditation-display {
    background: linear-gradient(135deg, rgba(94, 58, 95, 0.1), rgba(224, 120, 86, 0.1));
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    border: 2px solid var(--deep-plum);
    animation: fadeIn 0.5s ease;
}

.meditation-display h3 {
    color: var(--deep-plum);
    margin-bottom: 15px;
}

.meditation-display p {
    color: var(--deep-brown);
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
}

/* ====================================================
   ENERGY CHECK
   ==================================================== */

.energy-section {
    position: relative;
}

#energyResults {
    margin-top: 25px;
}

.energy-card {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--deep-plum);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.energy-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(94, 58, 95, 0.2);
}

.energy-card-title {
    font-family: 'Georgia', 'Garamond', serif;
    font-size: 1.5rem;
    color: var(--deep-plum);
    margin-bottom: 15px;
    font-weight: 600;
}

.energy-guidance {
    color: var(--deep-brown);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    font-style: italic;
}

.energy-action-section,
.energy-affirmation-section,
.energy-blessing-section {
    margin-top: 15px;
    padding: 12px;
    background: var(--soft-cream);
    border-radius: 8px;
}

.energy-blessing-section {
    background: linear-gradient(135deg, rgba(157, 108, 255, 0.1), rgba(226, 192, 113, 0.1));
    border: 1px solid var(--color-primary);
}

.energy-action-label,
.energy-affirmation-label,
.energy-blessing-label {
    display: block;
    color: var(--rich-amber);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.energy-blessing-label {
    color: var(--color-primary);
}

.energy-action,
.energy-affirmation,
.energy-blessing {
    color: var(--deep-brown);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.energy-affirmation {
    font-style: italic;
    font-weight: 500;
}

.energy-blessing {
    font-style: italic;
    font-weight: 500;
    color: var(--deep-plum);
}

/* Locked Blessing Styles for Non-Circle Members */
.locked-blessing {
    position: relative;
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(157, 108, 255, 0.1), rgba(226, 192, 113, 0.1));
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    min-height: 80px;
    overflow: hidden;
}

.locked-blessing-text {
    font-style: italic;
    font-weight: 500;
    color: var(--deep-plum);
    font-size: 1rem;
    line-height: 1.6;
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
    opacity: 0.6;
}

.locked-blessing-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.locked-blessing-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-primary);
    font-style: italic;
    font-weight: 500;
}

.unlock-blessing-btn {
    background: linear-gradient(135deg, var(--color-primary), #7C4DFF);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(157, 108, 255, 0.3);
    font-family: 'Georgia', serif;
}

.unlock-blessing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(157, 108, 255, 0.5);
}

.energy-choose-btn {
    background: linear-gradient(135deg, var(--deep-plum), var(--warm-terracotta));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(94, 58, 95, 0.3);
    font-family: 'Georgia', serif;
}

.energy-choose-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(94, 58, 95, 0.4);
}

.energy-selected {
    border-color: var(--color-highlight);
    box-shadow: 0 0 16px rgba(226, 192, 113, 0.4);
    border: 1px solid var(--color-highlight);
}

.energy-confirmation {
    display: none;
    text-align: center;
    color: var(--deep-plum);
    font-style: italic;
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* ====================================================
   JOURNAL
   ==================================================== */

#journal-entries {
    max-height: 400px;
    overflow-y: auto;
}

.journal-entry {
    background: var(--soft-cream);
    border-left: 4px solid var(--warm-gold);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.journal-entry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--rich-amber);
}

.journal-entry-mood {
    color: var(--deep-plum);
    font-weight: 600;
    text-transform: capitalize;
}

.journal-entry-text {
    color: var(--deep-brown);
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    color: var(--deep-brown);
    opacity: 0.6;
    padding: 30px;
    font-style: italic;
}

.loading {
    text-align: center;
    color: var(--deep-brown);
    opacity: 0.6;
    font-style: italic;
}

/* ====================================================
   CULTURAL CALENDAR
   ==================================================== */

.calendar-item {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(255, 218, 185, 0.2));
    border-left: 4px solid var(--warm-terracotta);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.calendar-item-name {
    font-weight: 600;
    color: var(--deep-plum);
    margin-bottom: 5px;
}

.calendar-item-date {
    font-size: 0.9rem;
    color: var(--rich-amber);
    margin-bottom: 8px;
}

.calendar-item-message {
    color: var(--deep-brown);
    line-height: 1.6;
    font-style: italic;
}

/* ====================================================
   LEAD CAPTURE & SHARING
   ==================================================== */

.signup-section {
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 16px rgba(157, 108, 255, 0.18);
}

.signup-copy {
    color: var(--deep-brown);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 16px;
    font-style: italic;
    opacity: 0.8;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.signup-label {
    font-size: 0.8rem;
    color: var(--deep-brown);
    margin-bottom: 2px;
    font-weight: 600;
}

.signup-input {
    background: white;
    color: var(--deep-brown);
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 1rem;
    width: 100%;
    font-family: 'Georgia', serif;
}

.signup-input:focus {
    outline: none;
    border-color: var(--deep-plum);
    box-shadow: 0 0 12px rgba(157, 108, 255, 0.3);
}

.signup-optin-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--deep-brown);
    font-size: 0.9rem;
    margin-top: 4px;
}

.signup-optin-label {
    color: var(--deep-brown);
    font-size: 0.85rem;
    font-weight: normal;
}

.signup-btn {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 0 12px rgba(157, 108, 255, 0.4);
    font-size: 0.95rem;
    font-family: 'Georgia', serif;
    transition: all 0.3s ease;
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(157, 108, 255, 0.6);
}

.signup-status {
    font-size: 0.8rem;
    margin-top: 8px;
    font-style: italic;
    min-height: 1em;
    color: var(--color-highlight);
}

.signup-status.error {
    color: #F5A623;
}

.signup-privacy {
    color: var(--deep-brown);
    font-size: 0.7rem;
    font-style: italic;
    margin-top: 8px;
    line-height: 1.3;
    opacity: 0.7;
}

.share-card {
    background: linear-gradient(135deg, rgba(224, 120, 86, 0.1), rgba(212, 175, 55, 0.1));
    border: 2px solid var(--warm-terracotta);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 0 16px rgba(196, 122, 90, 0.2);
    margin-top: 16px;
}

.share-text {
    color: var(--deep-brown);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.share-btn {
    background: var(--warm-terracotta);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 8px;
    box-shadow: 0 0 12px rgba(224, 120, 86, 0.4);
    font-family: 'Georgia', serif;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(224, 120, 86, 0.6);
}

.share-hint {
    color: var(--deep-brown);
    font-size: 0.75rem;
    font-style: italic;
    min-height: 1em;
    opacity: 0.7;
}

/* ====================================================
   FOOTER
   ==================================================== */

footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 2px solid var(--warm-gold);
}

footer p {
    font-family: 'Georgia', 'Garamond', serif;
    color: var(--deep-plum);
    font-size: 1.1rem;
    font-style: italic;
}

/* ====================================================
   RESPONSIVE
   ==================================================== */

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .card {
        padding: 20px;
    }

    h2 {
        font-size: 1.6rem;
    }

    #affirmation-text {
        font-size: 1.2rem;
    }
}
