/* for mobile */
@media (max-width: 600px) {
    
#intro .container {
    padding-left: 0rem;
}
}

/* Badge Unlock Animation */
.badge-unlock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-out;
}

.badge-unlock-content {
    background: var(--theme-gradient);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    transform: scale(0.8);
    animation: popIn 0.5s ease-out forwards;
}

.badge-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease-in-out infinite;
}

/* View Badges Button */
.screen {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    padding: 80px 20px 20px;
}

#view-badges-container {
    text-align: right;
    padding: 0.5rem;
}

.view-badges-button {
    background: none;
    border: 1px solid #333;
    color: #333;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    text-decoration: none;
    border-radius: 4px;
}

.view-badges-button:hover {
    opacity: 1;
}

/* Title word wrapping for long names */
#avatar-confirmation,
#color-confirmation,
#explorer-info {
    word-wrap: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    max-width: 100%;
    overflow: auto; /* Add scrolling if content overflows */
}

/* Badge Collection Grid */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    justify-content: center;
    grid-auto-rows: 1fr;
}

.badge-grid .badge-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: 160px;
}

.badge-item {
    background: var(--theme-gradient);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 120px;
}

.badge-item.locked {
    background: #f0f0f0;
    color: #999;
    opacity: 0.7;
}

.badge-item .badge-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.badge-item .badge-name {
    font-size: 1rem;
    font-weight: 600;
}

.badge-unlock-overlay h3 {
    color: white;
    font-size: 1.5rem;
    margin: 0.5rem 0;
}

.next-clue-button {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.next-clue-button:hover {
    background: white;
    color: var(--theme-color);
    transform: translateY(-2px);
}

.badge-unlock-overlay p {
    color: white;
    font-size: 1.2rem;
    margin: 0;
}

.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

/* :root {
   
} */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Quicksand', sans-serif;
    line-height: 1.6;
    background: var(--theme-gradient);
    background-size: 100% 100%;
    color: #333;
}
/* Badge styles */
.badge-canvas-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

/* Share text container styles */
.share-text-container {
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
}

.copy-text-box {
    background-color: rgba(255, 255, 255, 0.9);
    border: 3px solid var(--theme-color);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    font-size: 16px;
    color: black;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-text-box:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.copy-text-box.copied {
    background-color: rgba(255, 255, 255, 0.95);
    border: 3px solid #4CD964;
}

.copy-hint {
    font-size: 14px;
    color: #333;
    margin-top: 10px;
    text-align: center;
}

.copy-text-box.copied .copy-hint {
    color: #008800;
    font-weight: bold;
}

/* Navigation styles */
.nav-container {
    width: 100%;
    height: 65px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 998;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
}

.site-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.camera-icon {
    font-size: 1.5rem;
    padding-left: 1rem;
}

.site-title {
    font-weight: 600;
    line-height: 1;
    font-size: 1.2rem;
    padding-left: 1rem;
    color: #333;
}

/* crete mobiel styles */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.25rem;
    }
}

/* Menu toggle button - override general button styles */
button.menu-toggle {
    all: unset;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0.5rem;
    position: fixed;
    top: 0.25rem;
    right: 0.25rem;
    z-index: 1000;
}


/* Hamburger icon */
.hamburger {
    position: relative;
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    margin: 0;
    transition: transform 0.3s ease;
   
}

