﻿.menu-item .btn {
  color: #fff;              /* bela boja teksta */
  text-decoration: none;    /* uklanja donju crtu */
  background: transparent;  /* ako ne želiš pozadinu */
  border-radius: 4px;
  cursor: pointer;
}

.menu-item .btn:hover {
  text-decoration: none;    /* i na hover bez crte */
  color: #ddd;              /* malo svetlija nijansa na hover */
}

.checkbox-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* dve kolone */
    margin-top: 5px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 5px; /* razmak između checkboxa i labela */
}
#cardCanvas {
    box-shadow: 0px 0px 40px rgba(0,0,0,0.35);
}

.empty-info {
    font-size: 11px;
}

#undoRedoBox {
    display: flex;
    gap: 8px;
}

#undoBtn, #redoBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-right: 8px;
}

    body {
        margin: 0;
        font-family: Arial, sans-serif;
background: var(--bg-body);
    }

:root {
    --bg-header: #f0f0f0;
    --bg-panel: #ffffff;
    --bg-dropdown: rgba(255, 255, 255, 0.85); /* bela sa providnošću */
    --bg-sidebar: rgba(255, 255, 255, 0.85); /* bela sa providnošću */
    --text-color: #000000;
    --border-color: #cccccc;
    --menu-hover: #e0e0e0;
    --toggle-bg: #ffffff;
    --toggle-icon: #000000;
    --btn-bg: #f0f0f0;
    --btn-color: #000;
    --menu-bg: rgba(255, 255, 255, 0.85); /* bela sa providnošću */
--full-bg: #ffffff;
--full-color: #000000;
}

body.dark {
    --bg-header: #000000;
    --bg-panel: #1a1a1a;
    --bg-dropdown: rgba(0, 0, 0, 0.85); /* crna sa providnošću */
    --bg-sidebar: rgba(0, 0, 0, 0.85); /* crna sa providnošću */
    --text-color: #ffffff;
    --border-color: #444444;
    --menu-hover: #333333;
    --toggle-bg: #333333;
    --toggle-icon: #ffffff;
    --btn-bg: #333;
    --btn-color: #fff;
    --menu-bg: rgba(0, 0, 0, 0.85); /* crna sa providnošću */
--full-bg: #222;
--full-color: #FFFFFF;

    background-color: #333;   /* ⭐ mora biti NA KRAJU */
}

.header-footer {
    font-size: 14px;

    pointer-events: none;
}

