/* ============================================================
   Money Affirmation Plugin – Luxury Dark Gold Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700;900&family=Cormorant+Garamond:ital,wght@0,300;0,600;1,300&display=swap');

/* ---------- Root Variables ---------- */
.ma-wrapper {
    --ma-bg: #0a0705;
    --ma-card-bg: #0f0c08;
    --ma-gold-bright: #f5c842;
    --ma-gold-mid: #c9972c;
    --ma-gold-deep: #7a5a18;
    --ma-gold-glow: rgba(245, 200, 66, 0.35);
    --ma-text-light: #fdf3d0;
    --ma-text-dim: #9e7e3a;
    --ma-radius: 20px;
    --ma-transition: 0.6s cubic-bezier(0.22, 1, 0.36, 1);

    position: relative;
    width: 100%;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 30%, #1a1005 0%, #050302 70%);
    border-radius: var(--ma-radius);
    overflow: hidden;
    font-family: 'Cormorant Garamond', serif;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* ---------- Starfield Background ---------- */
.ma-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 15% 20%, rgba(245,200,66,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 10%, rgba(245,200,66,0.3) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 40% 80%, rgba(245,200,66,0.35) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 60%, rgba(245,200,66,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 5% 70%, rgba(245,200,66,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 45%, rgba(245,200,66,0.15) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 85% 85%, rgba(245,200,66,0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 55%, rgba(245,200,66,0.2) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ---------- Floating Particles ---------- */
.ma-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.ma-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--ma-gold-bright);
    opacity: 0;
    animation: ma-float linear infinite;
}

@keyframes ma-float {
    0%   { transform: translateY(110%) scale(0.5); opacity: 0; }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-20px) scale(1.2); opacity: 0; }
}

/* ---------- Card ---------- */
.ma-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    background: linear-gradient(145deg, #1a1208 0%, #0f0c08 50%, #1a1208 100%);
    border: 1px solid var(--ma-gold-deep);
    border-radius: var(--ma-radius);
    padding: 48px 40px 40px;
    box-shadow:
        0 0 60px rgba(0,0,0,0.8),
        0 0 30px rgba(122, 90, 24, 0.15),
        inset 0 1px 0 rgba(245,200,66,0.12),
        inset 0 -1px 0 rgba(245,200,66,0.05);
    text-align: center;
    box-sizing: border-box;
}

/* Corner ornaments */
.ma-card::before,
.ma-card::after {
    content: '✦';
    position: absolute;
    font-size: 18px;
    color: var(--ma-gold-deep);
    line-height: 1;
}
.ma-card::before { top: 14px; left: 18px; }
.ma-card::after  { bottom: 14px; right: 18px; }

/* ---------- Crown Icon ---------- */
.ma-crown {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px var(--ma-gold-glow));
    animation: ma-crown-pulse 3s ease-in-out infinite;
    display: block;
}

@keyframes ma-crown-pulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(245,200,66,0.3)); }
    50%       { filter: drop-shadow(0 0 20px rgba(245,200,66,0.6)); }
}

/* ---------- Title ---------- */
.ma-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(16px, 3.5vw, 22px);
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--ma-gold-bright);
    text-shadow: 0 0 20px var(--ma-gold-glow), 0 0 40px rgba(245,200,66,0.15);
    margin: 0 0 6px 0;
    line-height: 1.3;
}

/* ---------- Subtitle ---------- */
.ma-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 15px;
    font-weight: 300;
    color: var(--ma-text-dim);
    letter-spacing: 0.08em;
    margin: 0 0 28px 0;
}

/* ---------- Divider ---------- */
.ma-card > .ma-subtitle::after {
    content: '';
    display: block;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ma-gold-deep), transparent);
    margin: 18px auto 0;
}

/* ---------- Affirmation Display ---------- */
.ma-display {
    position: relative;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(122,90,24,0.4);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 22px;
    overflow: hidden;
}