/* Desktop styles */
@media (min-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #333;
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.menu-toggle.active .hamburger {
    transform: rotate(45deg);
}

.menu-toggle.active .hamburger::before {
    transform: rotate(90deg) translate(8px, 0);
}

.menu-toggle.active .hamburger::after {
    transform: rotate(90deg) translate(-8px, 0);
}

.menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 999;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.menu-overlay.active {
    right: 0;
}

.menu-content {
    padding: 4rem 2rem 2rem;
}

.menu-content h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-content li {
    margin-bottom: 1rem;
}

.menu-content a {
    color: #555;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s ease;
    display: block;
    padding: 0.5rem 0;
}

.menu-content a:hover {
    color: #333;
}

/* Featured Instagram Link */
.featured-link {
    margin-bottom: 10px;
}

.featured-link a {
    background: linear-gradient(45deg, #833AB4, #FD1D1D, #FCAF45);
    font-weight: bold;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    color: white;
}

.featured-link a:hover {
    background: linear-gradient(45deg, #FCAF45, #FD1D1D, #833AB4);
    transform: translateX(5px) scale(1.03);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
}
.site-heading a{
    /* inherit all */
    text-decoration: none;
    color: inherit;
    display: flex;
  
    
}
body {
    overflow-x: hidden;
}

.screen {
    min-height: calc(100vh - 85px);
    margin: 75px 10px 10px 10px;
    padding: .25rem;
    box-sizing: border-box;
    display: none;
    justify-content: center;
    align-items: center;
    width: calc(100% - 20px);
    overflow-y: auto;
}

.screen > .container {
    margin: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.confetti-trigger {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s ease;
}

.confetti-trigger:hover {
    transform: scale(1.2) rotate(15deg);
}

@keyframes initialConfetti {
    0% {
        transform: scale(0) rotate(-15deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.2) rotate(15deg);
    }
    80% {
        transform: scale(0.95) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.confetti-trigger.initial-load {
    animation: initialConfetti 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.screen.active {
    display: flex;
}

#explorer-name{
    font-size: 1rem;
    margin-top: 2rem;
  
 
}

.play-steps {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
    font-size: 1.2rem;
    font-weight: 500;
}

.play-steps li {
    /* margin: 1.2rem 1rem; */
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.75rem 0rem;
    /* margin: 0.75rem 0rem; */
    transition: background-color 0.2s ease;
    &:first-child {
        border-top: 3px dashed rgba(0, 0, 0, 0.1);
    }
    border-bottom: 3px dashed  rgba(0, 0, 0, 0.1);
   
}


.step-emoji {
    margin-right: 1rem;
    font-size: 1.8rem;
    display: inline-block;
    width: 2rem;
    text-align: center;
}



.highlight {
    font-weight: bold;
    font-size: 1.2rem;
    margin: 1.5rem 0;
    /* color: #ffffff; */
    padding: 1rem;
    /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); */
}



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

.adventure-note {
    font-style: italic;
    margin: .5rem 0;
    color: #34495e;
}

.avatar-display {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.color-preview {
    background: var(--theme-color-gradient);
}

:root {
    --theme-color-gradient: var(--theme-gradient);
}

.avatar-display span {
    font-size: 4rem;
    line-height: 1;
}

.explorer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.container {
    padding: 1.5rem;
    max-width: 600px;
    width: 100%;
    margin: 1rem;
    text-align: center;
}

.welcome .container {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.screen:not(.welcome) .container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
#welcome span.explorers-title{
    font-size: 3rem;
    line-height: 1.25;
    /* different font, but still fun/playful, not quicksand */
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif
    
}
#welcome span {
    font-size: 2rem;
    line-height: 1.5;

}

.welcome h1 {

    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
    color: white;

    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}
/* .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
} */

/* Static page styles */
.static-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: block;
    padding-top: 75px; /* Increased to account for fixed nav bar */
    padding-bottom: 2rem;
    overflow-y: auto;
}

.static-page .container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem; /* Reduced from 3rem */
    margin: 2rem auto;
    width: calc(100% - 2rem); /* Add space on sides */
    max-width: 600px;
    color: #2c3e50;
    text-align: left;
}

.static-page h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.static-page .container a {
    font-weight: bold;
    color: #3498db;
}
.static-page p {
    color: #34495e;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.static-page .container li {
    color: #34495e;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.static-page .container ul {
    margin-left: 4rem;
    margin-bottom: 2rem;
}

.static-page .back-button {
    display: block;
    padding: 0.8rem 1.5rem;
    background: #3498db;
    color: white !important; /* Force white color */
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    margin: 0 auto;
    width: fit-content;
}
.static-page .back-button:hover {
    background: #3498db;
    color: white;
    transform: translateX(-2px);
}

.static-page .back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

h1, h2, h3 {
    color: #333;
    margin-top: 0;
}

h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

/* Disable word wrapping for Welcome screen titles */
#welcome h1 {
    white-space: normal;
    word-wrap: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

/* Keep word wrapping for other h1 elements */
.screen:not(#welcome) h1 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

button {
    background: var(--theme-color);
    color: white;

    outline: 4px solid rgba(255, 255, 255, 0.5);
 
    padding: 10px 20px;
    border-radius: 25px;
    font-family: 'Quicksand', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    margin: 10px 0;
    max-width: 180px;
    width: auto;
}

.back-button {
    background: transparent;
    color: #666;
    padding: 10px 20px;
    font-size: 1rem;
    border: 1px solid #ddd;
    margin: 10px 10px;
    max-width: 180px;
    width: auto;
}

.back-button:hover {
    background: #f5f5f5;
    transform: translateX(-2px);
}



.instagram-button {
    display: block;
   
    max-width: 400px;
    width: 100%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  
}

.instagram-button:hover {
    transform: translateY(-2px);
   

}

#share-badge .back-button {
    display: block;
    margin: 1rem 0;
    margin-left: 0;
}


.badge-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.badge-options button{
    max-width: 180px;
}



input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    margin: 10px 0;
    box-sizing: border-box;
}

.avatar-grid, .color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.avatar {
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 1rem;
    border-radius: 15px;
    background: #f5f5f5;
}

.avatar:hover {
    transform: scale(1.05);
    background: #eee;
}

.avatar.selected {
    background: #e0e0e0;
    transform: scale(1.05);
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 15px;
    transition: background-color 0.3s;
}

.color-option.selected {
    background-color: rgba(0, 0, 0, 0.1);
}

.color-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-option.selected .color-preview {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-preview:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Color preview styles are dynamically generated from JavaScript */

/* Contact page styles */
.contact-options {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.contact-button span {
    font-size: 1.5rem;
    vertical-align: middle;
}
.contact-button {
   
    display: inline-block;
    padding: 1rem 2rem;
    /* lighter blue than #3498db; */
    background: white;
    
    color: #3498db!important;
    text-decoration: none;
    font-size: 1.3rem;
    /* darker green */
    border: 4px solid #3498db;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.5px;
}



.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white !important;
    background: #3498db;
}

.static-page .contact-options p {
    margin-bottom: 0.5rem;
}


#password{
    /* takeover the entire viewport and have the highest z index */
    background: var(--theme-gradient);
    position: fixed;
    top: -60px;
   
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}
/* Password Form Styles */
.password-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 2.5rem 0;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.password-form input {
    width: 100%;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1.1rem;
    text-align: center;
    font-family: 'Quicksand', sans-serif;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.password-form input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.password-form button {
    width: 100%;
    padding: 1.2rem;
    background: var(--theme-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.password-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.password-form button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.explorer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.1);
    /* border-radius: 12px; */
    padding: .5rem 1.25rem 0rem 1.25rem;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
}

.explorer-badge {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.location-counter {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0.5rem 0;
}

.clue-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
display: flex;
justify-content: space-between;
margin-bottom: 1rem;
}

#completion h2 {
    margin-bottom: 1.5rem;
    font-size: 2.8rem;
    color: #222;
}

#completion > .container > p {
    font-size: 1.4rem;
    line-height: 1.5;
    margin-bottom: 2.5rem;
    color: #333;
}

#completion .photo-upload p {
    font-size: 1.25rem;
    line-height: 1.4;
    color: #444;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

#clue-content {
text-align: center;
max-width: 600px;
margin: 0 auto;
opacity: 1;
transition: opacity 0.2s ease;
    margin: 0 auto;
    opacity: 1;
    transition: opacity 0.2s ease;
}

