body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    /* Option 1: Subtle Grid Pattern */
    background-color: #f5f7fa;




    min-height: 100vh;
    margin: 0;
}

h1 {
    font-size: 2.5rem;
    color: #2d3748;
    /* margin-bottom: 40px; */
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin: 0px;
}

/* Initial colors - these will be overridden by JS */
/* It's good practice to keep these as fallbacks */


/* Style the controls area */
.controls {
    background: white;
    border-radius: 15px;
    padding: 20px; /* Adjusted padding for internal spacing */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    /* backdrop-filter: blur(10px); */ /* Consider performance implications */
    border: 1px solid rgba(255,255,255,0.5);
    /* Removed width/max-width/margin that were for centered block layout */
    margin: 0; /* Reset margin as it's now a flex child */
    display: flex;
    flex-direction: column; /* Stack control groups vertically */
    gap: 12px; /* Vertical gap between control groups like swatch-control, shuffle-container */
    flex-basis: 320px; /* Defines the initial width of the sidebar */
    flex-shrink: 0; /* Prevents the sidebar from shrinking if main content is wide */
    /* align-self: flex-start; Already set on parent .page-layout-container */
}
.text-container {
    background: white;
    border-radius: 15px;
    padding: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    /* backdrop-filter: blur(10px); */
    border: 1px solid rgba(255,255,255,0.5);
    width: 100%; /* Take full width of its parent (.main-content-column) */
    box-sizing: border-box; /* Ensures padding and border are included in width */
    margin: 0; /* Reset margin as it's now a flex child within main-content-column */
    display: flex;
    gap: 12px;
    flex-wrap: wrap;

    align-items: center;
}

.swatch-control {
    position: relative; /* Establishes a positioning context for the popup */
    width: 100%; /* Take full width of its parent (.controls sidebar) */
    box-sizing: border-box;
}

.swatch-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: none;
}

.swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin: 0;
    cursor: pointer;
}

.swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.swatch.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px #4299e1;
}

/* Container for the shuffle button */
.shuffle-container {
    margin: 10px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 7px;
    width: 100%;
}

.smart-button {
    background: #4299e1;
    color: white;
    border: none;
    /* padding: 12px 24px; */
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 4px 6px rgba(66, 153, 225, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.arrow-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.smart-button:hover {
    background: #3182ce;
    transform: translateY(-2px);
}

.smart-button:active {
    transform: translateY(0);
}

.smart-input {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
 
}
.short-input {
    width: 120px !important;
}
.smart-lable {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-right: 10px;
    width: 100%;
}
.svg-container {
    background-image: url('baseball.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* backdrop-filter: blur(10px); */
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%; /* Take full width of its parent (.main-content-column) */
    box-sizing: border-box;
    margin: 0; /* Reset margin */
    display: flex;
    gap: 20px; 
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap; 
  
}

/* Remove individual object border */
.svg-container object {
    /* border: 1px solid #eee; /* Optional: just to see the bounds */
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        gap: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .svg-container {
        padding: 15px;
    }
}

.item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease; /* Add transition for smooth scaling */
    /* filter: drop-shadow(16px 16px); */
    /* filter: drop-shadow(16px 16px); */
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    background: #FFFFFF44;
    border-radius: 10px;
}

/* Add the hover effect */
.item:hover {
    transform: scale(1.05); /* Scale up slightly on hover */
    z-index: 10; /* Ensure the hovered item appears above others if they overlap */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1600px; /* Match .page-layout-container max-width or adjust as preferred */
    box-sizing: border-box; /* Include padding/border in width calculation */
    /* If header was previously centered with margin: auto, ensure it now spans correctly */
    margin-left: auto; /* To keep it centered if page-layout-container is also centered */
    margin-right: auto;
    padding-left: 20px; /* Match body padding if needed for alignment */
    padding-right: 20px; /* Match body padding if needed for alignment */
}

.logo-image {
    width: 20px;
    height: 20px;
}


.svg-object {
    pointer-events: none;
}
.header-center {
    display: flex;
}
.beta-tag {
    font-size: 0.8rem;
    color: #4299e1;
    font-weight: 600;
    margin-left: 10px;
}

/* New styles for page layout */
.page-layout-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1600px; /* Adjust as needed for your target screen, or remove for full bleed */
    gap: 20px; /* Space between sidebar and main content */
    margin-top: 20px; /* Space below header */
    align-items: flex-start; /* Align items to the top */
}

.main-content-column {
    flex-grow: 1; /* Takes up remaining space */
    /* display: revert; */
    flex-direction: column;
    gap: 15px; /* Space between text-containers and svg-container within this column */
    min-width: 0; /* Important for flex items to prevent overflow if content is too wide */
    position: relative;
}

/* --- New Styles for Pop-up Swatch Controls --- */

.color-preview-area {
    display: flex;
    align-items: center;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    transition: background-color 0.2s ease;
}

.color-preview-area:hover {
    background-color: #f8fafc;
}

.color-preview-label {
    color: #2d3748;
    font-size: 0.9rem;
    margin-right: 10px;
}

.color-preview-box {
    width: 25px;
    height: 25px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
}

.color-preview-name {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 3px 6px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    flex-grow: 1;
    text-align: center;
}

.swatch-popup {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Position it right below the control */
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    z-index: 100; /* Ensure it appears above other elements */
    padding: 15px;
    padding-top: 40px; /* Space for close button */
    box-sizing: border-box;
}

.swatch-popup.is-open {
    display: block; /* Show the popup */
}

.close-swatches {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #aaa;
    padding: 0;
}

.close-swatches:hover {
    color: #333;
}

/* --- Page Navigation Styles --- */
.page-container {
    display: none; /* Hide all pages by default */
    animation: fadeOut 0.5s forwards;
    width: 100%;
}

.page-container.active {
    display: block; /* Show the active page */
    animation: fadeIn 0.5s forwards;
}

.navigation-buttons {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    width: 100%;
    margin-top: 15px;
    padding: 0 10px;
    box-sizing: border-box;
    gap: 10px; /* Add space between the buttons */
}

.navigation-buttons .smart-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    visibility: hidden;
    display:none;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}
.create-controls {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 10px;
    justify-content: flex-end;
}






