
/* =========================================
   VISUAL LAB
   RESPONSIVE STYLE
   Desktop + Tablet + Mobile
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');


/* =========================================
   1. ROOT VARIABLES
   ========================================= */

:root {
    --background: #101020;
    --surface: #1b1b31;
    --surface-light: #252541;

    --text: #f7f5ff;
    --muted: #aaa8c3;

    --purple: #9b70ff;
    --pink: #ff70b8;
    --cyan: #66e6e2;
}


/* =========================================
   2. GLOBAL RESET
   ========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;

    font-family: "DM Sans", Arial, sans-serif;

    background:
        radial-gradient(ellipse at 10% 5%, #322052 0%, transparent 35%),
        radial-gradient(ellipse at 90% 25%, #172b4b 0%, transparent 35%),
        var(--background);

    color: var(--text);

    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

img,
canvas {
    max-width: 100%;
}


/* =========================================
   3. NAVBAR
   ========================================= */

.navbar {
    width: 100%;
    min-height: 76px;

    padding: 18px 7%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    border-bottom: 1px solid #ffffff12;

    background: #101020bb;
}

.logo {
    color: white;
    text-decoration: none;

    font-size: 20px;
    font-weight: 800;

    white-space: nowrap;
}

.header-label {
    color: var(--muted);
    font-size: 13px;
    text-align: right;
}


/* =========================================
   4. MAIN CONTAINER
   ========================================= */

.container {
    width: min(1120px, 90%);
    margin: 0 auto;
}


/* =========================================
   5. HERO SECTION
   ========================================= */

.hero {
    text-align: center;
    padding: 75px 15px 48px;
}

.eyebrow {
    display: inline-block;

    color: var(--cyan);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;

    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 54px);

    line-height: 1.15;
    font-weight: 800;

    max-width: 800px;

    margin: 0 auto 18px;
}

.hero h1 span {
    background: linear-gradient(90deg, var(--purple), var(--pink));

    background-clip: text;
    -webkit-background-clip: text;

    color: transparent;
}

.hero p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}


/* =========================================
   6. EDITOR LAYOUT
   ========================================= */

.editor {
    display: grid;

    grid-template-columns: 300px minmax(0, 1fr);

    gap: 25px;

    align-items: start;

    margin-bottom: 70px;

    width: 100%;
}


/* =========================================
   7. UPLOAD AREA
   ========================================= */

.upload-area {
    width: 100%;

    background: #1b1b31cc;

    border: 2px dashed #77709e;
    border-radius: 20px;

    padding: 35px 20px;

    text-align: center;

    min-height: 260px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    transition: .2s;
}

.upload-area.dragover {
    border-color: var(--cyan);
    background: #252541;
}

.upload-icon {
    font-size: 42px;
    margin-bottom: 15px;
}

.upload-area h2 {
    font-size: 19px;
    margin-bottom: 8px;
}

.upload-area p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.upload-button {
    display: inline-block;

    padding: 12px 24px;

    background: linear-gradient(100deg, var(--purple), var(--pink));

    color: white;

    border-radius: 12px;

    font-weight: 700;

    cursor: pointer;

    transition: transform .2s;
}

.upload-button:hover {
    transform: translateY(-2px);
}

.upload-area .privacy-note {
    margin: 18px 0 0;

    font-size: 11px;
    line-height: 1.6;

    max-width: 280px;
}


/* =========================================
   8. WORKSPACE
   ========================================= */

.workspace {
    width: 100%;
    min-width: 0;

    background: #1b1b31cc;

    border: 1px solid #ffffff12;
    border-radius: 20px;

    padding: 25px;
}


/* =========================================
   9. SECTION HEADING
   ========================================= */

.section-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-bottom: 20px;
}

.section-heading h2,
.effects-section h2 {
    font-size: 19px;
    font-weight: 700;
}

.reset-button {
    background: var(--surface-light);

    color: white;

    border: 1px solid #ffffff20;
    border-radius: 9px;

    padding: 9px 15px;

    cursor: pointer;

    transition: .2s;
}

.reset-button:hover:not(:disabled) {
    border-color: var(--purple);
}

.reset-button:disabled {
    opacity: .4;
    cursor: not-allowed;
}


/* =========================================
   10. IMAGE PREVIEW GRID
   ========================================= */

.image-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 15px;

    width: 100%;
}

.image-card {
    min-width: 0;
    width: 100%;
}

.image-card h3 {
    font-size: 14px;

    margin-bottom: 10px;

    color: var(--muted);
}

