*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

:root{
    --primary:#2563eb;
    --dark:#0f172a;
    --gray:#64748b;
    --light:#f8fafc;
    --white:#ffffff;
    --border:#e2e8f0;
}

body{
    font-family:Inter,Arial,sans-serif;
    background:var(--light);
    color:var(--dark);
}

a{
    text-decoration:none;
    color:inherit;
}

.container{
    width:90%;
    max-width:1200px;
    margin:auto;
}

/* HEADER */

header{
    background:white;
    border-bottom:1px solid var(--border);
    position:sticky;
    top:0;
    z-index:100;
}

.navbar{
    height:70px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.logo{
    display:flex;
    align-items:center;
    gap:10px;
}

.logo img{
    height:32px;
}

.menu{
    display:flex;
    gap:30px;
}

.menu a{
    color:var(--gray);
    transition:.3s;
}

.menu a:hover{
    color:var(--primary);
}

.btn{
    background:var(--primary);
    color:white;
    padding:12px 22px;
    border-radius:10px;
    border:none;
    cursor:pointer;
    transition:.3s;
}

.btn:hover{
    opacity:.9;
}

/* HERO */

.hero{
    padding:100px 0;
    text-align:center;
}

.hero h1{
    font-size:56px;
    margin-bottom:20px;
}

.hero p{
    max-width:700px;
    margin:auto;
    color:var(--gray);
    font-size:18px;
}

.hero-buttons{
    margin-top:35px;
    display:flex;
    justify-content:center;
    gap:15px;
}

/* FEATURES */

.section{
    padding:80px 0;
}

.section-title{
    text-align:center;
    margin-bottom:50px;
}

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:25px;
}

.card{
    background:white;
    border-radius:16px;
    padding:25px;
    border:1px solid var(--border);
}

.card h3{
    margin-bottom:10px;
}

/* STEPS */

.steps{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:25px;
}

.step{
    background:white;
    padding:25px;
    border-radius:16px;
    border:1px solid var(--border);
}

.step-number{
    width:40px;
    height:40px;
    border-radius:50%;
    background:var(--primary);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:15px;
}

/* FOOTER */

footer{
    padding:30px 0;
    border-top:1px solid var(--border);
    text-align:center;
    color:var(--gray);
    background:white;
}

/* AUTH */

.auth-page{
    min-height:calc(100vh - 70px);
    display:flex;
    justify-content:center;
    align-items:center;
}

.flip-card{
    width:420px;
    height:520px;
    perspective:1000px;
}

.flip-card-inner{
    width:100%;
    height:100%;
    position:relative;
    transform-style:preserve-3d;
    transition:0.8s;
}

.flip-card.flipped .flip-card-inner{
    transform:rotateY(180deg);
}

.flip-side{
    position:absolute;
    width:100%;
    height:100%;
    backface-visibility:hidden;
    background:white;
    border-radius:20px;
    padding:35px;
    border:1px solid var(--border);
}

.flip-back{
    transform:rotateY(180deg);
}

.auth-form{
    display:flex;
    flex-direction:column;
    gap:15px;
    margin-top:25px;
}

.auth-form input{
    padding:14px;
    border:1px solid var(--border);
    border-radius:10px;
}

.switch-link{
    margin-top:20px;
    color:var(--primary);
    cursor:pointer;
    text-align:center;
}

/* DASHBOARD */

.dashboard{
    padding:50px 0;
}

.welcome{
    margin-bottom:40px;
}

.project-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

.project-card{
    background:white;
    border:1px solid var(--border);
    border-radius:16px;
    padding:20px;
}

.create-project{
    border:2px dashed var(--primary);
    text-align:center;
    cursor:pointer;
}

/* BUILDER */

.builder{
    height:calc(100vh - 70px);

    display:grid;

    grid-template-columns:250px 1fr 300px;

    overflow:hidden;
}

.panel{
    background:white;
    border-right:1px solid var(--border);

    padding:20px;

    height:100%;

    overflow-y:auto;
}