#clue-content.transitioning {
    opacity: 0;
}

#clue-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: 450px;
    /* object-fit: cover; */
    border-radius: 10px;
    margin: 0 auto 1rem;
    display: block;
}

.hidden {
    display: none !important;
}

.photo-upload {
    margin: 2rem 0;
    text-align: center;
}

.photo-upload label {
    display: block;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #555;
}

.photo-upload input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.photo-upload input[type="file"] + label.file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #333;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.photo-upload input[type="file"] + label.file-label:hover {
    background: #555;
    transform: translateY(-1px);
}



.toggle-button {
    background: #333;
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: .9rem;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.toggle-button:hover {
    transform: translateY(-1px);
    background: #555;
}

button.menu-toggle:hover {
    background: none;
    transform: none;
    box-shadow: none;
    
}

.instagram-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background: #333;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    background-size: 300% 300%;
    background-image: linear-gradient(
        45deg,
        #ff3366,
        #ff6b3d,
        #ff9f4d,
        #ffcb4d,
        #9fff4d,
        #4dcfff,
        #4d4dff,
        #ff3366
    );
    background-position: 100% 100%;
    animation: subtle-shift 5s ease infinite;
}

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

.instagram-button.full-width {
    width: 100%;

   
    
   
}

.instagram-button:hover {
  
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
opacity: .8;
    transform: translateY(-3px) scale(1.02);
 
}

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

