:root {
    --primary-color: #7f61f5;
    --secondary-color: #6366F1;
    --accent-color: #F59E0B;
    --text-color: #1F2937;
    --text-light: #6B7280;
    --bg-color: #FAFAFA;
    --panel-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #C1B3FD 0%, #FFFFFF 37%,#FFFFFF 83%,rgba(193, 179, 253, 0.54) 100% );
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}
.page.active{
    display: block;
}
.page { 
    display: none; padding: 40px; text-align: center; 
}
.optact.opt{
    background-color: #8bc237;
    color: white;
}
.opt{
    border: none;
    border-radius: 16px;
    padding: clamp(12px, 3vw, 16px) clamp(24px, 5vw, 32px);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    cursor: pointer;
    font-weight: 600;
    display: flex
;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    white-space: nowrap;
    min-height: 48px;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
    /* background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); */
    transition: left 0.5s;
    background: #7F61F5;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: 25px;
    padding: 10px 35px;
    color: #7F61F5;background-color: white;
}
.hpage{
    display: none; padding: 40px; text-align: center;
}
.hpage.act{
    display: block;
}
.skintype{
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: clamp(16px, 4vw, 32px);
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);

    display: flex
;
    justify-content: space-evenly;
    align-items: center;
}
.head1{
    font-size: 4.5rem;
    font-weight: bold;
}
.head2{
    font-family:'Balthazar';
    letter-spacing: 3px;
    word-spacing: 5px;
    font-weight: 500;
    font-size: 3rem;
}
.head3{
    font-size: 1.5rem;
    font-weight: 500;
}
.p{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    
}
.pg1{
    height: 100vh;
}
#get-btn{
    background: #7F61F5; 
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    color: white;
    padding: 1rem 7rem;
    border-radius: 33px;
    font-size: 2rem;
    border-style: none;
}
.get-btn{
    background: #7F61F5; 
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    color: white;
    padding: 1rem 7rem;
    border-radius: 33px;
    font-size: 2rem;
    border-style: none;

}

.pg2-head1{
    font-size: 2rem;
    font-weight: 700;
}
.container {
    max-width: 1400px;
    margin: 0 auto 80px auto;
    padding: 0 24px;
    width: 100%;
}

header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    border-radius: 0 0 24px 24px;
    padding: 40px 24px 24px 24px;
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 16px 0;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

header p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-light);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 4vw, 32px);
    width: 100%;
}

/* Popup Styles */
#popup {
    width: min(500px, 95vw);
    border: none;
    /* margin: auto;
     */
    padding: clamp(20px, 4vw, 32px);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 3px 8px 0px 0px rgba(0, 0, 0, 0.4);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgb(155 155 155 / 30%);
}
.title{
    font-weight: 700;
    font-size: 1.5rem;
}
.popcontent {

    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    height: auto;
    min-height: 200px;
    margin-bottom: 16px;
    padding: 30px 10px;
    text-align: left;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.5);
}
.popcontent ul{
    margin: 10px 25px;
}
.pg2{
    height: 100vh;
}

/* .intensity-control{
    display: flex;
    flex-direction: column;
} */
/* .title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 24px;
} */

.ji {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.q{
    font-size: 3rem;
    font-weight: 650;
    margin: 20px;
}

.new-btn{
    /* background: linear-gradient(135deg, var(--primary-color) 0%, #EC4899 100%); */
    color: white;
    border: none;
    border-radius: 16px;
    padding: clamp(12px, 3vw, 16px) clamp(24px, 5vw, 32px);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    white-space: nowrap;
    min-height: 48px;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
    /* background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); */
    transition: left 0.5s;


    background: #7F61F5;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: 25px;
    padding: 10px 35px;
}

.upload-message{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.cam{
    width: 125px;
}
.t1{
    font-size: 1.5rem;
    font-weight: 700;
}
.t2{
    color: #B5B5B5;
    font-size: 20px;
}
.recommendation {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: clamp(16px, 3vw, 24px);
    margin-top: 16px;
    text-align: center;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.recommendations-section{
    gap: 10px;
    display: flex;
    flex-direction: column;
}
#rec{
    margin:10px;
}

#tm1{
    position: relative;
    bottom: 25px;
    left: -5px;
}
#tm2{
    position: relative;
    bottom: 25px;
    left: -5px;
}

.recommendation .heading {
    font-size: clamp(1.1rem, 2.5vw, 2.3rem);
    font-weight: 650;
    /* color: var(--primary-color); */
    color: #7f61f5;
    margin-bottom: 16px;
    line-height: 1.3;
}
.rec-category{
  display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); */
    gap: clamp(16px, 3vw, 24px);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: clamp(16px, 4vw, 32px);
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 50px;
}

.heading {
    text-align: center;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--primary-color);
    font-weight: 700;
    font-family: inherit;
    margin-bottom: 16px;
    line-height: 1.3;
}

.button {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}



.rec-colors {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: clamp(12px, 3vw, 20px);
    width: 100%;
    justify-content: center;
    align-items: center;
    grid-auto-flow: column;
    justify-items: center;
}

