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

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    padding-top: 70px;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
}

.nav-logo img {
    border-radius: 6px;
}

.nav-logo:hover {
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-menu li a {
    display: block;
    padding: 10px 18px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-menu li a.active {
    background-color: #f5a623;
    color: #fff;
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Main Container */
.container {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Left Panel */
.left-panel {
    background-color: #f5a623;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 300px;
}

/* Preview Section */
.preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-container {
    background-color: #fff;
    border: 4px solid #4ecdc4;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

#avatarCanvas {
    display: block;
    background-color: #fff;
}

.preview-label {
    font-style: italic;
    color: #4ecdc4;
    font-size: 18px;
}

.label-text {
    font-size: 22px;
}

.label-size {
    font-size: 14px;
}

/* Controls Section */
.controls-section {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Buttons */
.btn {
    font-family: inherit;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-weight: bold;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-save {
    background-color: #5cb85c;
    color: #fff;
    padding: 15px 60px;
    font-size: 24px;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.save-hint {
    margin-bottom: 15px;
}

.speech-bubble {
    background-color: #fff;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 12px;
    color: #666;
    position: relative;
    text-align: center;
    line-height: 1.4;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.btn-random {
    background-color: #4ecdc4;
    color: #fff;
    padding: 12px 40px;
    font-size: 20px;
}

.btn-reset {
    background-color: #ff6b6b;
    color: #fff;
    padding: 12px 30px;
    font-size: 18px;
    margin-top: 10px;
}

/* Divider */
.divider {
    width: 15px;
    background: repeating-linear-gradient(
        0deg,
        #000 0px,
        #000 3px,
        #fff 3px,
        #fff 6px
    );
}

/* Right Panel */
.right-panel {
    display: flex;
    background-color: #fff;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-right: 2px solid #000;
}

.tab {
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    background-color: #fff;
    border: none;
    border-bottom: 2px solid #000;
    cursor: pointer;
    text-align: right;
    min-width: 100px;
    transition: background-color 0.2s;
    line-height: 1.2;
}

.tab:hover {
    background-color: #e8f5f4;
}

.tab.active {
    background-color: #4ecdc4;
    color: #fff;
    font-weight: bold;
}

/* Selection Panel */
.selection-panel {
    background-color: #4ecdc4;
    padding: 15px;
    min-width: 450px;
}

/* Main controls container */
.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 15px;
}

/* Main position controls */
.main-position-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.main-position-controls .position-label {
    color: #fff;
    font-size: 14px;
    margin-right: 5px;
}

.main-position-controls .position-btn {
    width: 32px;
    height: 32px;
    background-color: #fff;
    border: 2px solid #4ecdc4;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #4ecdc4;
    transition: all 0.2s;
}

.main-position-controls .position-btn:hover {
    background-color: #4ecdc4;
    color: #fff;
}

.color-picker-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 10px;
    gap: 10px;
}

.color-label {
    color: #fff;
    font-size: 16px;
}

#colorPicker {
    width: 40px;
    height: 30px;
    border: 2px solid #fff;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

/* Elements Grid */
.elements-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 5px;
}

.element-btn {
    width: 65px;
    height: 50px;
    background-color: #7eddd6;
    border: 2px solid #5cbdb6;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 4px;
}

.element-btn:hover {
    background-color: #9eeae4;
    transform: scale(1.05);
}

.element-btn.active {
    background-color: #fff;
    border-color: #4ecdc4;
}

.element-btn.none-btn {
    font-size: 14px;
    font-weight: bold;
    color: #4ecdc4;
}

.element-btn canvas {
    max-width: 100%;
    max-height: 100%;
}

/* Larger buttons for eye category */
.element-btn.eye-btn {
    width: 85px;
    height: 65px;
}

/* Larger buttons for nose category */
.element-btn.nose-btn {
    width: 75px;
    height: 55px;
}

/* Eye grid uses 5 columns to fit larger buttons */
.elements-grid.eye-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Nose grid uses 5 columns */
.elements-grid.nose-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Larger buttons for mouth category */
.element-btn.mouth-btn {
    width: 75px;
    height: 55px;
}

/* Mouth grid uses 5 columns */
.elements-grid.mouth-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Eyebrow button styles */
.element-btn.eyebrow-btn {
    width: 75px;
    height: 55px;
}

/* Eyebrow grid uses 5 columns */
.elements-grid.eyebrow-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Eyelash button styles */
.element-btn.eyelash-btn {
    width: 75px;
    height: 55px;
}

/* Eyelash grid uses 5 columns */
.elements-grid.eyelash-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Cheek button styles */
.element-btn.cheek-btn {
    width: 75px;
    height: 55px;
}

/* Cheek grid uses 5 columns */
.elements-grid.cheek-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Wrinkle button styles */
.element-btn.wrinkle-btn {
    width: 75px;
    height: 55px;
}

/* Wrinkle grid uses 5 columns */
.elements-grid.wrinkle-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Glasses button styles */
.element-btn.glasses-btn {
    width: 80px;
    height: 58px;
}

/* Glasses grid uses 5 columns */
.elements-grid.glasses-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Hats button size */
.element-btn.hats-btn {
    width: 80px;
    height: 58px;
}

/* Hats grid uses 5 columns */
.elements-grid.hats-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Clothes button size */
.element-btn.clothes-btn {
    width: 80px;
    height: 58px;
}

/* Clothes grid uses 5 columns */
.elements-grid.clothes-grid {
    grid-template-columns: repeat(5, 1fr);
}

/* Other category container - special layout for sub-sections */
.elements-grid.other-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
}

.other-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.other-section {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px;
}

.other-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.position-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.position-label {
    color: #fff;
    font-size: 14px;
    margin-right: 5px;
}

.position-btn {
    width: 30px;
    height: 30px;
    background-color: #fff;
    border: 2px solid #4ecdc4;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #4ecdc4;
    transition: all 0.2s;
}

.position-btn:hover {
    background-color: #4ecdc4;
    color: #fff;
}

.sub-color-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-color-picker .color-label {
    color: #fff;
    font-size: 14px;
}

.sub-color-input {
    width: 35px;
    height: 28px;
    border: 2px solid #fff;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.other-elements-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.element-btn.other-sub-btn {
    width: 55px;
    height: 45px;
    padding: 3px;
}

.other-section-label {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-style: italic;
    margin-top: 5px;
}

/* Scrollbar Styling */
.elements-grid::-webkit-scrollbar {
    width: 8px;
}

.elements-grid::-webkit-scrollbar-track {
    background: #7eddd6;
    border-radius: 4px;
}

.elements-grid::-webkit-scrollbar-thumb {
    background: #5cbdb6;
    border-radius: 4px;
}

/* Footer */
.footer {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.btn-footer {
    background-color: #4ecdc4;
    color: #fff;
    padding: 12px 30px;
    font-size: 16px;
}

/* Color Swatches for Skin Category */
.color-swatch {
    width: 65px;
    height: 50px;
    border: 2px solid #5cbdb6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.color-swatch.active {
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #4ecdc4;
}

/* Custom Color Button for Skin */
.custom-color-btn {
    width: 65px;
    height: 50px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 25%, #ffecd2 50%, #a8edea 75%, #fed6e3 100%);
    border: 2px solid #5cbdb6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.custom-color-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.custom-color-btn.active {
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #4ecdc4;
}

.custom-color-text {
    font-size: 9px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
    line-height: 1.2;
    pointer-events: none;
}

.custom-color-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Site Header */
.site-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 25px 20px;
}

.site-header h1 {
    font-size: 36px;
    color: #4ecdc4;
    text-shadow: 2px 2px 0 #f5a623;
}

/* Footer Buttons */
.footer-buttons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

/* Content Section for SEO */
.content-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.content-wrapper {
    background-color: #fff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Gallery Section */
.gallery-section {
    margin-bottom: 50px;
}

.gallery-section h2 {
    font-size: 28px;
    color: #4ecdc4;
    margin-bottom: 15px;
    text-align: center;
}

.gallery-intro {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    text-align: center;
}

.gallery-container {
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #e8f5f4 0%, #fff 100%);
    padding: 20px 0;
    margin-bottom: 20px;
}

.gallery-track {
    display: flex;
    gap: 20px;
    animation: scroll 40s linear infinite;
    width: max-content;
}

.gallery-track:hover {
    animation-play-state: paused;
}

.gallery-item {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.gallery-item:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-cta {
    font-size: 14px;
    color: #666;
    text-align: center;
    font-style: italic;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* About Section */
.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    font-size: 28px;
    color: #4ecdc4;
    margin-bottom: 20px;
    text-align: center;
}

.about-section p {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

/* Section Intro */
.section-intro {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    text-align: center;
}

/* How to Use Section */
.how-to-use {
    margin-bottom: 40px;
}

.how-to-use h2 {
    font-size: 28px;
    color: #4ecdc4;
    margin-bottom: 15px;
    text-align: center;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.step {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8f5f4 100%);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #4ecdc4;
}

.step h3 {
    font-size: 18px;
    color: #f5a623;
    margin-bottom: 12px;
}

.step p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* Features Section */
.features {
    margin-bottom: 40px;
}

.features h2 {
    font-size: 28px;
    color: #4ecdc4;
    margin-bottom: 25px;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.feature {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #4ecdc4;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.3);
}

.feature h3 {
    font-size: 18px;
    color: #f5a623;
    margin-bottom: 12px;
}

.feature p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* Use Cases Section */
.use-cases {
    margin-bottom: 40px;
}

.use-cases h2 {
    font-size: 28px;
    color: #4ecdc4;
    margin-bottom: 15px;
    text-align: center;
}

.use-cases > p {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    text-align: center;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.use-case {
    background: linear-gradient(135deg, #e8f5f4 0%, #fff 100%);
    padding: 20px;
    border-radius: 12px;
    border-top: 4px solid #f5a623;
    text-align: center;
}

.use-case h3 {
    font-size: 16px;
    color: #4ecdc4;
    margin-bottom: 10px;
}

.use-case p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

/* Tips Section */
.tips-section {
    margin-bottom: 40px;
}

.tips-section h2 {
    font-size: 28px;
    color: #4ecdc4;
    margin-bottom: 15px;
    text-align: center;
}

.tips-section > p {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    text-align: center;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.tip {
    background: linear-gradient(135deg, #fff5e6 0%, #fff 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #f5a623;
}

.tip h3 {
    font-size: 16px;
    color: #f5a623;
    margin-bottom: 10px;
}

.tip p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* Comparison Section */
.comparison-section {
    margin-bottom: 40px;
}

.comparison-section h2 {
    font-size: 28px;
    color: #4ecdc4;
    margin-bottom: 15px;
    text-align: center;
}

.comparison-section > p {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    text-align: center;
}

.comparison-content {
    background: linear-gradient(135deg, #f0f8f7 0%, #fff 100%);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #4ecdc4;
}

.comparison-content h3 {
    font-size: 18px;
    color: #4ecdc4;
    margin-bottom: 12px;
    margin-top: 15px;
}

.comparison-content h3:first-child {
    margin-top: 0;
}

.comparison-content p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 20px;
}

.faq-section h2 {
    font-size: 28px;
    color: #4ecdc4;
    margin-bottom: 25px;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.faq-item summary {
    padding: 18px 20px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 24px;
    color: #4ecdc4;
    font-weight: bold;
}

.faq-item[open] summary::after {
    content: '-';
}

.faq-item summary:hover {
    background-color: #e8f5f4;
}

.faq-item p {
    padding: 0 20px 20px;
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

/* Site Footer */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    background-color: #4ecdc4;
    color: #fff;
    margin-top: 40px;
    width: 100%;
}

.site-footer p {
    margin-bottom: 10px;
    font-size: 14px;
}

.site-footer .footer-links {
    font-size: 12px;
    opacity: 0.9;
}

.site-footer .footer-links span {
    margin: 0 5px;
}

.site-footer .footer-legal {
    font-size: 13px;
    margin: 15px 0;
}

.site-footer .footer-legal a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    transition: opacity 0.2s ease;
}

.site-footer .footer-legal a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.site-footer .footer-description {
    font-size: 12px;
    opacity: 0.85;
    max-width: 600px;
    margin: 10px auto 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 900px) {
    /* Mobile Navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
        padding: 10px;
        gap: 5px;
        display: none;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li a {
        padding: 12px 20px;
        text-align: center;
    }

    .container {
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
    }

    .divider {
        width: 100%;
        height: 15px;
        background: repeating-linear-gradient(
            90deg,
            #000 0px,
            #000 3px,
            #fff 3px,
            #fff 6px
        );
    }

    .right-panel {
        flex-direction: column;
    }

    .category-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 2px solid #000;
    }

    .tab {
        border-right: 2px solid #000;
        border-bottom: none;
        text-align: center;
        min-width: auto;
        flex: 1;
    }

    .selection-panel {
        min-width: auto;
    }

    .elements-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .elements-grid.eye-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .elements-grid.nose-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .elements-grid.mouth-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .elements-grid.eyebrow-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .elements-grid.eyelash-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .element-btn.eyebrow-btn,
    .element-btn.eyelash-btn {
        width: 65px;
        height: 50px;
    }

    .elements-grid.cheek-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .element-btn.cheek-btn {
        width: 65px;
        height: 50px;
    }

    .elements-grid.wrinkle-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .element-btn.wrinkle-btn {
        width: 65px;
        height: 50px;
    }

    .elements-grid.glasses-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .element-btn.glasses-btn {
        width: 70px;
        height: 52px;
    }

    .elements-grid.hats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .element-btn.hats-btn {
        width: 70px;
        height: 52px;
    }

    .elements-grid.clothes-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .element-btn.clothes-btn {
        width: 70px;
        height: 52px;
    }

    /* Other sub-sections responsive */
    .other-elements-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .element-btn.other-sub-btn {
        width: 50px;
        height: 40px;
    }

    .position-btn {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .main-position-controls .position-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .main-position-controls .position-label {
        font-size: 12px;
    }

    /* Header responsive */
    .site-header h1 {
        font-size: 28px;
    }

    .site-header .tagline {
        font-size: 14px;
    }

    /* Content section responsive */
    .content-wrapper {
        padding: 25px;
    }

    .how-to-use h2,
    .features h2,
    .faq-section h2 {
        font-size: 22px;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .footer-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Gallery responsive */
    .gallery-item {
        width: 100px;
        height: 100px;
    }

    .gallery-section h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .site-header h1 {
        font-size: 24px;
    }

    .elements-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .elements-grid.eye-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .elements-grid.nose-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .elements-grid.mouth-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .element-btn.eye-btn {
        width: 75px;
        height: 55px;
    }

    .element-btn.nose-btn {
        width: 65px;
        height: 50px;
    }

    .element-btn.mouth-btn {
        width: 65px;
        height: 50px;
    }

    .elements-grid.eyebrow-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .elements-grid.eyelash-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .element-btn.eyebrow-btn,
    .element-btn.eyelash-btn {
        width: 60px;
        height: 45px;
    }

    .elements-grid.cheek-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .element-btn.cheek-btn {
        width: 60px;
        height: 45px;
    }

    .elements-grid.wrinkle-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .element-btn.wrinkle-btn {
        width: 60px;
        height: 45px;
    }

    .elements-grid.glasses-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .element-btn.glasses-btn {
        width: 65px;
        height: 48px;
    }

    .elements-grid.hats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .element-btn.hats-btn {
        width: 65px;
        height: 48px;
    }

    .elements-grid.clothes-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .element-btn.clothes-btn {
        width: 65px;
        height: 48px;
    }

    /* Other sub-sections mobile */
    .other-elements-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .element-btn.other-sub-btn {
        width: 45px;
        height: 35px;
    }

    .position-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .position-label,
    .sub-color-picker .color-label {
        font-size: 12px;
    }

    .other-section-header {
        flex-wrap: wrap;
    }

    .main-position-controls .position-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .main-position-controls {
        padding: 4px 8px;
    }

    /* Gallery responsive */
    .gallery-item {
        width: 80px;
        height: 80px;
    }

    .gallery-section h2 {
        font-size: 22px;
    }

    .gallery-intro,
    .gallery-cta {
        font-size: 13px;
    }
}

/* Share Section */
.share-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
}

.share-label {
    font-size: 12px;
    color: #666;
}

.share-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: transform 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.share-twitter {
    background-color: #000;
    color: #fff;
}

.share-facebook {
    background-color: #1877f2;
    color: #fff;
}

.share-pinterest {
    background-color: #e60023;
    color: #fff;
}

.share-tiktok {
    background-color: #000;
    color: #fff;
}

.share-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
}

.share-link {
    background-color: #6c757d;
    color: #fff;
    font-size: 12px;
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.share-modal.active {
    display: flex;
}

.share-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px 20px;
    max-width: 480px;
    width: 95%;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.share-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.share-modal-close:hover {
    color: #333;
}

.share-modal-content h3 {
    color: #4ecdc4;
    margin-bottom: 10px;
    font-size: 22px;
}

.share-modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.share-modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.share-modal-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, opacity 0.2s;
}

.share-modal-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-modal-btn.share-twitter {
    background-color: #000;
}

.share-modal-btn.share-facebook {
    background-color: #1877f2;
}

.share-modal-btn.share-pinterest {
    background-color: #e60023;
}

.share-modal-btn.share-tiktok {
    background-color: #000;
}

.share-modal-btn.share-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.share-icon {
    font-size: 16px;
}

.share-modal-copy {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.share-modal-copy input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
}

.share-modal-copy button {
    padding: 10px 20px;
    background-color: #4ecdc4;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.share-modal-copy button:hover {
    background-color: #3dbdb5;
}

.share-hashtag {
    color: #4ecdc4;
    font-weight: bold;
    font-size: 16px;
}

/* Mobile responsive for share */
@media (max-width: 500px) {
    .share-modal-buttons {
        flex-direction: column;
    }

    .share-modal-btn {
        justify-content: center;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background-color: #4ecdc4;
}

.toast.info {
    background-color: #333;
}
