/* Footer button container */
.button-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 60px auto 0 auto;
    padding: 20px;
    flex-shrink: 0;
}

.button-footer-left {
    display: flex;
    gap: 10px;
}

.button-footer-right {
    display: flex;
    gap: 10px;
}

/* Diskret knapp för att öka journeyProgress */
#progress-btn {
    background: rgba(255,255,255,0.7);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s;
}
#progress-btn:hover {
    opacity: 1;
}
#progress-btn .bi-plus {
    font-size: 1.3rem;
    color: #333;
}

/* Diskret knapp för att återställa journeyProgress */
#reset-btn {
    background: rgba(255,255,255,0.7);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s;
}
#reset-btn:hover {
    opacity: 1;
}
#reset-btn .bi-arrow-counterclockwise {
    font-size: 1.1rem;
    color: #333;
}

/* Diskret knapp för admin-sidan */
#admin-btn {
    background: rgba(255,255,255,0.7);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s;
    text-decoration: none;
}
#admin-btn:hover {
    opacity: 1;
}
#admin-btn .bi-gear {
    font-size: 1.2rem;
    color: #333;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #4A90E2;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 107, 107, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(78, 205, 196, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 230, 109, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 20%, rgba(168, 230, 207, 0.3) 0%, transparent 50%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #333;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    flex: 1;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    animation: slideInDown 0.8s ease-out;
    border: none;
}

.title {
    font-size: 5rem;
    color: #fff;
    margin: 30px 0 60px 0;
    font-weight: bold;
    transform: rotate(-4deg);
    text-shadow: 0 6px 32px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Stone Step Layout */
.stone-step {
    display: flex;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInPath 1.2s ease-out forwards;
    opacity: 0;
    transform: translateY(50px);
    position: relative;
    z-index: 2;
}

.stone-step.left {
    flex-direction: row;
    justify-content: flex-start;
}

.stone-step.right {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

/* Stepping Stone Styles */
.stepping-stone {
    width: 140px;
    height: 140px;
    border-radius: 50% 45% 55% 48% / 52% 58% 42% 48%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 5px 15px rgba(255, 255, 255, 0.4),
        inset 0 -5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: stoneFloat 6s ease-in-out infinite, subtleBreathe 4s ease-in-out infinite;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid #bfc9ca;
}

.stone-icon {
    font-size: 3.2rem;
    color: #2C3E50;
    z-index: 3;
}

/* Explanation Card Styles */
.explanation-card {
    flex: 1;
    background: #fff;
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.6s ease;
    animation: cardBreathe 6s ease-in-out infinite;
}


.explanation-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #2C3E50;
    font-weight: 700;
}

.explanation-card p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 1rem;
}

.explore-btn,
.gold-btn,
.silver-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    width: fit-content;
    /* For general use */
    background: #e0e0e0;
    color: #2C3E50;
    border: none;
    box-shadow: 0 6px 0 0 #818181;
}

.explore-btn i {
    font-size: 1.2rem;
}

/* Step States */

.stepping-stone {
    border: 0;
    z-index: 10;
    position: relative;
    overflow: hidden;
}