.image-frame {
    width: 100%;

    background: #101020;

    border: 1px solid #ffffff15;
    border-radius: 13px;

    min-height: 180px;

    aspect-ratio: 4 / 3;

    position: relative;

    overflow: hidden;

    display: flex;

    justify-content: center;
    align-items: center;
}

.image-frame img,
.image-frame canvas {
    display: none;

    width: 100%;
    height: 100%;

    max-width: 100%;

    object-fit: contain;
}

.image-frame span {
    color: #77758e;

    font-size: 13px;
    text-align: center;

    padding: 10px;

    line-height: 1.5;
}


/* =========================================
   11. TRANSPARENT PNG PREVIEW
   ========================================= */

.image-grid .image-card:nth-child(2) .image-frame {

    background-color: #ffffff;

    background-image:
        linear-gradient(45deg, #d5d5d5 25%, transparent 25%),
        linear-gradient(-45deg, #d5d5d5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d5d5d5 75%),
        linear-gradient(-45deg, transparent 75%, #d5d5d5 75%);

    background-size: 20px 20px;

    background-position:
        0 0,
        0 10px,
        10px -10px,
        -10px 0;
}


/* =========================================
   12. EFFECTS SECTION
   ========================================= */

.effects-section {
    margin-top: 28px;
}

.effects-section h2 {
    line-height: 1.4;
}

.section-description {
    color: var(--muted);

    font-size: 13px;
    line-height: 1.6;

    margin-top: 7px;
    margin-bottom: 15px;
}


/* =========================================
   13. EFFECT BUTTON GRID
   ========================================= */

.effects-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 10px;

    width: 100%;
}

.effect-button {
    min-width: 0;

    background: var(--surface-light);

    border: 1px solid #ffffff12;
    border-radius: 12px;

    color: var(--text);

    padding: 14px 8px;

    cursor: pointer;

    font-size: 12px;
    line-height: 1.4;

    overflow-wrap: anywhere;

    transition: .2s;
}

.effect-button span {
    display: block;

    font-size: 23px;

    margin-bottom: 7px;
}

.effect-button:hover:not(:disabled) {
    border-color: var(--purple);
    transform: translateY(-2px);
}

.effect-button.active {
    border: 1px solid var(--purple);
    background: #45336c;
}

.effect-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}


/* =========================================
   14. DOWNLOAD BUTTON
   ========================================= */

.download-button {
    width: 100%;

    margin-top: 25px;

    padding: 16px;

    border: none;
    border-radius: 12px;

    background: linear-gradient(100deg, var(--purple), var(--pink));

    color: white;

    font-size: 15px;
    font-weight: 800;

    cursor: pointer;

    transition: .2s;
}

.download-button:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow: 0 8px 25px #9b70ff44;
}

.download-button:disabled {
    opacity: .4;
    cursor: not-allowed;
}


/* =========================================
   15. STATUS MESSAGE
   ========================================= */

.status-message {
    color: var(--cyan);

    font-size: 13px;
    line-height: 1.5;

    margin-top: 12px;

    min-height: 18px;

    text-align: center;

    overflow-wrap: anywhere;
}


/* =========================================
   16. FOOTER
   ========================================= */

footer {
    width: 100%;

    text-align: center;

    border-top: 1px solid #ffffff12;

    padding: 25px 15px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.6;
}


/* =========================================
   17. TABLET RESPONSIVE
   800px AND BELOW
   ========================================= */

