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

body {
    font-family: Arial, sans-serif;
    background-color: #DFDBD5;
    color: #373436;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Placeholder PFP Editor */
.pfp-placeholder {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--secondary-color, #e0e0e0);
    color: var(--secondary-contrast, #B68C23);
    font-size: 1.75rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: background 0.2s, color 0.2s;
    border: 2px dashed var(--secondary-contrast, #B68C23);
    z-index: 2;
}
.pfp-placeholder:hover {
    background: var(--secondary-hover, #f7f4e8);
    color: var(--secondary-contrast-hover, #8d6a11);
}
.plus-icon {
    user-select: none;
    pointer-events: none;
    line-height: 1;
}

.preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-section {
    position: relative;
    height: 60vh;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #DFDBD5;
    box-shadow: 0 2px 4px rgba(55, 52, 54, 0.04);
    margin-bottom: 2rem;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.brand-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: #B68C23;
    letter-spacing: 1px;
}

.navbar-right h1 {
    font-size: 1.5rem;
    color: #333;
    font-weight: 400;
    margin-left: 20px;
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 2rem;
}

@media (max-width: 900px) {
  .main-content {
    flex-direction: column !important;
    gap: 1.2rem;
    align-items: stretch;
  }
  .sidebar, .preview-section {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
  }
}


@media (max-width: 600px) {
  .overlay-bar-row {
    flex-direction: column;
    align-items: stretch;
  }
  #overlay-size-bar label {
    display: block;
    text-align: center;
    margin-bottom: 0.4em;
    font-size: 1.06em;
    font-weight: 500;
  }
  body, .sidebar-title, .preview-title {
    font-size: 0.97rem;
  }
  .preview-container {
    height: 320px !important;
    min-height: 180px !important;
    max-height: none !important;
    box-shadow: none !important;
    border: none !important;
  }
  .sidebar, .preview-section {
    padding: 0.7rem 0.2rem;
  }
  #overlay-size-bar {
    gap: 4px;
    font-size: 0.97rem;
  }
  button, #downloadBtn, #shareBtn, label[for="imageUpload"] {
    font-size: 1rem;
    padding: 0.9em 0.7em;
    min-width: 0;
  }
  #overlay-size-slider {
    min-width: 0;
    box-sizing: border-box;
    padding: 1.2rem 0.5rem;
  }

  #previewCanvas {
    height: 100% !important;
    width: 100% !important;
    border: none !important;
    min-width: 0;
    min-height: 0;
    display: block;
    margin: 0 auto;
  }
  #overlay-size-bar {
    flex-direction: column;
    gap: 8px;
    max-width: 95vw;
    margin: 0 auto;
  }
  button, #downloadBtn, #shareBtn, label[for="imageUpload"] {
    width: 100%;
    min-width: 0;
    margin-top: 12px;
    font-size: 1.1rem;
    text-align: center;
  }
}

.sidebar {
    width: 35%;
    background: #DFDBD5;
    border-radius: 12px;
    padding: 2rem 1.2rem;
    box-shadow: 0 2px 8px rgba(55,52,54,0.04);
    min-width: 320px;
}

.sidebar-title {
    font-size: 1.7rem;
    color: #B68C23;
    font-weight: bold;
    margin-bottom: 1.2rem;
    text-align: center;
    letter-spacing: 1px;
}

.preview-section {
    flex-basis: 65%;
    background: #DFDBD5;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(55, 52, 54, 0.04);
    padding: 2rem;
}

.preview-title {
    font-size: 1.5rem;
    color: #B68C23;
    font-weight: bold;
    margin-bottom: 1.2rem;
    text-align: left;
    letter-spacing: 1px;
}

.preview-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: #DFDBD5;
    border-radius: 8px;
    overflow: hidden;
}

#previewCanvas {
    width: 100%;
    height: 100%;
}

/* Overlay controls */
.resize-box {
    position: absolute;
    border: 2px dashed #B68C23;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
}

.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #B68C23;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(55,52,54,0.07);
}

.resize-handle-nw {
    top: -4px;
    left: -4px;
}

.resize-handle-n {
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
}

.resize-handle-ne {
    top: -4px;
    right: -4px;
}

.resize-handle-w {
    top: 50%;
    left: -4px;
    transform: translateY(-50%);
}

.resize-handle-e {
    top: 50%;
    right: -4px;
    transform: translateY(-50%);
}

.resize-handle-sw {
    bottom: -4px;
    left: -4px;
}

.resize-handle-s {
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
}

.resize-handle-se {
    bottom: -4px;
    right: -4px;
}

/* Accordion Styles */
.accordion-section {
    border-bottom: 1px solid #B68C23;
}

.accordion-header {
    cursor: pointer;
    padding: 1rem 0.8rem 1rem 0.8rem;
    font-size: 1.1rem;
    font-weight: 500;
    background: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
    position: relative;
}

.accordion-header::after {
    content: '\25BC';
    font-size: 0.9em;
    margin-left: 8px;
    transition: transform 0.2s;
}

.accordion-section.active .accordion-header {
    color: #B68C23;
}