.panel-right{
    border-left:1px solid var(--border);
    border-right:none;
}

.component{
    padding:12px;
    border:1px solid var(--border);
    border-radius:10px;
    margin-bottom:10px;
    cursor:pointer;
}

.canvas{
    padding:20px;

    background:#eef2ff;

    overflow-y:auto;

    height:100%;
}

.website-preview{
    width:100%;
    height:100%;
    background:white;
    border-radius:16px;
    border:2px dashed #cbd5e1;
    padding:20px;
}

.preview-block{
    height:70px;
    border:1px dashed #94a3b8;
    border-radius:10px;
    margin-bottom:15px;
}

@media(max-width:900px){

    .builder{
        grid-template-columns:1fr;
    }

    .panel-right{
        display:none;
    }

    .steps{
        grid-template-columns:1fr;
    }

    .hero h1{
        font-size:40px;
    }
}

/* ==========================
   BUILDER V2
========================== */

.empty-state{
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#94a3b8;
    font-size:18px;
}

.builder-block{
    background:white;
    border:1px solid #e2e8f0;
    border-radius:16px;
    margin-bottom:16px;
    overflow:hidden;
}

.block-toolbar{
display:flex;
justify-content:flex-end;
align-items:center;
padding:10px;
}

.block-actions{
    display:flex;
    gap:8px;
}

.block-actions button{
    border:none;
    background:white;
    width:34px;
    height:34px;
    border-radius:8px;
    cursor:pointer;
}

.block-actions button:hover{
    background:#eef2ff;
}

.hidden-block{
    display: none !important;
}

.structure-list{
    list-style:none;
    margin-top:20px;
}

.structure-list li{
    padding:12px;
    margin-bottom:8px;
    background:#f8fafc;
    border-radius:10px;
    border:1px solid #e2e8f0;
}

.demo-header{
    display:flex;
    justify-content:space-between;
    padding:20px;
}

.demo-hero{
    padding:60px 30px;
    text-align:center;
}

.demo-hero h1{
    margin-bottom:10px;
}

.demo-hero button{
    margin-top:15px;
    padding:10px 18px;
}

.demo-section{
    padding:30px;
}

.demo-section h2{
    margin-bottom:15px;
}

.demo-grid{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:15px;
}

.editable-card{
    width:calc(33.333% - 10px);
}

.demo-grid div{
    background:#f8fafc;
    padding:20px;
    border-radius:10px;
    border:1px solid #e2e8f0;
}

.demo-footer{
    text-align:center;
    padding:25px;
}

.demo-section input{
    width:100%;
    padding:12px;
    margin-bottom:10px;
    border:1px solid #e2e8f0;
    border-radius:10px;
}

.demo-section button{
    padding:12px 18px;
}

.builder-block.dragging{
    opacity:.5;
}

/* ==========================
   SETTINGS PANEL
========================== */

.settings-panel{
    margin-top:30px;
    border-top:1px solid #e2e8f0;
    padding-top:20px;
}

.settings-empty{
    color:#94a3b8;
    margin-top:15px;
}

.setting-group{
    margin-bottom:15px;
}

.setting-group label{
    display:block;
    font-size:14px;
    margin-bottom:6px;
}

.setting-group input,
.setting-group textarea,
.setting-group select{
    width:100%;
    padding:10px;
    border:1px solid #e2e8f0;
    border-radius:10px;
}

.setting-group textarea{
    resize:vertical;
    min-height:80px;
}

.selected-block{
    outline:3px solid #2563eb;
}

.image-preview{
    width:100%;
    margin-top:10px;
    border-radius:10px;
    overflow:hidden;
}

.image-preview img{
    width:100%;
    display:block;
}

.color-row{
    display:flex;
    gap:10px;
}

.color-row input{
    height:45px;
    padding:0;
}

.hero-image{
    width:100%;
    border-radius:12px;
    margin-bottom:20px;
}

