*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Arial,sans-serif;
}

html{
  scroll-behavior:smooth;
}

body{
  background:#111827;
  color:white;
  padding-top:80px;
  overflow-x:hidden;
  min-height:100vh;
}

/* ================= HEADER ================= */

.site-header{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:80px;
  background:#0f172a;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 25px;
  z-index:999;
  border-bottom:1px solid #334155;
  box-shadow:0 4px 20px rgba(0,0,0,0.35);
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand img{
  width:58px;
  height:58px;
  border-radius:12px;
  background:white;
  padding:4px;
  object-fit:contain;
  box-shadow:0 4px 12px rgba(0,0,0,0.3);
}

.brand-text h1{
  font-size:22px;
  color:white;
  font-weight:700;
}

.brand-text p{
  color:#cbd5e1;
  font-size:13px;
  margin-top:2px;
}

/* ================= NAVIGATION ================= */

.nav{
  display:flex;
  align-items:center;
  gap:10px;
}

.nav a,
.dropbtn{
  color:white;
  text-decoration:none;
  background:none;
  border:none;
  cursor:pointer;
  padding:10px 14px;
  border-radius:8px;
  font-size:14px;
  transition:0.3s;
}

.nav a:hover,
.dropbtn:hover{
  background:#1e293b;
  color:#c084fc;
}

.dropdown{
  position:relative;
}

.dropdown-content{
  display:none;
  position:absolute;
  top:48px;
  left:0;
  background:#1e293b;
  min-width:240px;
  border-radius:12px;
  overflow:hidden;
  z-index:999;
  border:1px solid #334155;
  box-shadow:0 8px 20px rgba(0,0,0,0.4);
}

.dropdown-content a{
  display:block;
  padding:12px 14px;
  color:white;
  text-decoration:none;
  transition:0.3s;
}

.dropdown-content a:hover{
  background:#334155;
  padding-left:18px;
}

.dropdown:hover .dropdown-content{
  display:block;
}

/* ================= MOBILE MENU ================= */

.menu-toggle{
  display:none;
  background:#334155;
  border:none;
  color:white;
  padding:10px 14px;
  border-radius:8px;
  cursor:pointer;
  font-size:18px;
  transition:0.3s;
}

.menu-toggle:hover{
  background:#475569;
}

/* ================= MAIN LAYOUT ================= */

.editor-layout{
  display:flex;
  min-height:calc(100vh - 80px);
}

/* ================= LEFT PANEL ================= */

#left-panel{
  width:250px;
  background:#1e293b;
  padding:20px;
  border-right:1px solid #334155;
}

#left-panel h3{
  margin-bottom:15px;
  color:#f8fafc;
  font-size:18px;
}

.left-btn{
  width:100%;
  padding:11px;
  margin-bottom:10px;
  border:none;
  border-radius:10px;
  background:#334155;
  color:white;
  cursor:pointer;
  transition:0.3s;
  font-size:14px;
}

.left-btn:hover{
  background:#475569;
  transform:translateY(-1px);
}

input[type="file"].left-btn{
  padding:8px;
}

input[type="color"]{
  height:45px;
  cursor:pointer;
}

/* ================= CENTER CANVAS ================= */

#container{
  flex:1;
  padding:25px;
  text-align:center;
}

#container h2{
  margin-bottom:20px;
  font-size:28px;
  color:#f8fafc;
}

.canvas-wrapper{
  position:relative;
  background:#0f172a;
  border-radius:20px;
  padding:20px;
  display:inline-block;
  box-shadow:0 10px 35px rgba(0,0,0,0.4);
  border:1px solid #334155;
}

canvas{
  background:white;
  border-radius:12px;
  max-width:100%;
  border:2px solid #334155;
}

/* ================= CROP BOX ================= */

#crop-box{
  position:absolute;
  border:2px dashed #22c55e;
  background:rgba(34,197,94,0.15);
  display:none;
  cursor:move;
  z-index:100;
}

/* ================= RIGHT PANEL ================= */

#right-panel{
  width:340px;
  background:#1e293b;
  padding:20px;
  border-left:1px solid #334155;
}

/* ================= TABS ================= */

.tabs{
  display:flex;
  gap:10px;
  margin-bottom:10px;
}

