* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body {
   /* --- CREATIVE AURA BACKGROUND --- */
.creative-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2; /* Pushes the glowing blobs behind the motion beads */
    overflow: hidden;
    background-color: #fdfbf7;
}

/* The base style for all blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px); /* This makes them look like glowing clouds */
    opacity: 0.5; /* Keeps them subtle so text remains readable */
    will-change: transform, opacity;
    animation: floatBlob 20s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

/* Positioning and coloring each specific blob */
.blob-1 {
    width: 50vw;
    height: 50vw;
    background: #FF9AA2; /* Pastel Pink */
    top: -10%;
    left: -10%;
    will-change: transform, opacity;
    animation-delay: 0s;
}

.blob-2 {
    width: 60vw;
    height: 60vw;
    background: #C7CEEA; /* Pastel Purple/Blue */
    bottom: -20%;
    right: -10%;
    animation-delay: -5s; /* Starts at a different time so they don't sync up perfectly */
}

.blob-3 {
    width: 45vw;
    height: 45vw;
    background: #E2F0CB; /* Pastel Green */
    top: 30%;
    left: 20%;
    will-change: transform, opacity;
    animation-delay: -10s;
}

/* The slow, breathing movement animation */
@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(8vw, 8vh) scale(1.15);
    }
}
}

/* Background Canvas */
#bead-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Floats just behind your white glass panels */
    pointer-events: none; /* Stops beads from blocking clicks */
}

/* --- SIZE SELECTION PAGE STYLES --- */
.size-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 25px;
    padding: 40px;
    max-width: 900px;
    width: 95%;
    display: flex;
    gap: 50px;
    align-items: center;
    box-shadow: 0 20px 35px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.size-preview-area {
    flex: 1;
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#preview-circle-container {
    width: 300px;
    height: 300px;
    position: absolute;
    border: 2px dashed rgba(0,0,0,0.1);
    border-radius: 50%;
}