.stats-section{
    padding:40px 0;
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
}

.stat-card{
    background:white;
    padding:30px;
    border-radius:18px;
    border:1px solid #e2e8f0;
    text-align:center;
}

.stat-card h3{
    font-size:32px;
    color:#2563eb;
}

.sidebar-tabs{
    display:flex;
    gap:8px;
    margin-bottom:20px;
}

.tab-btn{
    flex:1;
    border:none;
    background:#f1f5f9;
    padding:10px;
    border-radius:10px;
    cursor:pointer;
}

.tab-btn.active{
    background:#2563eb;
    color:white;
}

.auth-page{
    min-height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;

    background:
        radial-gradient(circle at top left,#60a5fa 0%,transparent 40%),
        radial-gradient(circle at bottom right,#2563eb 0%,transparent 40%),
        #f8fafc;
}

.auth-card{
    width:100%;
    max-width:430px;

    background:rgba(255,255,255,.92);
    backdrop-filter:blur(18px);

    border-radius:28px;

    padding:40px;

    box-shadow:
        0 25px 60px rgba(15,23,42,.15);

    border:1px solid rgba(255,255,255,.5);
}

.auth-card h1{
    text-align:center;
    margin-bottom:10px;
}

.auth-subtitle{
    text-align:center;
    color:#64748b;
    margin-bottom:25px;
}

.auth-form{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.auth-form input{
    padding:14px 16px;
    border:1px solid #dbe4f0;
    border-radius:14px;
    font-size:15px;
    transition:.3s;
}

.auth-form input:focus{
    outline:none;
    border-color:#2563eb;

    box-shadow:
        0 0 0 4px rgba(37,99,235,.15);
}

.auth-form .btn{
    margin-top:10px;
}

.auth-footer{
    text-align:center;
    margin-top:25px;
}

.auth-footer a{
    color:#2563eb;
    font-weight:600;
}

.auth-error{
    background:#fee2e2;
    color:#b91c1c;

    padding:12px;
    border-radius:12px;

    margin-bottom:15px;
}



.structure-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
}

.structure-actions{
    display:flex;
    gap:5px;
}

.structure-actions button{
    border:none;
    background:#fff;
    width:30px;
    height:30px;
    border-radius:6px;
    cursor:pointer;
}

.structure-actions button:hover{
    background:#eef2ff;
}



.structure-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.structure-actions {
    display: flex;
    gap: 6px;
}

.structure-actions button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
}

.structure-title {
    flex: 1;
}

.structure-item {
    list-style: none;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.text-setting{
    border-left:4px solid #2563eb;
    padding-left:12px;
    margin-bottom:20px;
}

.header-logo{
    height:50px;
    object-fit:contain;
}

.gallery-slider{
    position:relative;
    height:400px;
}

.gallery-image{

    position:absolute;

    width:100%;
    height:100%;

    object-fit:cover;

    opacity:0;

    transition:.5s;
}

.gallery-image.active{
    opacity:1;
}

#saveBtn{
min-width:160px;
}

#saveBtn:hover{
transform:translateY(-1px);
}

#saveToast{

position:fixed;

top:20px;

right:20px;

background:#16a34a;

color:white;

padding:14px 20px;

border-radius:12px;

font-weight:600;

opacity:0;

transform:
translateY(-20px);

transition:.3s;

z-index:99999;

}

#saveToast.show{

opacity:1;

transform:
translateY(0);

}


.project-modal{

position:fixed;

inset:0;

background:rgba(0,0,0,.5);

display:flex;

align-items:center;

justify-content:center;

z-index:9999;

}

.project-box{

background:white;

padding:40px;

border-radius:16px;

width:420px;

display:flex;

flex-direction:column;

gap:20px;

}

.project-box input{

padding:14px;

font-size:16px;
width:420px;

}

.project-actions{

display:flex;

gap:12px;

}

.projectName{
    width: 400px;
}