.ma-display::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(245,200,66,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.ma-quote-icon {
    font-size: 48px;
    line-height: 0.6;
    color: var(--ma-gold-deep);
    font-family: Georgia, serif;
    position: absolute;
    top: 14px;
    left: 18px;
    opacity: 0.5;
}

.ma-quote {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(13px, 2.5vw, 17px);
    font-weight: 700;
    color: var(--ma-text-light);
    letter-spacing: 0.06em;
    line-height: 1.5;
    margin: 0;
    text-shadow: 0 0 30px var(--ma-gold-glow);
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: relative;
    z-index: 1;
}

.ma-quote.ma-fade-out {
    opacity: 0;
    transform: translateY(-8px);
}

.ma-quote.ma-fade-in {
    animation: ma-quote-enter 0.6s var(--ma-transition) forwards;
}

@keyframes ma-quote-enter {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Active glow on display when running */
.ma-wrapper.is-running .ma-display {
    border-color: rgba(245,200,66,0.3);
    box-shadow: 0 0 20px rgba(245,200,66,0.08), inset 0 0 30px rgba(245,200,66,0.03);
}

/* ---------- Progress Dots ---------- */
.ma-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.ma-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ma-gold-deep);
    transition: background 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.ma-dot.active {
    background: var(--ma-gold-bright);
    transform: scale(1.4);
    box-shadow: 0 0 8px var(--ma-gold-glow);
}

.ma-dot.done {
    background: var(--ma-gold-mid);
    opacity: 0.6;
}

/* ---------- Counter ---------- */
.ma-counter {
    font-family: 'Cormorant Garamond', serif;
    font-size: 13px;
    color: var(--ma-text-dim);
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    min-height: 18px;
}

/* ---------- Timer Bar ---------- */
.ma-timer-track {
    width: 100%;
    height: 3px;
    background: rgba(122,90,24,0.25);
    border-radius: 2px;
    margin-bottom: 28px;
    overflow: hidden;
}

.ma-timer-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--ma-gold-deep), var(--ma-gold-bright));
    border-radius: 2px;
    transition: width linear;
    box-shadow: 0 0 8px var(--ma-gold-glow);
}

/* ---------- Button ---------- */
.ma-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    background: linear-gradient(135deg, #7a5a18 0%, #c9972c 40%, #f5c842 60%, #c9972c 80%, #7a5a18 100%);
    background-size: 200% 100%;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #0a0705;
    text-shadow: 0 1px 0 rgba(255,255,255,0.2);
    box-shadow:
        0 4px 24px rgba(122,90,24,0.6),
        0 1px 0 rgba(255,255,255,0.15) inset,
        0 -2px 0 rgba(0,0,0,0.3) inset;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.6s ease;
    overflow: hidden;
    min-width: 180px;
}

.ma-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 32px rgba(245,200,66,0.45),
        0 1px 0 rgba(255,255,255,0.2) inset,
        0 -2px 0 rgba(0,0,0,0.3) inset;
    background-position: 100% 0;
}

.ma-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 12px rgba(122,90,24,0.5);
}

.ma-btn-shine {
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    transform: skewX(-20deg);
    pointer-events: none;
    animation: ma-btn-shine 3s ease-in-out infinite;
}

@keyframes ma-btn-shine {
    0%   { left: -75%; }
    40%  { left: 125%; }
    100% { left: 125%; }
}

/* Stop state */
.ma-btn.is-stop {
    background: linear-gradient(135deg, #4a0010 0%, #8b0020 50%, #4a0010 100%);
    color: #ffcccc;
    box-shadow: 0 4px 20px rgba(139,0,32,0.5);
}

.ma-btn.is-stop:hover {
    box-shadow: 0 8px 28px rgba(200,0,50,0.5);
}

/* Responsive */
@media (max-width: 480px) {
    .ma-card { padding: 36px 22px 32px; }
    .ma-btn  { padding: 14px 32px; font-size: 12px; }
}