.mock-bead {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffc0cb, #ff69b4); /* Default pinkish color */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.preview-center-text {
    text-align: center;
    z-index: 5;
}
.preview-center-text h2 { font-size: 2.5rem; color: #333; margin: 0; }
.preview-center-text p { color: #888; font-size: 0.9rem; margin: 0; }

.size-options-area {
    flex: 1;
}
.size-options-area h2 { margin-bottom: 5px; color: #333; }
.size-options-area .subtitle { color: #666; margin-bottom: 20px; font-size: 0.95rem; }

.size-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.size-card {
    background: rgba(255,255,255,0.6);
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    text-align: center;
}
.size-card:hover { transform: translateY(-3px); background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.size-card.active { border-color: #333; background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.size-card h4 { margin: 0; font-size: 1.2rem; color: #333; }
.size-card span { font-size: 0.8rem; color: #777; }

/* --- HEADER STYLES --- */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.logo { font-size: 1.8rem; font-weight: 700; color: #333; letter-spacing: 1px; text-transform: uppercase; }
nav ul { display: flex; list-style: none; gap: 2rem; }
nav a { text-decoration: none; color: #555; font-weight: 500; font-size: 1rem; transition: color 0.3s ease; }
nav a:hover { color: #000; }
.header-icons { display: flex; gap: 1.5rem; }
.header-icons a { color: #333; font-size: 1.2rem; transition: transform 0.2s ease; }
.header-icons a:hover { transform: scale(1.1); }

/* --- CONTENT STYLING (General) --- */
.content { 
    position: relative; 
    z-index: 1; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    padding-top: 80px; 
    will-change: transform, opacity; 
    animation: slideUpFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
h1 { font-size: 4rem; color: #333; text-shadow: 2px 2px 0px white; }

/* --- FOOTER STYLES --- */
.glass-footer {
    background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    padding: 3rem 2rem 1rem;
    color: #333;
    position: relative;
    z-index: 10;
}
.footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; gap: 2rem; }
.footer-section h3 { font-size: 1.5rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-section h4 { font-size: 1.1rem; margin-bottom: 1rem; color: #555; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.5rem; }
.footer-section a { text-decoration: none; color: #333; transition: color 0.3s; }
.footer-section a:hover { color: #FF9AA2; }
.social-icons { margin-top: 1rem; display: flex; gap: 1rem; }
.social-icons i { font-size: 1.5rem; transition: transform 0.2s; }
.social-icons i:hover { transform: scale(1.2); color: #000; }
.footer-bottom { text-align: center; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.1); font-size: 0.9rem; color: #666; }

/* --- CTA BUTTON --- */
.cta-button {
    display: inline-block; margin-top: 2rem; padding: 15px 30px; background-color: #333; 
    color: white; text-decoration: none; font-size: 1.1rem; font-weight: 600; 
    border-radius: 50px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: all 0.3s ease;
}
.cta-button:hover { background-color: #FF9AA2; color: #fff; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(255, 154, 162, 0.4); }
.cta-button i { margin-left: 8px; }

/* --- APP LAYOUT (FIXED FOR LAPTOP: ALLOW SCROLL) --- */
.app-layout { 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; /* Changed from height to min-height so it can scroll on desktop */
    padding-top: 80px; 
}

/* NEW: Remove top padding on the DIY page because the header is gone! */
body.diy-page .app-layout {
    padding-top: 15px; 
}

/* =========================================
   MODIFIED: Added Animation to Workspace
   ========================================= */
#workspace { 
    flex: 1; 
    min-height: 450px;
    position: relative; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    z-index: 1;
    width: 95%; 
    max-width: 1100px; 
    margin: 5px auto 20px auto; 
    background: rgba(255, 255, 255, 0.6); 
    backdrop-filter: blur(12px); 
    border-radius: 25px; 
    border: 1px solid rgba(255, 255, 255, 0.6); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); 
    will-change: transform, opacity;
    animation: slideUpFade 0.8s ease-out forwards;
}

/* --- BRACELET DISCLAIMER TEXT --- */
.bracelet-disclaimer {
    position: absolute;
    bottom: 10px; 
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8rem; 
    color: #888; 
    font-style: italic;
    pointer-events: none; 
}

#string-guide { 
    width: 300px; 
    height: 300px; 
    border: 2px dashed rgba(0,0,0,0.1); 
    border-radius: 50%; 
    position: absolute; 
    pointer-events: none; 
    flex-shrink: 0; /* <--- Prevents the circle from squishing into an oval */
}

/* --- BRACELET CONTAINER --- */
#bracelet-container { 
    width: 300px; 
    height: 300px; 
    position: relative; 
    border-radius: 50%; 
    cursor: grab; 
    transform-origin: center center; 
    touch-action: none; 
    flex-shrink: 0; /* <--- Prevents the circle from squishing into an oval */
}

#bracelet-container:active {
    cursor: grabbing;
}

.bead-on-string {
    width: 38px; height: 38px; border-radius: 50%; position: absolute; transform: translate(-50%, -50%); 
    transition: left 0.6s cubic-bezier(0.23, 1, 0.32, 1), top 0.6s cubic-bezier(0.23, 1, 0.32, 1), width 0.4s ease, height 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; z-index: 20;
    
    /* --- ADD THESE 4 LINES TO FIX MOBILE DRAGGING --- */
    touch-action: none; 
    -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    user-select: none;
    /* ------------------------------------------------ */

    /* NEW: High-Class Multi-Layered Shadow */
    box-shadow: 
        inset -3px -3px 8px rgba(0,0,0,0.15),      /* Inner 3D volume */
        inset 3px 3px 8px rgba(255,255,255,0.4),   /* Inner glass gloss */
        0 5px 15px rgba(0,0,0,0.15),               /* Tight contact shadow */
        0 10px 25px rgba(0,0,0,0.1);               /* Soft floating shadow */
}   

.bead-on-string:hover { 
    transform: translate(-50%, -50%) scale(1.2) !important; 
    z-index: 30; 
    
    /* The Magic Premium 3D Effect for Image Beads */
    box-shadow: 
        inset 4px 4px 10px rgba(255, 255, 255, 0.5),  /* Glassy top-left reflection */
        inset -5px -5px 15px rgba(0, 0, 0, 0.45),     /* Deep 3D bottom-right curve */
        0 6px 12px rgba(0, 0, 0, 0.2),                /* Grounding contact shadow */
        0 15px 35px rgba(0, 0, 0, 0.15) !important;   /* Luxurious soft ambient glow */
}

#center-info { position: absolute; text-align: center; pointer-events: none; z-index: 5; }
#center-info h2 { margin: 0; color: #333; font-size: 2.2rem; }
#center-info p { margin: 0; color: #888; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }

/* =========================================
   MODIFIED: Added Delayed Animation to Palette
   ========================================= */
#palette-area {
    width: 95%; max-width: 1100px; height: 350px; margin: 0 auto 50px auto;
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); display: flex; flex-direction: row; overflow: hidden; z-index: 30;
    opacity: 0; 
    will-change: transform, opacity;
    animation: slideUpFade 0.8s ease-out 0.3s forwards;
}

#category-sidebar {
    width: 150px; background: rgba(255, 255, 255, 0.4); border-right: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px; display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto;
}

#palette-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

#color-filters { list-style: none; padding: 0; }
#color-filters li { 
    padding: 10px 15px; margin-bottom: 8px; border-radius: 12px; cursor: pointer; 
    font-size: 0.95rem; color: #555; font-weight: 500; transition: all 0.2s ease; display: flex; align-items: center; gap: 10px; 
}
#color-filters li:hover { background: rgba(255, 255, 255, 0.8); transform: translateX(5px); }
#color-filters li.active { background: #333; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }

#controls { padding: 15px 30px; background: rgba(255,255,255,0.5); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0,0,0,0.05); }

#bead-list { flex: 1; overflow-y: auto; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 15px; }
#bead-list::-webkit-scrollbar { width: 10px; }
#bead-list::-webkit-scrollbar-track { background: transparent; }
#bead-list::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.1); border-radius: 20px; }

.bead-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; text-align: center; transition: transform 0.2s; background: rgba(255,255,255,0.5); padding: 10px; border-radius: 15px; }
.bead-item:hover { transform: translateY(-5px); background: white; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.bead-preview { width: 40px; height: 40px; border-radius: 500%; margin-bottom: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.bead-name { font-size: 13px; color: #555; margin-bottom: 2px; }
.bead-price { font-size: 12px; font-weight: bold; color: #333; }

.btn { padding: 10px 20px; border-radius: 30px; border: none; cursor: pointer; font-size: 14px; font-weight: 700; transition: transform 0.1s; }
.btn:active { transform: scale(0.95); }
.btn-clear { background-color: #ffebee; color: #c62828; }
.btn-finish { background-color: #333; color: #fff; }
.btn-undo { background-color: #e3f2fd; color: #1565c0; }

/* --- BEAD COLORS (Gradients) --- */
.style-white { background: radial-gradient(circle at 30% 30%, #ffffff, #dcdcdc); }
.style-pink { background: radial-gradient(circle at 30% 30%, #ffc0cb, #ff69b4); }
.style-blue { background: radial-gradient(circle at 30% 30%, #e0ffff, #87ceeb); }
.style-purple { background: radial-gradient(circle at 30% 30%, #e6e6fa, #9370db); }
.style-gold { background: radial-gradient(circle at 30% 30%, #fffacd, #DAA520); }
.style-black { background: radial-gradient(circle at 30% 30%, #555, #000); }
.style-green { background: radial-gradient(circle at 30% 30%, #d0f0c0, #98fb98); }

/* --- NEW ADDED COLORS --- */
.style-red { background: radial-gradient(circle at 30% 30%, #ff9999, #cc0000); }
.style-orange { background: radial-gradient(circle at 30% 30%, #ffcc99, #ff6600); }
.style-yellow { background: radial-gradient(circle at 30% 30%, #ffffcc, #e6b800); }
.style-darkblue { background: radial-gradient(circle at 30% 30%, #9999ff, #000080); }

.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,0.1); }

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}

.close-btn:hover { color: #333; }

#preview-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    border: 2px solid #eee;
}

.preview-item span {
    font-size: 0.95rem;
    font-weight: bold;
    color: #555;
}

/* --- SLIDE UP FADE ANIMATION --- */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(60px); 
    }
    100% {
        opacity: 1;
        transform: translateY(0); 
    }
}

/* =========================================
   BEAD PREVIEW MODAL STYLES 
   ========================================= */
.bead-item {
    -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    user-select: none; 
}

#bead-preview-modal {
    position: fixed;
    top: 0; left: 0; width: vw; height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#bead-preview-modal.show {
    opacity: 1;
    pointer-events: auto;
}

#bead-preview-modal img {
    max-width: 85%;
    max-height: 50vh;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#bead-preview-modal.show img {
    transform: scale(1);
}

#bead-preview-modal h3 {
    color: white;
    margin-top: 25px;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Left Button: Instructions */
.instruction-btn {
    position: absolute; 
    top: 10px;          
    left: 10px;         
    background-color: #e60012; 
    border: none;
    padding: 8px 16px;
    border-radius: 20px; 
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px; 
    font-size: 8px;
    font-weight: 100;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    z-index: 10; 
}

.instruction-btn i {
    color: white; 
}

.instruction-btn:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
}

/* Right Panel: Size Information */
.size-panel {
    position: absolute;
    top: 8px;
    right: 10px;
    background-color: rgba(245, 245, 245, 0.9);
    border: 1px solid #eaeaea;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 10px;
    color: #555;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    z-index: 10;
}

/* NEW: Position the Reset button in the bottom-left of the workspace */
.workspace-reset-btn {
    position: absolute;
    bottom: 10px; 
    left: 10px;
    z-index: 10;
    width: 20px; 
    height: 20px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.15); 
}

.workspace-reset-btn i {
    font-size: 1.2rem;
    margin: 0;
}

.workspace-save-btn {
    position: absolute;
    bottom: 5px; 
    left: 35px;
    z-index: 10;
    width: 30px; 
    height: 30px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.15); 
    color: #1565c0; 
   
}


/* =========================================
   NEW: ADD TO CART & SEARCH BAR STYLES
   ========================================= */
.workspace-cart-btn {
    position: absolute;
    bottom: 10px; 
    right: 10px; /* Docks to the bottom right */
    z-index: 10;
    width: 40px; 
    height: 40px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%; 
    background-color: #333; /* Dark background to stand out */
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); 
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.workspace-cart-btn:hover {
    transform: scale(1.1) translateY(-2px);
    background-color: #000;
}

.workspace-cart-btn i {
    font-size: 1.1rem;
    margin: 0;
}

/* Search Bar Styling */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    color: #888;
    font-size: 0.9rem;
}

.bead-search-input {
    padding: 8px 12px 8px 32px; /* Extra left padding for the magnifying glass */
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    outline: none;
    width: 140px;
    transition: all 0.3s ease;
}

.bead-search-input:focus {
    width: 170px; /* Expands slightly when you click on it! */
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* =========================================
   AUTO-DETECT MOBILE RESPONSIVENESS BLOCK 
   (ONLY affects mobile devices!)
   ========================================= */
@media (max-width: 768px) {

    /* LOCK screen height ONLY on the DIY Builder page */
    body.diy-page {
        overflow: hidden; 
    }
    
    body.diy-page .app-layout {
        height: 100vh; 
        min-height: 100vh;
        overflow: hidden; 
        padding-top: 15px; /* <--- NEW: Removed the 70px padding since the header is gone! */
    }

    /* Normal layout settings for all other mobile pages so they CAN scroll */
    .app-layout {
        display: flex;
        flex-direction: column;
        padding-top: 70px; 
    }

    /* AUTO-SCALE workspace onto upper phone screen */
    #workspace {
        flex: 1; 
        min-height: 0; 
        margin: 10px 5px 10px 5px; /* Maximized margin for phone */
        width: auto;
    }

    /* =========================================
       NEW: AUTO-SCALE BRACELET FOR SMALL SCREENS
       ========================================= */
    /* Default scale-down for standard mobile screens */
    #bracelet-container, #string-guide, #center-info {
        scale: 0.85; 
        transform-origin: center center;
    }

    /* Extra scale-down for very small screens like iPhone SE */
    @media (max-width: 390px), (max-height: 720px) {
        #bracelet-container, #string-guide, #center-info {
            scale: 0.72; /* Shrinks the beads visually so they clear the buttons */
        }
    }
    /* ========================================= */

    /* AUTO-SCALE palette area onto bottom of phone screen */
    #palette-area { 
        flex: 0.8; 
        flex-direction: row; 
        height: auto; 
        max-height: none; 
        margin: 0; 
        width: 100%;
        border-radius: 25px 25px 0 0; 
        border-bottom: none;
    }
    #category-sidebar { width: 30%; height: 100%; border-right: 1px solid rgba(0,0,0,0.1); border-bottom: none; padding: 15px 10px; }
    #color-filters { display: flex; flex-direction: column; flex-wrap: nowrap; overflow-x: hidden; gap: 6px; padding-bottom: 5px; }
    #color-filters li { white-space: normal; margin-bottom: 0; flex-shrink: 0; font-size: 0.8rem; padding: 8px; border-radius: 8px;}
    
    /* FIXED: Force exactly 3 equal columns for beads on mobile */
    #bead-list { 
        grid-template-columns: repeat(3, 1fr); 
        padding: 8px; 
        gap: 8px; 
    }
    
    /* Adjusted bead sizes slightly to make sure 3 columns fit beautifully */
    .bead-item { 
        padding: 6px; 
    }
    .bead-preview { 
        width: 38px; 
        height: 38px; 
    }
    .bead-name { 
        font-size: 10px; 
    }
    
    #controls { padding: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
    #controls .btn { padding: 8px 12px; font-size: 12px; }
    #controls span { font-size: 12px; }

  /* Fix the Trash Can Icon for mobile */
    .workspace-reset-btn {
        width: 30px;  
        height: 10px; 
        bottom: 15px; 
        left: 1px;    
        background: transparent; 
        box-shadow: none; 
        color: #e60012;
    }
    .workspace-reset-btn i {
        font-size: 1.2rem; 
    }

    /* Resize top buttons for mobile */
    .instruction-btn, .size-panel {
        font-size: 0.6rem;
        padding: 6px 12px;
    }
    
    .bracelet-disclaimer {
        font-size: 0.5rem; /* <-- Made this smaller! (Change to 0.4rem if you need it even tinier) */       
        bottom: 20px;             
        padding: 5px 5px;           
        line-height: 1.2;          
           
    }
    
    
    

    /* Mobile sizing for the Cart Button */
    .workspace-cart-btn {
        width: 40px; /* FIXED: Was incorrectly set to 25px */
        height: 40px; /* FIXED: Was incorrectly set to 25px */
        bottom: 10px;
        right: 10px; 
    }
    .workspace-cart-btn i {
        font-size: 1.1rem;
    }

    /* Mobile sizing for the Search Bar */
    .bead-search-input {
        width: 110px; /* Smaller so it fits next to the bead count */
        padding: 6px 10px 6px 25px;
        font-size: 0.75rem;
    }
    .bead-search-input:focus {
        width: 130px; 
    }
    .search-icon {
        font-size: 0.8rem;
        left: 8px;
    }
}
/* =========================================
   SAVED DESIGNS PAGE STYLES
   ========================================= */

/* The top navigation bar */
/* The top navigation bar */
.top-nav {
    display: flex;
    justify-content: center; /* This perfectly centers the title */
    align-items: center;
    padding: 20px 0;
    width: 100%;
    margin-bottom: 10px;
    position: relative; /* This allows the back arrow to float on the left */
}

.top-nav i { 
    position: absolute; 
    left: 0; /* Pins the arrow exactly to the left edge */
    font-size: 1.2rem; 
    color: #333; 
    cursor: pointer; 
}

.top-nav .nav-title { 
    font-weight: bold; 
    font-size: 1.2rem; 
}
.top-nav-icons {
    display: flex;
    gap: 15px;
    background: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    align-items: center;
    border: 1px solid #eee;
}

.subtitle-text {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 25px;
    width: 100%;
}

/* The specific layout for the cards */
.design-card {
    background: #fcfcfc;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    position: relative;
}

/* 1. ADD NEW DESIGN CARD */
.add-new-card {
    justify-content: center;
    min-height: 240px;
    color: #aaa;
    transition: background 0.2s;
}
.add-new-card:hover { background: #f5f5f5; }
.add-new-card i {
    font-size: 2.5rem;
    color: #ccc;
    margin-bottom: 15px;
    font-weight: 300;
}
.add-new-card span { font-size: 0.9rem; }

/* 2. SAVED BRACELET CARD */
.design-card-preview {
    width: 100%;
    height: 170px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #f5f5f5;
}
.mock-bracelet {
    width: 90px;
    height: 90px;
    border: 1px solid #eaeaea;
    border-radius: 50%;
    position: relative;
}
/* A little visual bead to make it look like a bracelet */
.mock-bead-small {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 30% 30%, #dcdcdc, #888);
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    left: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #e60012;
    background: white; /* Ensures the background hides elements underneath */
    border: 1px solid #e60012;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 10px;
    z-index: 10;
}
.design-card-info {
    padding: 15px;
    text-align: center;
    width: 100%;
}
.design-card-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #333;
    font-weight: normal;
}
.design-card-info p {
    font-size: 0.75rem;
    color: #aaa;
}

.end-text {
    text-align: center;
    color: #bbb;
    font-size: 0.8rem;
    margin-top: 30px;
    width: 100%;
}
/* --- NEW: SEMI-TRANSPARENT GLASS CONTAINER --- */
.designs-glass-container {
    background: rgba(255, 255, 255, 0.65); /* A slightly transparent white */
    backdrop-filter: blur(12px); /* Creates the beautiful frosted glass effect behind it */
    border-radius: 25px; /* Rounded corners to match your aesthetic */
    padding: 30px 40px; /* Space inside the box so text isn't touching the edge */
    width: 100%;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); /* Soft drop shadow */
    border: 1px solid rgba(255, 255, 255, 0.6); /* Subtle white border to make it pop */
}

/* Make it look perfect on mobile phones too */
@media (max-width: 768px) {
    .designs-glass-container {
        padding: 20px 15px; 
    }
}/* --- ENLARGED ROTATION HITBOX --- */
#bracelet-container::before {
    content: '';
    position: absolute;
    /* This expands the clickable area 50 pixels outward in all directions! */
    top: -50px;
    bottom: -50px;
    left: -50px;
    right: -50px;
    border-radius: 50%;
    
    /* Puts the invisible circle behind the beads so you can still drag/remove beads */
    z-index: -1; 
    
    /* Changes the mouse cursor to a hand so users know they can grab it here too */
    cursor: grab; 
}

/* Optional: changes cursor to a closed hand while dragging */
#bracelet-container:active::before {
    cursor: grabbing;
}
/* --- WELCOME MODAL OVERLAY --- */
.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px); /* Nice blur effect */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Stays on top of absolutely everything */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* This class will be added by JS to trigger the fade-in */
.welcome-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.welcome-modal {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(30px); /* Starts slightly lower */
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.welcome-modal-overlay.show .welcome-modal {
    transform: translateY(0); /* Bounces up into place */
}

.welcome-modal h2 { margin-bottom: 10px; color: #333; font-family: sans-serif; }
.welcome-modal p { margin-bottom: 25px; color: #666; font-size: 0.95rem; line-height: 1.4; }

#welcome-profile-form { display: flex; flex-direction: column; gap: 15px; }

#welcome-profile-form input {
    padding: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#welcome-profile-form input:focus {
    border-color: #a1c4fd;
}

.save-profile-btn {
    margin-top: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
    color: #005b8f;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.05rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.save-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(161, 196, 253, 0.5);
}
/* Policy Text Styles for the Modal */
.policy-text {
    max-height: 40vh; /* Keeps the modal from getting too tall */
    overflow-y: auto; /* Adds a scrollbar if the text is long */
    text-align: left;
    margin-bottom: 20px;
    padding-right: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #444;
}

.policy-text h3 {
    font-size: 1rem;
    margin-top: 15px;
    margin-bottom: 8px;
    color: #222;
}

.policy-text ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.policy-text li {
    margin-bottom: 6px;
}
/* --- SEARCH BAR STYLES --- */
.search-bar-container {
    position: relative;
    margin: 0 auto 25px auto;
    width: 100%;
    max-width: 500px;
}

.search-bar-container .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1rem;
}

#bracelet-search {
    width: 100%;
    padding: 12px 15px 12px 40px; /* Space on left for the icon */
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 25px;
    background: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}

#bracelet-search:focus {
    background: #fff;
    border-color: #FF9AA2;
    box-shadow: 0 4px 15px rgba(255, 154, 162, 0.2);
}

/* --- EDIT NAME STYLES --- */
.name-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 5px;
}

.edit-name-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 0.8rem;
    transition: color 0.2s, transform 0.2s;
}

.edit-name-btn:hover {
    color: #FF9AA2;
    transform: scale(1.1);
}

.name-edit-input {
    border: 1px solid #FF9AA2;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 1rem;
    text-align: center;
    width: 100%;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}