.stepping-stones>.stone-step:not(:first-child) .stepping-stone {
    background: radial-gradient(circle at 60% 40%, #e0e0e0 60%, #bfc9ca 100%);
    animation: stoneFloat 6s ease-in-out infinite, subtleBreathe 4s ease-in-out infinite, completedGlow 3s ease-in-out infinite;
    box-shadow: 0 6px 0 #818181, 0 10px 15px rgba(0, 0, 0, 0.4);
}

.stepping-stones>.stone-step:not(:first-child) .stone-icon {
    color: #bfc9ca;
}

.stepping-stones>.stone-step:not(:first-child) .explanation-card::before {
    opacity: 1;
    background: linear-gradient(90deg, #e0e0e0 0%, #bfc9ca 100%);
}

.stepping-stones>.stone-step:not(:first-child) .explore-btn,
.silver-btn {
    background: #e0e0e0;
    color: #2C3E50;
    border: none;
    box-shadow: 0 6px 0 0 #818181;
}

.stepping-stones>.stone-step:first-child .stepping-stone {
    background: radial-gradient(#ffc61a 60%, #e29f03 100%);
    animation: stoneFloat 6s ease-in-out infinite, subtleBreathe 4s ease-in-out infinite, currentBounce 2s ease-in-out infinite;
    box-shadow: 0 6px 0 #b8860b, 0 10px 15px rgba(0, 0, 0, 0.4);
}

.stepping-stones .stepping-stone::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg,
            transparent 0%,
            transparent 20%,
            rgba(255, 255, 255, 0.2) 22%,
            rgba(255, 255, 255, 0.2) 28%,
            rgba(255, 255, 255, 0.5) 30%,
            rgba(255, 255, 255, 0.5) 35%,
            rgba(255, 255, 255, 0.2) 37%,
            rgba(255, 255, 255, 0.2) 43%,
            transparent 45%,
            transparent 100%);
    animation: coinShimmer 5s linear infinite;
}

/* Randomized shimmer start for stepping stones */
.stepping-stones .stone-step:nth-child(1) .stepping-stone::before {
    animation-delay: 0s;
}

.stepping-stones .stone-step:nth-child(2) .stepping-stone::before {
    animation-delay: 0.7s;
}

.stepping-stones .stone-step:nth-child(3) .stepping-stone::before {
    animation-delay: 1.4s;
}

.stepping-stones .stone-step:nth-child(4) .stepping-stone::before {
    animation-delay: 2.1s;
}

.stepping-stones .stone-step:nth-child(5) .stepping-stone::before {
    animation-delay: 2.8s;
}

.stepping-stones .stone-step:nth-child(6) .stepping-stone::before {
    animation-delay: 3.5s;
}

.stepping-stones .stone-step:nth-child(7) .stepping-stone::before {
    animation-delay: 4.2s;
}

.stepping-stones .stone-step:nth-child(8) .stepping-stone::before {
    animation-delay: 4.9s;
}

.stepping-stones .stone-step:nth-child(9) .stepping-stone::before {
    animation-delay: 5.6s;
}

.stepping-stones>.stone-step:first-child .stone-icon {
    color: #b8860b;
}

.stepping-stones>.stone-step:first-child .explore-btn,
.gold-btn {
    background: #ffc61a;
    color: #2C3E50;
    border: none;
    box-shadow: 0 6px 0 0 #b8860b;
    transition: all 0.3s ease;
}

/* Step Connector Styles */
.step-connector {
    margin: 40px auto;
    position: relative;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    margin-left: auto;
    margin-right: auto;
}

/* Footstep Styles */
.footstep {
    width: 40px;
    height: 60px;
    position: relative;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.footstep img {
    width: 100%;
    height: 100%;
    filter: sepia(1) hue-rotate(200deg) saturate(0.8) brightness(0.8);
}

/* Left foot - rotated and offset to the left */
.left-foot {
    transform: translateX(-15px) rotate(-15deg);
}

/* Right foot - rotated and offset to the right */
.right-foot {
    transform: translateX(15px) rotate(15deg);
}

/* Hover effect for footsteps */
.footstep:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.left-foot:hover {
    transform: translateX(-15px) rotate(-15deg) scale(1.1);
}

.right-foot:hover {
    transform: translateX(15px) rotate(15deg) scale(1.1);
}

.stepping-stones {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Staggered animation delays for connectors */
.step-connector:nth-child(3) {
    animation-delay: 0.5s;
}

.step-connector:nth-child(5) {
    animation-delay: 1s;
}

.step-connector:nth-child(7) {
    animation-delay: 1.5s;
}

.step-connector:nth-child(9) {
    animation-delay: 2s;
}

.step-connector:nth-child(11) {
    animation-delay: 2.5s;
}

.step-connector:nth-child(13) {
    animation-delay: 3s;
}

.step-connector:nth-child(15) {
    animation-delay: 3.5s;
}

.step-connector:nth-child(17) {
    animation-delay: 4s;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInPath {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes coinShimmer {
    0% {
        transform: translateX(-150%) translateY(150%);
    }

    100% {
        transform: translateX(50%) translateY(-50%);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .button-footer {
        margin: 40px auto 0 auto;
        padding: 15px;
    }

    .stone-step {
        flex-direction: column;
        align-items: center;
        gap: 25px;
        max-width: 100%;
        animation-duration: 1.5s;
    }

    .stone-step.left,
    .stone-step.right {
        flex-direction: column;
    }

    .stepping-stone {
        width: 120px;
        height: 120px;
        animation: stoneFloat 8s ease-in-out infinite, subtleBreathe 5s ease-in-out infinite;
    }

    .explanation-card h3 {
        font-size: 1.4rem;
    }

    .stepping-stones {
        gap: 60px;
    }

    .step-connector {
        margin: 30px auto;
        animation: connectorPulse 6s ease-in-out infinite;
    }
}

@media (max-width: 480px) {
    .button-footer {
        margin: 30px auto 0 auto;
        padding: 10px;
    }

    #progress-btn,
    #reset-btn,
    #admin-btn {
        width: 44px;
        height: 44px;
    }

    .stepping-stone {
        width: 100px;
        height: 100px;
        animation: stoneFloat 10s ease-in-out infinite, subtleBreathe 6s ease-in-out infinite;
    }

    .stone-icon {
        font-size: 1.8rem;
    }

    .explanation-card {
        padding: 20px;
        animation: cardBreathe 10s ease-in-out infinite, cardFloat 8s ease-in-out infinite;
    }

    .explanation-card h3 {
        font-size: 1.2rem;
    }

    .explanation-card p {
        font-size: 0.9rem;
    }

    .explore-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .stepping-stones {
        gap: 40px;
    }

    .step-connector {
        animation: connectorPulse 8s ease-in-out infinite;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Helper class for hover transform */
.hover-scale {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.02);
}


input[type="text"]:focus {
    outline: 2px solid #b8860b;
}

select:focus {
    outline: 2px solid #b8860b;
}


.container-narrow {
    max-width: 650px;
    margin: 0 auto 2rem auto;
    padding: 20px 20px 80px 20px;
    position: relative;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #faf7e6;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    padding: 0.7rem 1.2rem;
    margin-bottom: 1.2rem;
    font-size: 1.08rem;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.navbar-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.navbar-user {
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.logout-link {
    color: #b8860b;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s;
}

.logout-link:hover {
    color: #a0760a;
    text-decoration: underline;
}