.accordion-section.active .accordion-header::after {
    transform: rotate(-180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(.4,0,.2,1);
    background: #DFDBD5;
    padding: 0 0.8rem;
    border-radius: 0 0 8px 8px;
}

.accordion-section.active .accordion-content {
    padding: 1rem 0.8rem 1rem 0.8rem;
    max-height: 300px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #DFDBD5;
    border-radius: 8px;
}

.step-indicator span {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.step-indicator span.active {
    color: #373436;
    border: 1.5px solid #B68C23;
}

/* Upload Section */
.upload-section {
    margin-bottom: 2rem;
}

.upload-section h2 {
    margin-bottom: 1rem;
}

#imageUpload {
    display: none;
}

label[for="imageUpload"] {
   padding: 0.7em 2em;
    background: #F2D752;
    color: #373436;
    border: 1.5px solid #B68C23;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}
label[for="imageUpload"]:hover {
    background: #B68C23;
    color: #DFDBD5;
    box-shadow: 0 2px 8px rgba(182,140,35,0.13);
}

#imageUpload + label {
    display: inline-block;
    padding: 1rem 2rem;
    background: #F2D752;
    color: 373436;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#imageUpload + label:hover {
    background: #B68C23;
    color: #DFDBD5;
    box-shadow: 0 2px 8px rgba(182,140,35,0.13);
}

/* Preview Section */
.preview-container {
    position: relative;
}

#overlay-size-bar {
    background: #DFDBD5;
    border: 2px solid #B68C23;
    color: #373436;

    width: 340px;
    max-width: 90%;
    margin: 18px auto 0 auto;
    background: rgba(255,255,255,0.97);
    border-radius: 8px;
    padding: 10px 18px 8px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 1.1rem;
    position: static;
}

#overlay-size-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: transparent;
    outline: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
  }
/* Webkit (Chrome, Safari, Edge) */
#overlay-size-slider, .styled-slider, input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    accent-color: #B68C23;
    background: transparent;
    border: none;
    outline: none;
}

/* For Safari/iOS and Webkit browsers */
#overlay-size-slider::-webkit-slider-runnable-track,
.styled-slider::-webkit-slider-runnable-track,
input[type=range]::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #B68C23 0%, #F2D752 100%);
    border-radius: 6px;
    height: 8px;
}

#overlay-size-slider::-webkit-slider-thumb,
.styled-slider::-webkit-slider-thumb,
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #B68C23;
    border: 2px solid #F2D752;
    box-shadow: 0 1px 2px rgba(182,140,35,0.10);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
}

/* For Firefox */
#overlay-size-slider::-moz-range-thumb,
.styled-slider::-moz-range-thumb,
input[type=range]::-moz-range-thumb {
    background: #B68C23;
    border: 2px solid #F2D752;
}
#overlay-size-slider::-moz-range-track,
.styled-slider::-moz-range-track,
input[type=range]::-moz-range-track {
    background: linear-gradient(to right, #B68C23 0%, #F2D752 100%);
    border-radius: 6px;
    height: 8px;
}


#overlay-size-slider::-webkit-slider-runnable-track, .styled-slider::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #B68C23 0%, #F2D752 100%);
    border-radius: 6px;
    height: 8px;
}

#overlay-size-slider::-webkit-slider-thumb, .styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #B68C23;
    border: 2px solid #F2D752;
    box-shadow: 0 1px 2px rgba(182,140,35,0.10);
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #B68C23;
    border: 2px solid white;
    margin-top: -3px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(55,52,54,0.10);
  }
  #overlay-size-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #B68C23 0%, #F2D752 100%);
    border-radius: 6px;
}
#overlay-size-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #B68C23;
    border: 2px solid white;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(55,52,54,0.10);
}

.styled-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #B68C23 0%, #F2D752 100%);
    border-radius: 6px;
}
.styled-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #B68C23;
    border: 2px solid white;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(55,52,54,0.10);
}

/* IE/Edge */
#overlay-size-slider::-ms-fill-lower {
    background: #B68C23;
    border-radius: 6px;
}
#overlay-size-slider::-ms-fill-upper {
    background: #DFDBD5;
    border-radius: 6px;
}
#overlay-size-slider::-ms-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #B68C23;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(55,52,54,0.10);
    border: none;
}
#overlay-size-slider:focus {
    outline: none;
}
#overlay-size-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* JS helper to set --percent for progress color */




#previewCanvas {
    width: 100%;
    height: 100%;
}

/* Overlay Controls */
.overlay-assets {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    gap: 12px;
    padding: 8px 0 8px 0;
    max-width: 100%;
    align-items: center;
    height: 64px;
    margin-bottom: 1rem;
}

.overlay-thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border: 2px solid #eee;
    border-radius: 8px;
    background: #DFDBD5;
    cursor: pointer;
    transition: border 0.2s, box-shadow 0.2s;
}
.overlay-thumb.selected, .overlay-thumb:hover {
    border: 2px solid #B68C23;
}

.overlay-control {
    position: absolute;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    color: #DFDBD5;
    padding: 5px;
    border-radius: 3px;
    cursor: move;
}

/* Buttons */
button, #downloadBtn, #shareBtn {
    padding: 0.7em 2em;
    background: #F2D752;
    color: #373436;
    border: 1.5px solid #B68C23;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

#close-x-share-modal {
    box-shadow: none !important;
    text-shadow: none !important;
}

button:hover, #downloadBtn:hover, #shareBtn:hover {
    background: #B68C23;
    color: #DFDBD5;
    box-shadow: 0 2px 8px rgba(182,140,35,0.13);
}
