:root {
    --panel-w: 240px;
    --accent: #2563eb;
    --muted: #6b7280;
    /* --bg: #f8fafc; */
    --bg: transparent;
}

body {
    margin: 0;
    font-family: Inter, system-ui, Arial;
    background: transparent;
    color: #111827;
}

.main-header {
    position: fixed;
    width: 100%;
    z-index: 99;
    height: auto;
    background-color: #d2e5fa;
    padding: 0;
    box-sizing: border-box;
}

.top-buttons-box{
    display: flex;
    gap: 5px;
    padding-left: 12px;
    padding-right: 12px;
    /* justify-content:flex-start; */
    flex-wrap:nowrap;
    background-color: white;
    width:100%;
    border-top:10px solid #ffffff;
    padding-bottom:10px;
    overflow-x: auto;
    scrollbar-width:none;
}
.top-btn{
    flex: 0 0 auto;
}

.app-body {
    position: relative;
    top: 110px;
    left: 0;
    width: 100%;
}


.app {
    display: grid;
    grid-template-columns: var(--panel-w) 1fr var(--panel-w);
    gap: 14px;
    height: 100vh;
    padding: 12px;
    box-sizing: border-box;
}

.panel,
.rightpanel {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(2, 6, 23, 0.06);
    overflow: auto;
}

h3 {
    margin: 8px 0 12px 0;
    font-size: 14px;
    border-bottom: 1px solid #cccccc;
    padding-bottom: 5px;
}

.preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

/*.preset { border:1px solid #e6edf6; padding:8px; border-radius:6px; width:calc(50% - 8px); cursor:pointer; text-align:center; font-size:12px; }*/
.preset {
    background: #fff;
    width: 80px;
    height: 50px;
    padding: 5px;
    border: 1px solid #ddd;
    text-align: center;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.7rem;
    transition: .2s;
}

.preset:hover {
    background: #eef;
    transform: scale(1.05);
    cursor: pointer;
}

.preset small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
    font-size: 11px;
}

.controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.controls>* {
    flex: 1;
    min-width: 0;
}

input[type=file] {
    display: block;
}

.btn {
    background: var(--accent);
    color: white;
    padding: 4px 6px;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    font-size: 13px;
}

.btn.secondary {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #111827;
}

.secondary-icon {
    background: #fff;
    color: #111827;
    border-radius: 8px;
    padding: 0 !important;
    border: 0;
    cursor: pointer;
    font-size: 13px;
}

.btn-group{
    background: #fff;
    border: 1px solid #e2e8f0 !important;
    color: #111827;
    width: 125px;
    padding: 4px 6px;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    font-size: 13px;
}

canvas {
  background-color: transparent !important;
}

#canvas-container {
    background:transparent;
    border:1px solid #f9f9f9;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: self-start;
    justify-content: flex-start;
    /* height: calc(100vh - 48px); */
    height:100vh;
    box-sizing: border-box;
    overflow: auto;
}

#c {
    border: 1px dashed #e2e8f0;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

label {
    font-size: 13px;
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
}

.row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.slider {
    width: 100%;
}

.layers {
    list-style: none;
    padding: 0;
    margin: 0;
}

.layer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #eef2ff;
    margin-bottom: 8px;
    background: #fafcff;
    font-size: 13px;
}

.small {
    font-size: 12px;
    color: var(--muted);
}

.icon {
    cursor: pointer;
    margin-left: 8px;
}

.muted {
    color: var(--muted);
}

.footer {
    margin-top: 10px;
    display: flex;
    font-size: 13px;
    color: var(--muted);
    width:100%;
    /* background-color: #2563eb; */
}

input[type=text],
select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #e6edf6;
    width: 100%;
    box-sizing: border-box;
}

.flexcol {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flexrow {
    display: flex;
    gap: 8px;
}

#banner-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.banner-example {
    background: #fff;
    width: 180px;
    height: 100px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
    transition: .2s;
}

.banner-example:hover {
    background: #eef;
    transform: scale(1.05);
    cursor: pointer;
}

.no-border {
    border: 0 !important;
}

.border-top {
    border-top: 1px solid #555555
}

.padding-12 {
    padding: 12px;
}

.counter-box {
    color: #aaaaaa;
    width: 100%;
    font-size: 10px;
    background-color: #f0f0f0;
    text-align: center;
    display: flex;
    /* justify-content: space-between; */
    justify-content: center;
}


/* Mobile layout (1 columns) */
@media (max-width: 767px) {
  .panel {
    height: 25vh;
  }
  .rightpanel {
    min-height: 5vh;
  }
}
@media (min-width: 200px) {
  .app {
    grid-template-columns: 1fr;
  }
}
/* Tablet layout (2 columns) */
@media (min-width: 768px) {
  .app {
    grid-template-columns: var(--panel-w) 1fr;
  }
  .rightpanel {
    width: calc(100vw - 15px);
    min-height: 5vh;
  }
}

/* Desktop layout (3 columns with panel) */
@media (min-width: 1024px) {
  .app {
    grid-template-columns: var(--panel-w) 1fr var(--panel-w);
  }
  .rightpanel {
    width: inherit;
  }
}