/* ---------------------------------------------------------
   SEA DRAGON GUIDE — CORAL REEF CANDY SEA
   Active when forum-coral-reef is used
--------------------------------------------------------- */

/* Pearl orb launcher */
#sea-orb {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle,
        #ffffff,
        #ffe8a6,
        #ff8ad9);
    box-shadow:
        0 0 12px rgba(255, 255, 255, 0.9),
        0 0 24px rgba(122, 240, 255, 0.9),
        0 0 36px rgba(255, 138, 217, 0.8);
    cursor: pointer;
    z-index: 9999;
    animation: seaOrbPulse 3s infinite ease-in-out;
    transition: 0.35s ease;
}

@keyframes seaOrbPulse {
    0%   { transform: scale(1);   box-shadow: 0 0 14px #c3f4ff; }
    50%  { transform: scale(1.25); box-shadow: 0 0 26px #ffb6ff; }
    100% { transform: scale(1);   box-shadow: 0 0 14px #c3f4ff; }
}

#sea-orb:hover {
    transform: scale(1.35);
    box-shadow:
        0 0 20px #ffffff,
        0 0 34px #7df0ff,
        0 0 46px #ff8ad9;
}

/* Hover zone + small shell */
#sea-shell-hover-zone {
    position: fixed;
    top: 0;
    right: 0;
    width: 60px;
    height: 100vh;
    z-index: 900;
    pointer-events: auto;
}

#sea-shell-wrapper {
    position: fixed;
    right: 20px;
    bottom: 32px;
    z-index: 950;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

#sea-shell-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#sea-shell-small {
    width: 96px;
    height: auto;
    filter: drop-shadow(0 0 14px rgba(195, 244, 255, 0.9));
    cursor: pointer;
    transition: transform 0.25s ease, filter 0.25s ease;
}

#sea-shell-small:hover {
    transform: translateY(-4px) scale(1.04);
    filter: drop-shadow(0 0 22px rgba(255, 255, 255, 1));
}

/* Awakening overlay */
#sea-awakening-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#sea-awakening-overlay.active {
    display: flex;
    pointer-events: auto;
}

#sea-awakening-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center,
            rgba(4, 16, 24, 0.96),
            rgba(1, 4, 8, 0.98));
    backdrop-filter: blur(6px);
}

/* Stage */
#sea-awakening-stage {
    position: relative;
    width: min(900px, 90vw);
    height: min(520px, 80vh);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Large shell + glow */
#sea-shell-large-wrapper {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 280px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: seaShellEntrance 0.9s ease-out forwards;
}

#sea-shell-large {
    width: 240px;
    height: auto;
    position: relative;
    z-index: 2;
}

.sea-shell-glow {
    position: absolute;
    bottom: 0;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.95),
        rgba(122, 240, 255, 0.7),
        transparent 65%);
    filter: blur(8px);
    opacity: 0;
    animation: seaShellGlow 1.8s ease-in-out infinite;
    z-index: 1;
}

/* Bubble column (replaces smoke) */
.sea-bubble-column {
    position: absolute;
    bottom: 80px;
    width: 170px;
    height: 260px;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 138, 217, 0.9), transparent 60%),
        radial-gradient(circle at 80% 30%, rgba(125, 240, 255, 0.9), transparent 60%),
        radial-gradient(circle at 40% 70%, rgba(106, 252, 194, 0.9), transparent 60%),
        radial-gradient(circle at 70% 80%, rgba(169, 139, 255, 0.9), transparent 60%);
    filter: blur(12px);
    opacity: 0;
    animation: seaBubbleRise 1.9s ease-out forwards;
    z-index: 0;
}

/* Sparkles + coral layers */
.sea-sparkles-layer,
.sea-coral-layer {
    position: absolute;
    bottom: 120px;
    width: 220px;
    height: 260px;
    pointer-events: none;
    z-index: 3;
}

.sea-sparkles-layer::before,
.sea-sparkles-layer::after {
    content: "✦ ✧ ✦ ✧";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    animation: seaSparkleFloat 2.4s ease-in-out infinite;
}