@media (max-width: 800px) {

    .container {
        width: 92%;
    }

    .editor {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .upload-area {
        min-height: 220px;
        padding: 30px 20px;
    }

    .workspace {
        padding: 22px;
    }

    .effects-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero {
        padding: 60px 15px 40px;
    }

}


/* =========================================
   18. MOBILE RESPONSIVE
   500px AND BELOW
   ========================================= */

@media (max-width: 500px) {

    body {
        overflow-x: hidden;
    }

    .navbar {
        min-height: 65px;

        padding: 14px 5%;

        gap: 8px;
    }

    .logo {
        font-size: 16px;
    }

    .header-label {
        font-size: 10px;
    }

    .container {
        width: 92%;
    }

    .hero {
        padding: 45px 5px 30px;
    }

    .eyebrow {
        font-size: 10px;
        letter-spacing: 1.5px;

        margin-bottom: 14px;
    }

    .hero h1 {
        font-size: clamp(29px, 8vw, 36px);

        line-height: 1.2;

        margin-bottom: 15px;
    }

    .hero p {
        font-size: 13px;
        line-height: 1.7;
    }

    .editor {
        grid-template-columns: 1fr;

        gap: 18px;

        margin-bottom: 45px;
    }

    .upload-area {
        min-height: 210px;

        padding: 25px 15px;

        border-radius: 16px;
    }

    .upload-icon {
        font-size: 36px;
    }

    .upload-area h2 {
        font-size: 17px;
    }

    .upload-area p {
        font-size: 12px;
    }

    .upload-button {
        padding: 12px 22px;
        font-size: 13px;
    }

    .workspace {
        padding: 15px;

        border-radius: 16px;
    }

    .section-heading {
        margin-bottom: 17px;
    }

    .section-heading h2,
    .effects-section h2 {
        font-size: 17px;
    }

    .reset-button {
        padding: 8px 12px;
        font-size: 12px;
    }

    .image-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .image-card h3 {
        font-size: 13px;
    }

    .image-frame {
        min-height: 190px;

        aspect-ratio: 4 / 3;
    }

    .image-frame span {
        font-size: 12px;
    }

    .effects-section {
        margin-top: 25px;
    }

    .section-description {
        font-size: 12px;
        line-height: 1.6;
    }

    .effects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .effect-button {
        min-height: 78px;

        padding: 12px 5px;

        font-size: 11px;

        border-radius: 10px;
    }

    .effect-button span {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .download-button {
        margin-top: 20px;

        padding: 15px;

        font-size: 14px;
    }

    .status-message {
        font-size: 12px;
    }

    footer {
        padding: 22px 12px;
        font-size: 11px;
    }

}


/* =========================================
   19. SMALL MOBILE
   360px AND BELOW
   ========================================= */

@media (max-width: 360px) {

    .navbar {
        padding: 12px 4%;
    }

    .logo {
        font-size: 14px;
    }

    .header-label {
        font-size: 9px;
    }

    .container {
        width: 94%;
    }

    .hero h1 {
        font-size: 28px;
    }

    .workspace {
        padding: 12px;
    }

    .effects-grid {
        gap: 7px;
    }

    .effect-button {
        font-size: 10px;
        padding: 10px 4px;
    }

    .effect-button span {
        font-size: 20px;
    }

}


/* =========================================
   20. TOUCH DEVICE SUPPORT
   ========================================= */

@media (hover: none) and (pointer: coarse) {

    .upload-button,
    .effect-button,
    .download-button,
    .reset-button {
        -webkit-tap-highlight-color: transparent;
    }

    .effect-button:hover:not(:disabled),
    .download-button:hover:not(:disabled),
    .upload-button:hover {
        transform: none;
    }

}


/* =========================================
   21. ACCESSIBILITY
   ========================================= */

button:focus-visible,
.upload-button:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}


/* =========================================
   22. SEO CONTENT SECTION
   ========================================= */

.seo-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 80px;
    padding: 45px 35px;

    background: linear-gradient(
        145deg,
        #1b1b31dd,
        #252541aa
    );

    border: 1px solid #ffffff12;
    border-radius: 22px;

    position: relative;
    overflow: hidden;
}

/* Decorative glow */

.seo-content::before {
    content: "";
    position: absolute;

    top: -100px;
    right: -100px;

    width: 250px;
    height: 250px;

    background: var(--purple);
    opacity: 0.09;

    filter: blur(100px);
    pointer-events: none;
}

/* Section headings */

.seo-content h2 {
    position: relative;

    font-size: clamp(21px, 3vw, 27px);
    font-weight: 800;

    line-height: 1.4;

    margin-bottom: 14px;

    background: linear-gradient(
        90deg,
        var(--purple),
        var(--pink)
    );

    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Paragraphs */

.seo-content p {
    position: relative;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.9;

    margin-bottom: 32px;

    max-width: 850px;
}

/* Last paragraph */

.seo-content p:last-child {
    margin-bottom: 0;
}

/* Tablet */

@media (max-width: 800px) {

    .seo-content {
        padding: 35px 25px;
        margin-bottom: 55px;
    }

}

/* Mobile */

@media (max-width: 500px) {

    .seo-content {
        padding: 27px 20px;
        margin-bottom: 40px;
        border-radius: 16px;
    }

    .seo-content h2 {
        font-size: 20px;
        margin-bottom: 11px;
    }

    .seo-content p {
        font-size: 13px;
        line-height: 1.8;
        margin-bottom: 25px;
    }

}

/* =========================================
   END OF VISUAL LAB RESPONSIVE CSS
   ========================================= */