.makeup-types {
    /* display: grid; */
    /* grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); */
    gap: clamp(16px, 3vw, 24px);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: clamp(16px, 4vw, 32px);
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.makeup-type {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    padding: clamp(16px, 3vw, 24px);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.makeup-type:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.type-header {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    margin-bottom: clamp(16px, 3vw, 20px);
    flex-wrap: wrap;
    justify-content: space-between;
}

.type-header h3 {
    margin: 0;
    flex-grow: 1;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.3;
    min-width: 0;
}

.type-header .material-icons {
    color: var(--primary-color);
    flex-shrink: 0;
    font-size: 1.5rem;
}

/* Enhanced Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: clamp(48px, 10vw, 60px);
    height: clamp(24px, 5vw, 30px);
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
    transition: var(--transition);
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    left: 4px;
    bottom: 4px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: #6251A2;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(255, 107, 157, 0.2);
}

input:checked + .slider:before {
    transform: translateX(calc(100% + 8px));
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(8px, 2vw, 16px);
    width: 100%;
    justify-items: stretch;
    align-items: start;
    padding: 8px 0;
}
.eyeshadow-color-grid{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(8px, 2vw, 16px);
    width: 100%;
    justify-items: stretch;
    align-items: start;
    padding: 8px 0;
}
.lipstick-color-grid{
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(8px, 2vw, 16px);
    width: 100%;
    justify-items: stretch;
    align-items: start;
    padding: 8px 0;
}

.shade-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(6px, 1.5vw, 10px);
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: clamp(8px, 2vw, 12px);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    box-sizing: border-box;
}

.shade-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.8);
}

.color-btn {
    width: clamp(32px, 7vw, 44px);
    height: clamp(32px, 7vw, 44px);
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    flex-shrink: 0;
    margin-bottom: clamp(4px, 1vw, 8px);
    position: relative;
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.color-btn.selected {
    border: 2px solid var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 0 2px rgba(255, 107, 157, 0.3), var(--shadow-md);
}

.shade-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
}

/* Professional Buy Button Styles */
.buynow-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #EC4899 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: clamp(6px, 1.5vw, 10px) clamp(10px, 2.5vw, 14px);
    font-size: clamp(0.7rem, 1.8vw, 0.85rem);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    min-width: clamp(60px, 12vw, 80px);
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100px;

    transition: left 0.5s;
    background: #7F61F5;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.buynow-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.buynow-btn:hover {
    background: #947eea;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.buynow-btn:hover:before {
    left: 100%;
}

.buynow-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.preview-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 49px;
    box-shadow: var(--shadow-xl);
    padding: clamp(16px, 4vw, 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 630px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.image-container {
    position: relative;
    width: min(100%, 90vw);
    outline: 2px #B5B5B5 dashed;
    height: min(400px, 90vw);
    /* max-width: 400px; */
    /* max-height: 400px; */
    /* background: linear-gradient(135deg, #F3E8FF 0%, #FEF3C7 100%); */
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#webcam-container {
    width: 96%;
    height: 92%;
    margin: auto;
    border-radius: 16px;
    background: #000;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#webcam, #uploaded-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(12px, 4vw, 24px);
    flex-wrap: wrap;
    margin: 10px;
}

.control-btn {
        /* background: linear-gradient(135deg, var(--primary-color) 0%, #EC4899 100%); */
    background: #7F6FF5;
    color: white;
    border: none;
    border-radius: 50%;
    width: clamp(48px, 10vw, 40px);
    height: clamp(48px, 10vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.control-btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
}

.control-btn:hover {
    background: #947eea;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.control-btn:hover:before {
    width: 100%;
    height: 100%;
}

.control-btn .material-icons {
    font-size: clamp(1.2rem, 2.5vw, 1.4rem);
    z-index: 1;
}

#file-upload {
    display: none;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: clamp(12px, 3vw, 20px) clamp(20px, 5vw, 32px);
    border-radius: 16px;
    z-index: 10;
    display: none;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    text-align: center;
    max-width: 90%;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.loading-indicator {
    display: none;
}

.upload-btn{
    /* background: linear-gradient(135deg, var(--primary-color) 0%, #EC4899 100%); */
    color: white;
    border: none;
    border-radius: 16px;
    padding: clamp(12px, 3vw, 16px) clamp(24px, 5vw, 32px);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    white-space: nowrap;
    min-height: 48px;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
    /* background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); */
    transition: left 0.5s;
    background: #7F61F5;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: 25px;
    padding: 10px 35px;
}


.upload-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.upload-btn:hover {
    background: #947eea;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-btn:hover:before {
    left: 100%;
}

.upload-section {
    display: flex;
    justify-content: center;
    /* align-items: center; */
    gap: clamp(12px, 3vw, 30px);
    margin-bottom: -20px;
    flex-wrap: wrap;
}

.preva {
    display: flex;
    flex-direction: row;
    gap: clamp(32px, 8vw, 120px);
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
}

.write {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    padding: clamp(20px, 4vw, 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Enhanced Media Queries */
@media (min-width: 1200px) {
    .container {
        /* filter: blur(5px);
        pointer-events: none; */
    }
    
    .makeup-types {
        /* grid-template-columns: repeat(3, 1fr); */
    }
    
    .preva {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .color-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: clamp(12px, 2.5vw, 18px);
    }
}

@media (max-width: 1024px) {
    .container {
        /* filter: blur(5px);
        pointer-events: none; */
        padding: 0 20px;
    }
    
    .makeup-types {
        /* grid-template-columns: repeat(2, 1fr); */
    }
    
    .preva {
        gap: 60px;
    }
    
    .color-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: clamp(10px, 2vw, 16px);
    }
}

@media (max-width: 768px) {
    .head1{
        font-size: 3.5rem;
    }
    .head2{
        font-size: 2.5rem;
    }

    .get-btn{
        padding: 1rem 5rem;
        font-size: 1.5rem;
    }
    .q{
        font-size: 2.5rem;
    }
    .container {
        padding: 0 16px;
        margin-bottom: 60px;
    }
    
    header {
        padding: 32px 16px 20px 16px;
        margin-bottom: 32px;
        border-radius: 0 0 16px 16px;
    }
    
    .makeup-types {
        /* grid-template-columns: 1fr; */
        padding: 20px 16px;
    }
    
    .rec-colors {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .color-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: clamp(8px, 2vw, 14px);
    }
    
    .shade-item {
        min-width: 0;
        padding: clamp(10px, 2.5vw, 14px);
    }
    
    .preva {
        flex-direction: column;
        gap: 40px;
    }
    
    .image-container {
        /* width: min(350px, 90vw); */
        height: min(450px, 90vw);
    }
    
    .buynow-btn {
        font-size: clamp(0.8rem, 2.2vw, 0.9rem);
        padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 16px);
        min-width: clamp(70px, 12vw, 90px);
    }
}
@media (max-width:560px) {
  .lipstick-color-grid{
    grid-template-columns: repeat(3, 1fr);
  }
  #popup{
    width: 100%;
  }
  .head1{
    font-size: 3rem;
  }
  .head2{
    font-size: 2rem;
  }
  #get-btn{
    padding: 1rem 3rem;
    font-size: 1.5rem;
  }
  
}

@media (max-width: 480px) {
    #tm1{
        bottom: 20px;
    }
    .head2{
        font-size: 23px;
    }
    .head1{
        font-size: 2rem;
    }
    .head3{
        font-size: 1rem;
    }
    #get-btn{
        font-size: 1rem;
    }
    .get-btn{
        font-size: 1rem;
        padding: 1rem 3rem;
    }
    .pg2-head1{
        font-size: 1.5rem;
    }
    .title{
        font-size: 20px;
    }
    .q{
        font-size: 2rem;
    }
    .cam{
        width: 90px;
    }
    .upload-btn{
        padding: 10px 10px;
    }
    .container {
        padding: 0 12px;
        margin-bottom: 40px;
    }
    .popcontent{
        font-size: 12px;
    }
    
    header {
        padding: 24px 12px 16px 12px;
        margin-bottom: 24px;
        border-radius: 0 0 12px 12px;
    }
    
    .makeup-types {
        padding: 16px 12px;
    }
    
    .rec-colors {
        /* grid-template-columns: repeat(2, 1fr); */
        grid-auto-flow: dense;
    }
    
    .color-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: clamp(10px, 3vw, 16px);
    }
    
    .shade-item {
        min-width: 0;
        padding: clamp(12px, 3vw, 16px);
    }
    
    .buynow-btn {
        font-size: clamp(0.75rem, 2.5vw, 0.85rem);
        padding: clamp(10px, 2.5vw, 14px) clamp(14px, 3.5vw, 18px);
        min-width: clamp(80px, 18vw, 100px);
    }
    
    .image-container {
        /* width: min(280px, 95vw); */
        height: min(320px, 95vw);
    }
    
    #popup {
        padding: 20px;
        border-radius: 16px;
    }
    
    .popcontent {
        border-width: 2px;
        padding: 12px;
    }
}

@media(max-width:410px){
    #tm1{
        bottom: 13px;
    }
    .q{
        font-size: 1.5rem;
    }
    .title{
        font-size: 17px;
    }
    .popcontent{
        font-size: 12px;
    }
}
@media (max-width: 360px) {
    .q{
        font-size: 1.5rem;
    }
    .container {
        padding: 0 8px;
    }
    .upload-btn{
        font-size: 12px;
    }
    .makeup-types {
        padding: 12px 8px;
    }
    
    .shade-item {
        min-width: 0;
        padding: clamp(14px, 4vw, 18px);
    }
    
    .buynow-btn {
        font-size: clamp(0.7rem, 3vw, 0.8rem);
        padding: clamp(12px, 3vw, 16px) clamp(16px, 4vw, 20px);
        min-width: clamp(70px, 22vw, 110px);
    }
    
    .image-container {
        width: min(240px, 98vw);
        height: min(240px, 98vw);
    }
}