.sea-coral-layer::before {
    content: "🪸 🐚 🌊 🐠";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    animation: seaCoralRise 2.6s ease-in-out infinite;
}

/* Sea Dragon character */
#sea-dragon-character {
    position: absolute;
    bottom: 190px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: seaDragonRise 1.5s ease-out forwards;
    animation-delay: 0.6s;
}

#sea-dragon-placeholder {
    font-size: 80px;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.95),
        0 0 32px rgba(122, 240, 255, 0.9),
        0 0 40px rgba(255, 138, 217, 0.9);
    margin-bottom: 14px;
}

/* Dialogue bubble */
#sea-dragon-dialogue-box {
    max-width: 540px;
    padding: 16px 20px;
    border-radius: 22px;
    background: radial-gradient(circle at top left,
        rgba(3, 18, 28, 0.96),
        rgba(3, 10, 18, 0.98));
    border: 1px solid rgba(195, 244, 255, 0.9);
    box-shadow:
        0 0 20px rgba(122, 240, 255, 0.8),
        0 0 30px rgba(255, 138, 217, 0.7);
}

#sea-dragon-dialogue-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #fdfbff;
}

/* Bubble wish clouds */
#sea-wish-bubbles {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 720px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    pointer-events: none;
}

#sea-wish-bubbles.active {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.4s ease;
}

.sea-wish-bubble {
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    outline: none;
    transform-origin: center;
    animation: seaBubbleBob 2.4s ease-in-out infinite;
}

.sea-wish-bubble:nth-child(1) { transform: translate(-40px, 40px); }
.sea-wish-bubble:nth-child(2) { transform: translateY(-10px); }
.sea-wish-bubble:nth-child(3) { transform: translate(40px, 40px); }

.sea-wish-bubble::before {
    content: "";
    display: block;
    width: 190px;
    height: 110px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 20% 40%, #ff8ad9 0, #ff8ad9 45%, transparent 46%),
        radial-gradient(circle at 45% 30%, #ffe8a6 0, #ffe8a6 45%, transparent 46%),
        radial-gradient(circle at 70% 40%, #7df0ff 0, #7df0ff 45%, transparent 46%),
        radial-gradient(circle at 30% 70%, #6afcc2 0, #6afcc2 45%, transparent 46%),
        radial-gradient(circle at 55% 75%, #a98bff 0, #a98bff 45%, transparent 46%);
    box-shadow:
        0 0 14px rgba(255, 255, 255, 0.9),
        0 0 22px rgba(122, 240, 255, 0.9);
    border: 3px solid rgba(195, 244, 255, 0.95);
}

.sea-wish-bubble span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-size: 15px;
    color: #041018;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.sea-wish-bubble:hover::before {
    box-shadow:
        0 0 18px rgba(255, 255, 255, 1),
        0 0 28px rgba(122, 240, 255, 1);
    transform: scale(1.04);
}

.sea-wish-bubble.clicked::before {
    animation: seaBubbleBurst 0.5s ease-out forwards;
}

/* Keyframes */
@keyframes seaShellEntrance {
    0% { transform: translate(-50%, 40px) scale(0.7); opacity: 0; }
    100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

@keyframes seaShellGlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

@keyframes seaBubbleRise {
    0% { opacity: 0; transform: translateY(40px) scale(0.8); }
    40% { opacity: 1; }
    100% { opacity: 0.9; transform: translateY(-20px) scale(1.05); }
}

@keyframes seaSparkleFloat {
    0% { opacity: 0; transform: translate(-50%, 20px) scale(0.9); }
    50% { opacity: 1; transform: translate(-50%, -10px) scale(1.05); }
    100% { opacity: 0; transform: translate(-50%, -40px) scale(0.9); }
}

@keyframes seaCoralRise {
    0% { opacity: 0; transform: translate(-50%, 40px); }
    40% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -40px); }
}

@keyframes seaDragonRise {
    0% { opacity: 0; transform: translate(-50%, 40px); }
    100% { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes seaBubbleBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes seaBubbleBurst {
    0% { opacity: 1; transform: scale(1); filter: blur(0); }
    100% { opacity: 0; transform: scale(1.3); filter: blur(6px); }
}