/* meni */
.menu {
    display: flex;
    align-items: center;
    gap: 2px;
}


    .menu-item {
        position: relative;

        cursor: pointer;
        font-size: 14px;
        padding: 6px 10px;
        border-radius: 4px;
    }

    .menu-item:hover {
    background: var(--menu-hover);
    }

    .dropdown {
        position: absolute;
        top: 45px;
        left: 0;
    background: var(--bg-dropdown);
    color: var(--text-color);
        min-width: 190px;
        border-radius: 6px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        display: none;
        flex-direction: column;
        padding: 10px;
        z-index: 999999;
    }

    .menu-item.open .dropdown {
        display: flex;
    }

    .dropdown label {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .dropdown input,
    .dropdown select {
        margin-bottom: 10px;
        padding: 4px 6px;

        font-size: 12px;
    }

    .dropdown button {
        padding: 6px;
        background: #ff0000;
        color: #fff;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        margin-bottom: 6px;
        font-size: 12px;
    }

    .dropdown button.secondary {
        background: #c0392b;
    }

    .dropdown button.danger {
        background: #c0392b;
    }

.wrapper {
    position: fixed;
    top: 60px; /* visina menija */
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;   /* centriranje canvasa */
    align-items: center;       /* vertikalno centriranje */
    gap: 10px;
    padding: 10px;
    overflow: hidden;          /* nema skrolovanja */
}

canvas {
    height: calc(100vh - 80px); /* 60px header + 20px padding */
    width: auto;                /* čuva proporciju 1024×768 */
    background: #fff;
    border: 1px solid #ccc;
    touch-action: none;
    display: block;
}

    .layer-list {
        max-height: 200px;
        overflow-y: auto;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 4px;
        margin-bottom: 8px;
    }

    .layer-item {
        padding: 4px 6px;
        margin-bottom: 4px;
        border-radius: 4px;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .layer-item.active {
        background: #007bff;
        color: #fff;
    }

    .layer-item span {
        font-size: 11px;
    }
    .sidebar button {
        width: 100% !importannt;
        margin-bottom: 4px;
        font-size: 11px;
        padding: 4px;
    }

.sidebaar button {
  width: 100%;
  margin-bottom: 4px;
  font-size: 11px;
  padding: 4px;
}

.sidebar input[type="color"] {
  width: 100%;
  height: 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  background: transparent;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.sidebar input[type="range"] {
  width: 100%;
/*  margin-bottom: 8px;*/
  -webkit-appearance: none;
  background: transparent;
}

/* linija (track) */
.sidebar input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right, #ff0000, #ff9900);
  border-radius: 3px;
}
.sidebar input[type="range"]::-moz-range-track {
  height: 6px;
  background: linear-gradient(to right, #ff0000, #ff9900);
  border-radius: 3px;
}

/* kružić (thumb) */
.sidebar input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid #00ccff;
  border-radius: 4px; /* blago zaobljen kvadrat */
  box-shadow: 0 0 8px #00ccff;
  cursor: pointer;
  margin-top: -6px;
}
.sidebar input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid #00ccff;
  border-radius: 4px;
  box-shadow: 0 0 8px #00ccff;
  cursor: pointer;
}


    .grid-overlay-toggle {
        margin-bottom: 6px;
    }

    .small-label {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .checkbox-row {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-bottom: 4px;
        font-size: 11px;
    }

    .checkbox-row input {
        margin: 0;
    }

    .dropdown * {
        pointer-events: auto !important;
    }
.canvas-footer {
    position: fixed;
    bottom: 10px;        /* malo iznad dna ekrana */
    right: 10px;         /* skroz desno */
    font-size: 14px;
    color: #FFFFFF;      /* bela boja */
    background: rgba(0,0,0,0.4);
    padding: 6px 12px;
    border-radius: 6px;
    pointer-events: none;
    z-index: 999999;     /* da bude iznad svega */
}
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--toggle-bg, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.3s ease;
}

.toggle-icon {
    width: 22px;
    height: 22px;
    background: var(--toggle-icon, #000000);
    border-radius: 50%;
    transition: transform 0.4s ease, background 0.3s ease;
}

/* ANIMACIJA — DARK MODE */
body.dark .toggle-icon {
    transform: rotate(180deg);
    background: #ffffff;
}

body.dark .resetAllBtn,
body.light .resetAllBtn {
    background-color: #d60000 !important;
    color: #ffffff !important;
}


.layer-item {
    display: flex;
    align-items: center;
}

.layer-item .delete-layer,
.layer-item .lock-icon {
    margin-left: auto;
}
.panel-section-title {
    font-size: 12px;       /* ⭐ veći font */
    font-weight: bold;     /* ⭐ deblja slova */
    text-transform: uppercase; /* ⭐ velika slova */
    margin-top: 10px;      /* ⭐ razmak iznad */
    margin-bottom: 10px;   /* ⭐ razmak ispod */
}

.color-panel {
    display: none;
    position: absolute;
    bottom: 45px; /* ⭐ paleta iznad dugmeta */
    left: 0;
    background: #222;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px #000;
    z-index: 99999;
    white-space: nowrap;
    pointer-events: auto;
}

.color-panel .color {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    margin: 4px;
    cursor: pointer;
    display: inline-block;
    border: 2px solid #fff;
}

.color-panel .color:hover {
    transform: scale(1.2);
}


#colorWrapper {
    pointer-events: none;
}

#openColorPalette {
    pointer-events: auto;
}
.modal-color {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
}

.modal-content {
    background: #222;
    padding: 20px;
    border-radius: 12px;
    width: 260px;
    margin: 120px auto;
    color: #fff;
    text-align: center;
    box-shadow: 0 0 20px #000;
}

.modal-content input[type=color] {
    width: 100%;
    height: 60px;
    border: none;
    outline: none;
    background: transparent;
    cursor: pointer;
}
#bringToFrontBtn,
#sendToBackBtn {
    width: 48%;
}

#bringToFrontBtn,
#sendToBackBtn {
    display: inline-block;
}
.rotateButtons {
    display: flex;
    gap: 8px;
}

.rotateButtons button {
    flex: 1;
}
.scaleButtons {
    display: flex;
    gap: 8px;
}

.scaleButtons button {
    flex: 1;
}
.layerButtons {
    display: flex;
    gap: 8px;
}

.layerButtons button {
    flex: 1;
}

.fileUploadLabel {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#bgUpload {
    display: none; /* sakrij default input */
}

#fileUploadText {
    padding: 6px 10px;
    background: #eee;
    border-radius: 4px;
    font-size: 12px;
    color: #000000;
    width: 100% !important;
}

.decorUploadLabel {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#decorUpload {
    display: none; /* sakrij default input */
}

#decorUploadText {
    padding: 6px 10px;
    background: #eee;
    border-radius: 4px;
    font-size: 12px;
    color: #000000;
    width: 100% !important;
}
.resetSection {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #444; /* mala linija iznad dugmeta */
}

.resetAllBtn {
   background-color: #d60000; /* jaka crvena */
    color: #ffffff;            /* bela slova */
    border: none;
    padding: 12px 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
font-size: 17px !important;
}

.resetAllBtn:hover {
    background-color: #b50000; /* tamnija crvena */
}

