/* Form container */
.writing-woods-secret-spot-form {
    max-width: 550px;
    margin: 1.5em auto;
    padding: 1.5em;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Riddle styling */
.ww-riddle {
    font-size: 2em;
    line-height: 1.5;
    margin: 1em auto;
    font-weight: 600;
    color: #0a5f2b;
    max-width: 750px;
    text-align: center;
}

/* Input fields */
.writing-woods-secret-spot-form input[type="text"] {
    width: 100%;
    padding: 0.65em 0.75em;
    margin-top: 0.25em;
    margin-bottom: 0.25em;
    border: 1px solid #0a5f2b;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.writing-woods-secret-spot-form input[type="text"]:focus {
    border-color: #00a33c;
    box-shadow: 0 0 6px rgba(0, 163, 60, 0.4);
    outline: none;
}

/* Submit button */
.writing-woods-secret-spot-form button.button-primary {
    background-color: #00822d;
    color: #fff;
    border: none;
    padding: 0.7em 1.5em;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-transform: uppercase;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    letter-spacing: 0.1rem;
}

.writing-woods-secret-spot-form button.button-primary:hover {
    background-color: #0e5929;
    transform: translateY(-1px);
}

/* Subtle failure message */
.ww-error {
    padding: 0.75em 1em;
    border-radius: 6px;
    margin: 0.5em auto 1em;
    font-weight: 500;
    font-size: 0.95em;
    text-align: center;
    max-width: 500px;
    line-height: 1.4;
    border: 1px solid transparent;
}

/* Error */
.ww-error {
    background-color: #f5f1f0;   /* very light gray/pink */
    color: #5c3c3a;              /* dark gray/brown text */
    border-color: #e1d6d5;       /* subtle border */
}

/* Optional fade-in effect for subtle attention */
.ww-success, .ww-error {
    opacity: 0;
    animation: fadeIn 0.35s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Responsive tweaks */
@media (max-width: 500px) {
    .writing-woods-secret-spot-form {
        padding: 1em;
    }

    .ww-riddle {
        font-size: 1.1em;
    }
}

/* Hint Tooltip */
.ww-hint-wrapper {
    position: relative;
    display: block; /* full width container */
    margin: 15px 0 25px 0;
    text-align: right; /* aligns button to the right */
}

.ww-hint-toggle {
    background-color: gray;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.ww-hint-toggle:hover {
    background-color: #0e5929;
}

.ww-hint-tooltip {
    visibility: hidden;
    opacity: 0;
    width: max-content;
    max-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: left;
    padding: 8px 10px;
    border-radius: 4px;
    position: absolute;
    z-index: 10;
    top: 120%; /* below the button */
    right: 0;   /* align tooltip with right edge of button */
    transform: translateX(0);
    transition: opacity 0.3s ease;
    font-size: 0.9rem;
    pointer-events: none;
}

.ww-hint-tooltip::after {
    content: '';
    position: absolute;
    top: -5px;
    right: 10px; /* arrow aligned with button */
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
}

/* Intro splash overlay */
.ww-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FAFBFD; /* or any background color/image */
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 2rem;
    text-align: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease;
    letter-spacing: 0.1rem;
}

.ww-splash {
    transform: scale(1);
    transition: transform 1s ease, opacity 1s ease;
}

.ww-splash.hidden {
    opacity: 0;
    transform: scale(0.5);
}

/* Floating Back to Trailhead button */
.secret-spot-back-btn {
    position: fixed;
    top: 60px;
    left: 30px;
    padding: 5px 10px;
    background-color: #fff;
    color: #000;
    border: 1px solid #545454;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 0.1rem;
    transition: all 0.3s ease;
    z-index: 999; /* make sure it floats above everything */
    font-size: 0.8rem;
}

.secret-spot-back-btn:hover {
    background-color: #545454;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.ww-word-count {
    display: block;
    margin-top: 0.25em;
    font-size: 0.75em;
    color: #555; /* subtle gray */
}

/* Success Overlay */
.ww-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;

    /* Darker forest gradient using #001f0b as base */
    background: linear-gradient(135deg, #001f0b, #001914, #00221a);
    background-size: 400% 400%;
    animation: var(--wriwoods-animation-riddle-fade-scale) 0.8s ease forwards, gradientShift 25s ease infinite;

    /* Light text for contrast */
    color: #f0f8ff; /* soft, dreamy light text */
    text-align: center;
}

.ww-success-overlay h2 {
    color: #e6f4e6; /* soft, dreamy light text */
    text-shadow: 0 0 8px rgba(230, 244, 230, 0.5);
}

@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.7); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Success button - big centered */
.ww-success-btn {
    text-align: center;
    margin: 2em 0; /* more spacing above and below */
}

.ww-success-btn .button {
    background-color: #00822d;
    color: #fff;
    padding: 1em 2em;           /* bigger padding for a larger click area */
    border-radius: 8px;         /* slightly more rounded for modern feel */
    text-decoration: none;
    display: inline-block;
    font-weight: 700;           /* slightly bolder text */
    font-size: 1.2em;           /* larger text for emphasis */
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1); /* subtle depth */
    cursor: pointer;

    /* Pulsing effect */
    animation: var(--wriwoods-animation-pulse-btn) 2s infinite ease-in-out;
}

.ww-success-btn .button:hover {
    background-color: #0e5929;
    transform: translateY(-2px); /* slightly more lift for effect */
    box-shadow: 0 5px 12px rgba(0,0,0,0.15); /* stronger hover shadow */
    animation: none; /* pause pulse on hover */
}

/* Pulse keyframes */
@keyframes pulse-btn {
    0% {
        transform: scale(1);
        box-shadow: 0 3px 6px rgba(0,0,0,0.1), 0 0 0 rgba(0, 130, 45, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15), 0 0 15px rgba(0, 130, 45, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 3px 6px rgba(0,0,0,0.1), 0 0 0 rgba(0, 130, 45, 0);
    }
}

/* No secret spot */
.wriwoods-inactive-msg {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: #f3f6f4;
    border: 1px solid #dbe5df;
    color: #4a644c;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    max-width: 480px;
    margin: 2rem auto;
}

/* Fireflies */
.ww-fireflies {
    position: fixed;
    inset: 0;
    z-index: 10000; /* ensure it's above your overlay content */
    pointer-events: none;
}