.tab{
  flex:1;
  text-align:center;
  padding:12px;
  background:#334155;
  border-radius:10px;
  cursor:pointer;
  transition:0.3s;
  font-weight:600;
  user-select:none;
}

.tab:hover{
  background:#475569;
}

.tab.active{
  background:linear-gradient(135deg,#8b5cf6,#ec4899);
  color:white;
}

/* ================= TAB CONTENT ================= */

.tab-content{
  display:none;
  margin-top:20px;
}

.tab-content.active{
  display:block;
}

.panel-scroll,
.effects-scroll{
  max-height:520px;
  overflow-y:auto;
  padding-right:5px;
}

/* ================= SCROLLBAR ================= */

.panel-scroll::-webkit-scrollbar,
.effects-scroll::-webkit-scrollbar{
  width:8px;
}

.panel-scroll::-webkit-scrollbar-thumb,
.effects-scroll::-webkit-scrollbar-thumb{
  background:#64748b;
  border-radius:20px;
}

.panel-scroll::-webkit-scrollbar-track,
.effects-scroll::-webkit-scrollbar-track{
  background:#1e293b;
}

/* ================= PANEL BUTTONS ================= */

.panel-buttons button{
  width:100%;
  padding:10px;
  margin-bottom:10px;
  border:none;
  border-radius:10px;
  background:#334155;
  color:white;
  cursor:pointer;
  transition:0.3s;
  font-size:14px;
}

.panel-buttons button:hover{
  background:#475569;
  transform:translateY(-2px);
}

/* ================= BEAUTY PANEL ================= */

.beauty-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.beauty-grid button{
  background:linear-gradient(135deg,#ec4899,#8b5cf6);
  color:white;
  font-weight:600;
}

.beauty-grid button:hover{
  background:linear-gradient(135deg,#f472b6,#a855f7);
  transform:translateY(-2px) scale(1.02);
}

/* ================= EFFECT GROUP ================= */

.effect-group{
  background:#0f172a;
  border:1px solid #334155;
  border-radius:14px;
  padding:14px;
  margin-bottom:16px;
}

.effect-group h3{
  margin-bottom:12px;
  font-size:15px;
  color:#f8fafc;
}

.effect-group button{
  width:100%;
  margin-bottom:8px;
  padding:10px;
  border:none;
  border-radius:10px;
  background:linear-gradient(135deg,#334155,#1e293b);
  color:white;
  cursor:pointer;
  transition:0.3s;
  font-size:13px;
}

.effect-group button:hover{
  background:linear-gradient(135deg,#8b5cf6,#ec4899);
  transform:translateY(-2px);
}

/* ================= CLEAR BUTTON ================= */

#clearEffects{
  background:linear-gradient(135deg,#ef4444,#dc2626);
  color:white;
  font-weight:700;
}

#clearEffects:hover{
  background:linear-gradient(135deg,#f87171,#ef4444);
}

/* ================= MOBILE RESPONSIVE ================= */

@media(max-width:1000px){

  .editor-layout{
    flex-direction:column;
  }

  #left-panel,
  #right-panel{
    width:100%;
    border:none;
  }

  #right-panel{
    border-top:1px solid #334155;
  }

  #left-panel{
    border-bottom:1px solid #334155;
  }
}

@media(max-width:900px){

  .menu-toggle{
    display:block;
  }

  .nav{
    display:none;
    position:absolute;
    top:80px;
    left:0;
    width:100%;
    flex-direction:column;
    background:#0f172a;
    padding:20px;
    border-top:1px solid #334155;
  }

  .nav.show{
    display:flex;
  }

  .dropdown{
    width:100%;
  }

  .dropdown-content{
    position:relative;
    top:0;
    width:100%;
    margin-top:5px;
  }

  .site-header{
    padding:0 15px;
  }

  .brand-text h1{
    font-size:18px;
  }

  .brand img{
    width:50px;
    height:50px;
  }
}

@media(max-width:600px){

  #container{
    padding:15px;
  }

  .canvas-wrapper{
    padding:10px;
  }

  .beauty-grid{
    grid-template-columns:1fr;
  }

  .tab{
    font-size:13px;
    padding:10px;
  }

  .left-btn{
    font-size:13px;
  }
}