.back-container {
    text-align: left;
    margin-top: 1rem;
}

.image-fit-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
}

.image-fit-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.image-fit-options input[type="radio"] {
    cursor: pointer;
}

.instagram-button {
display: inline-flex;
align-items: center;
padding: 0.8rem 1.5rem;
background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
color: white;
text-decoration: none;
border-radius: 8px;
font-weight: bold;

transition: transform 0.2s ease, box-shadow 0.2s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.instagram-button .step-emoji {
font-size: 1.2rem;
margin-right: 0.5rem;
}

button {
    background: var(--theme-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    flex: 1;
}
button:hover {
    transform: translateX(+2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
    background: var(--theme-gradient);
}

button:disabled {
opacity: 0.5;
cursor: not-allowed;
pointer-events: none;
}



#badge-canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }
    
    .avatar-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 300px;
    }
    .color-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #badge-canvas {
        max-width: 100%;
        height: auto;
    }
    
    /* Adjust UL left margin on mobile, but exclude navigation menu */
    ul:not(.menu-content ul) {
        margin-left: 2rem !important;
    }
}

/* Start Over link styling */
.start-over-container {
    margin-top: 15px;
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.start-over-container.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.start-over-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.start-over-link:hover {
    color: white;
    text-decoration: underline;
}

/* Camera title animation */
@keyframes cameraWaggle {
    0% { transform: rotate(0deg); text-shadow: 0 0 0 rgba(255, 255, 255, 0); }
    10% { transform: rotate(-10deg); text-shadow: 0 0 25px #ffffff, 0 0 40px #ffaa33; }
    20% { transform: rotate(10deg); text-shadow: 0 0 30px #ffffff, 0 0 50px #ffaa33; }
    30% { transform: rotate(-10deg); text-shadow: 0 0 35px #ffffff, 0 0 45px #ffaa33; }
    40% { transform: rotate(10deg); text-shadow: 0 0 30px #ffffff, 0 0 40px #ffaa33; }
    50% { transform: rotate(-5deg); text-shadow: 0 0 25px #ffffff, 0 0 35px #ffaa33; }
    60% { transform: rotate(5deg); text-shadow: 0 0 20px #ffffff, 0 0 30px #ffaa33; }
    70% { transform: rotate(-3deg); text-shadow: 0 0 15px #ffffff, 0 0 20px #ffaa33; }
    80% { transform: rotate(3deg); text-shadow: 0 0 10px #ffffff, 0 0 15px #ffaa33; }
    100% { transform: rotate(0deg); text-shadow: 0 0 0 rgba(255, 255, 255, 0); }
}

.title-camera {
    display: inline-block;
    position: relative;
    cursor: pointer;
    font-size: 50px!important;
}

.title-camera.animate {
    animation: cameraWaggle 0.8s ease-in-out;
}