.openSidebarBtn {
  position: fixed;
  top: 60px; /* ispod headera */
  right: 0;
  z-index: 999999;
  width: 30px;
  height: calc(100% - 60px);
  background: #ff0000;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: right 0.3s ease;
}

.arrowIcon {
  transition: transform 0.3s ease;
}

.openSidebarBtn.flipped .arrowIcon {
  transform: rotate(180deg);
}

.sidebar {
  position: fixed;
  top: 40px;
  right: -360px;
  width: 200px;
  height: calc(100vh - 80px);
  background: var(--bg-sidebar);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  box-shadow: -4px 0 12px rgba(0,0,0,0.25);
  padding: 20px;
  overflow-y: auto;
  transition: right 0.35s ease;
  z-index: 9999;
}

.sidebar.open {
  right: 26px;
}


.downloadSection {
    margin-top: 5px;
    border-top: 1px solid #444; /* mala linija iznad dugmeta */
}

/* CANVAS FULLSCREEN */
canvas:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain !important;
    background: #000 !important;
    display: block !important;
    margin: 0 auto !important;

    /* KLJUČNO */
    pointer-events: none !important;
    z-index: 1 !important;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;              /* proteže se od ivice do ivice */
    height: 60px;
    background: var(--bg-header);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: flex-start; /* sve ide levo */
    padding: 0 20px;
    z-index: 99999;
}

/* leva strana: dugmad + meni */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px; /* razmak između dugmadi i menija */
}

/* Dugme za dan/noć */
.theme-toggle {
    background: var(--btn-bg);
    color: var(--btn-color);
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
}

/* Hamburger dugme */
.hamburger {
    font-size: 28px;
    background: var(--btn-bg);
    color: var(--btn-color);
    border: none;
    cursor: pointer;
    border-radius: 5px;
    display: none; /* desktop default */
}

/* Mobilni i tablet */
@media (max-width: 768px) {
    .hamburger {
        display: block; /* vidi se pored themeToggle */
    }

    .menu {
        display: none;
        flex-direction: column;
        background: var(--menu-bg);
        position: fixed;       /* fiksirano na ekranu */
        top: 60px;             /* ispod headera */
        left: 0;               /* levo poravnato */
        width: 100px;          /* širina menija */
        height: calc(100% - 60px); /* zauzima ceo ekran ispod headera */
        padding: 15px;
        z-index: 9999;
        box-shadow: 2px 0 8px rgba(0,0,0,0.3);
    }

    .menu.show {
        display: flex;
    }
}

/* Mobilni ekrani – centriraj dropdown */
@media (max-width: 768px) {
  .dropdown {
    position: fixed;
    top: 70px;
    left: 35%;
    transform: translateX(-50%);
    width: 40%;
    max-width: 200px;
    background: var(--bg-dropdown);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    padding: 10px;
    z-index: 99999;
  }
}


.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1000;
}
.overlay.show {
  display: block;
}
#fullscreenBtn {
  position: absolute;
  top: 11px;
  right: 55px;
  padding: 10px 20px;
  background: var(--full-bg);
  color: var(--full-color);
  border: none;
  cursor: pointer;
}
#fullscreenBtn:hover {
  background: #ff0000;
}
#wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}
.screenshotBtn {
   background-color: #d60000; /* jaka crvena */
    color: #ffffff;            /* bela slova */
    border: none;
    padding: 12px 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
font-size: 15px !important;
margin-top: 10px !important;
}

.screenshotBtn:hover {
    background-color: #b50000; /* tamnija crvena */
}

.resetAllBtn {
   background-color: #d60000; /* jaka crvena */
    color: #ffffff;            /* bela slova */
    border: none;
    padding: 12px 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
font-size: 15px !important;
}

.resetAllBtn:hover {
    background-color: #b50000; /* tamnija crvena na hover */
}

.emoji-picker button {
  background: transparent;   /* nema pozadine */
  border: none;              /* nema okvira */
  font-size: 16px;           /* veći emoji */
  cursor: pointer;           /* pokazivač ruke */
}

.emoji-picker button:hover {
  transform: scale(1.2);     /* malo uvećanje na hover */
}
.actionSection {
  display: flex;
  gap: 10px;          /* razmak između dugmadi */
}

.resetAllBtn,
.screenshotBtn {
  flex: 1;            /* iste širine oba dugmeta */
  padding: 8px 12px;
}

#decorPreview {
  display: flex;
  justify-content: center;   /* centriraj horizontalno */
  align-items: center;       /* centriraj vertikalno */
  margin-top: 10px;
}

#decorThumb {
  max-height: 200px;         /* maksimalna visina */
  max-width: 100%;           /* da se ne prelije */
  object-fit: contain;       /* zadrži proporcije */
  display: none;             /* sakrij dok nema slike */
}
#bgPreview {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

#bgThumb {
  max-height: 150px;
  object-fit: contain;
}