/* === GLOBALZ === */



body {
    --bg-color: #6D6DDF; /* dynamiczny kolor */
    background-color: var(--bg-color);
    background-image: url('pic/backgrounds/black-orchid.png'), linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.2));
    background-repeat: repeat; /* zmienione z no-repeat na repeat dla ukafelkowania */
    background-attachment: fixed;
    background-size: auto; /* dla obrazka używamy auto aby się ukafelkował */
    background-blend-mode: overlay;
    
    color: #e5e7eb;
    margin: 0;
    padding: 0.5rem;
    min-height: 100vh;
}



.main-container {
    border: 2px solid black;
	border-radius: 5px;
    background: 
        linear-gradient(rgba(50, 50, 50, 0.3), rgba(50, 50, 50, 0.3)),
        url('./pic/tilebg.png') repeat;
    background-size: 100px 100px; /* Dokładny rozmiar kafla */
    padding: 8px;
    width: fit-content;
    height: auto;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    color: white;
    min-height: 300px; /* Minimalna wysokość aby zobaczyć efekt */
}

@font-face {
    font-family: "blox2";
    src: url("fonts/blox2.ttf") format("truetype");
}

/* === TYPOGRAFIA I KOLORY KOMUNIKATÓW === */
.title {
    text-align: center;
    font-family: "blox2", sans-serif;
    font-size: 4.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    color: #a18102;
    cursor: default;
    animation: flicker 9s infinite step-end;
    background-color: #1b102b;
    background: linear-gradient(0deg, rgba(2, 0, 36, 1) 0%, rgba(50, 50, 66, 1) 50%, rgba(0, 0, 0, 1) 95%);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    transition: none;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3), /* podstawowy cień */
        0 0 20px rgba(161, 129, 222, 0.3) inset, /* subtelna poświata wewnątrz */
        0 0 15px rgba(161, 129, 222, 0.2); /* delikatna złota aura na zewnątrz */
}

.title:hover {
    color: #d4a803;
    text-shadow: 0 0 40px #d4a803;
    animation: none;
}



/* === LOGO STROBE === */
@keyframes flicker {
    0%, 5%, 10%, 15%, 18%, 22%, 25%, 28%,
    30%, 33%, 35%, 38%, 40%, 43%, 45%, 48%,
    50%, 53%, 55%, 57%, 60%, 63%, 65%, 68%,
    70%, 73%, 75%, 78%, 80%, 83%, 85%, 88%,
    90%, 93%, 95%, 97%, 100% {
        color: #a18102;
        text-shadow: none;
    }
    12%, 42%, 47%, 55%, 82%, 86%, 89%, 92%, 96% {
        color: #d4a803;
        text-shadow: 0 0 8px #d4a803;
    }
}

/* === FORMULARZE: input, button, select === */
input:not([type="checkbox"]):not(#urlInput),
button {
    background-color: #2d2d2d;
    color: #E5E7EB;
    border: 2px solid #4b4b4b;
    padding: 0.5rem;
    border-radius: 0.375rem;
    height: 2.5rem;
    box-sizing: border-box;
}
input:focus,
select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: none;
}
button:hover {
    background-color: #3b3b3b;
}
#uploadBtn:disabled,
#copyBtn:disabled,
#deleteBtn:disabled,
#saveBtn:disabled {
    background-color: #666;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
    text-shadow: none;
}

/* === CUSTOM INPUT === */
.custom_input {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 100%;
    flex-grow: 1;
}
.input {
    font-size: 15px;
    font-family: Verdana;
    padding: 0.5rem 10px;
    width: 100%;
    height: 2.5rem;
    outline: none;
    background: #CCC2A6;
    color: #000000;
    border: 1px solid #000000;
    border-radius: 4px;
    box-shadow: 0px 1px 3px 0px #000000;
    transition: .3s ease;
    box-sizing: border-box;
}
.input:focus {
    background: #EAE0C2;
    border: 1px solid #000000;
}
.input::placeholder {
    color: #9B9B9B;
}
#urlInput.input {
    padding-left: 30px;
}
#formatSelect.input,
#durationSelect.input {
    width: 100px;
	margin-right: 0;
}
#fileName.input {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
#fileName.long-file-name {
    text-align: right;
    direction: rtl;
}
#fileName.link-mode {
    color: limegreen;
    font-weight: bold;
}

/* === STATUS BAR === */
#statusBar {
    position: relative;
    background: #CCC2A6;
    border: 1px solid #000000;
    border-radius: 4px;
    height: 2.5rem;
    padding: 0 10px;
    box-sizing: border-box;
    font-family: Verdana;
    font-size: 15px;
    color: #000000;
}
#statusBar a,
#statusBar a:visited,
#statusBar a:hover {
    color: #000000;
    text-decoration: none;
}
#statusBar.input,
#statusBar.input[data-url],
#statusBar.input[data-url]:hover {
    color: #000000 !important;
}
#statusBar.input[data-url]:hover {
    color: #ffffff !important;
}
#statusBar.input,
#fileName.input {
    padding: 0 10px !important;
    background: #CCC2A6 !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
    box-shadow: 0px 1px 3px 0px #000000 !important;
    font-family: Verdana !important;
    font-size: 15px !important;
    height: 2.5rem !important;
    border-radius: 4px !important;
}

/* === PRZYCISKI DEFAULT === */
.def_Button {
    box-shadow: 0px 2px 3px 0px #000000;
    background: linear-gradient(to bottom, #eae0c2 5%, #ccc2a6 100%);
    background-color: #eae0c2;
    border-radius: 4px;
    border: 1px solid #333029;
    display: inline-block;
    cursor: pointer;
    color: #616161;
    font-family: Verdana;
    font-size: 15px;
    font-weight: bold;
    padding: 0.5rem 0;
    text-decoration: none;
    text-shadow: 1px 2px 5px #ffffff;
    width: 100px;
    min-width: 100px;
    text-align: center;
    box-sizing: border-box;
    user-select: none;
}
.def_Button:hover {
    background: linear-gradient(to bottom, #ccc2a6 5%, #eae0c2 100%);
}
.def_Button:active {
    position: relative;
    top: 1px;
}

/* === SVG / IKONY === */
.svg_icon {
    position: absolute;
    left: 10px;
    fill: #000000;
    width: 15px;
    height: 15px;
}

/* === DROPHINT / INFOTEXT === */
#dropHint {
    color: #FF2F33;
    text-align: center;
    font-family: Verdana;
    font-size: 13px;
    margin-top: 0.2rem;
    display: block;
color:  #d9d9d9;
background-color: #e8e8e8;
text-shadow: rgba(255,255,255,.1) -1px -1px 1px,rgba(0,0,0,.5) 1px 1px 1px;
}

#dropHint {
  background-color: #CCC2A6;
  color: #333; /* Opcjonalnie, dla lepszej czytelności */
  padding: 5px;
  border-radius: 5px;
border: 1px solid #000000;
  
}

#preview[src="idle.png"] ~ #dropHint {
    display: block;
}

/* === TOOLTIP === */
.custom-tooltip {
    position: absolute;
    background: linear-gradient(to bottom, #eae0c2, #b46f6f);
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-family: sans-serif;
    box-shadow: 0 0 12px rgba(0,0,0,0.7);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 9999;
    transition: opacity 0.15s ease-in-out;
}

/* === UKŁAD / LAYOUT === */
.container {
    max-width: 32rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}
.flex-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
}

#formatSelect,
#durationSelect {
    margin-right: -1.4rem;
}
#durationSelect {
    margin-left: 0;
}
#fileInput {
    display: none;
    border: none;
    padding: 0;
    height: 2.5rem;
    box-sizing: border-box;
    width: 100%;
}

/* === DROPZONE === */
#dropZone {
    border: 2px dashed #333;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.15); /* Fallback */
    filter: brightness(90%); /* Ciemniejszy o 20% */
}
#dropZone.dragover {
    border-color: #60a5fa;
    background-color: #2d3748;
}

/* === EXIF container === */

#exifContainer {
    border: 2px dashed #333;
    padding: 1rem;
    border-radius: 5px;

    background-color: rgba(0, 0, 0, 0.15); /* Fallback */
    filter: brightness(90%); /* Ciemniejszy o 20% */
	    font-size: 11px;
    font-family: Verdana;
	display: none; 
	margin-top: 10px; 
	padding: 10px;  
	color: #000
}

.cr-wrapper2 {
    position: relative;
    padding-left: 31px;
    cursor: pointer;
    font-size: 13px;
    font-family: Verdana;
    color: #E5E7EB;
    user-select: none;
    text-shadow: 1px 1px 0 #F11;
}

/* === PREVIEW / LIGHTBOX === */
#preview {
    border: 1px solid #555;
    border-radius: 5px;
    max-width: 100%;
    height: auto;
    margin-top: 1.0rem;
    margin-left: auto;
    margin-right: auto;
    display: block;
    cursor: pointer;
}
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.lightbox.show {
    display: flex;
    opacity: 1;
}

/* === PROGRESS BAR === */
.progress-container {
    position: absolute;
    top: 6.4rem;
    left: 0;
    width: 100%;
    height: 20px;
    display: none;
    z-index: 11;
    background: transparent;
}
progress {
    width: 100%;
    height: 20px;
    appearance: none;
    border: none;
    background: #CCC2A6;
    border-radius: 4px;
border: 1px solid #000000;
}
progress::-webkit-progress-bar {
    background: #CCC2A6;
    border-radius: 4px;
}
progress::-webkit-progress-value {
    background: linear-gradient(to right, #EAE0C2 0%, #fff9e6 100%);
    border-radius: 4px;
}
progress::-moz-progress-bar {
    background: linear-gradient(to right, #EAE0C2 0%, #fff9e6 100%);
    border-radius: 4px;
}
.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000000;
    font-family: Verdana;
    font-size: 13px;
    text-align: center;
    z-index: 12;
}

/* === CHECKBOX === */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.cr-wrapper {
    position: relative;
    padding-left: 31px;
    cursor: pointer;
    font-size: 13px;
    font-family: Verdana;
    color: #E5E7EB;
    user-select: none;
    text-shadow: 1px 1px 0 #555;
}
.cr-wrapper input {
    position: absolute;
    opacity: 0;
}
.cr-input {
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px;
    height: 14px;
    background: #CCC2A6;
    border: 1px solid #000;
    border-radius: 3px;
    transform: translateY(-50%);
}
.cr-wrapper input:checked ~ .cr-input::after {
    content: "";
    position: absolute;
    left: 1px;
    top: 2px;
    width: 11px;
    height: 11px;
    background: #000;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.config {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
}

/* V2
.config {
    display: block;  lub flex, ale tylko jeśli naprawdę potrzeba 
    width: auto;      lub flex: 1, jeśli ma być równo 
	position: relative;
}
*/
.select-toggle {
    background: #CCC2A6;
    border: 1px solid #000000;
    border-radius: 4px;
    padding: 0.5rem 1.3rem;
    height: 2.5rem;
    box-sizing: border-box;
    color: #000000;
    font-size: 15px;
    font-family: Verdana;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 1px 3px 0px #000000;
	    user-select: none;
}
.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 150px;
    background: #CCC2A6;
    border: 1px solid #000000;
    border-radius: 4px;
    padding: 0.5rem;
    z-index: 10;
    display: none;
    box-shadow: 0px 1px 3px 0px #000000;
	padding-right: 0.5rem; /* Dodano padding, aby pomieścić szerszy About i X */
	user-select: none;
}
.select-options .cr-wrapper {
    display: flex;
    align-items: center;
    padding: 0.2rem 0;
    font-size: 13px;
    color: #000000;
    text-shadow: none;
    padding-left: 25px; /* Odstęp tekstu od checkboxa */
}
.select-options .cr-wrapper input[type="checkbox"] {
    position: absolute;
    left: 0;
    margin: 0;
    width: 14px;
    height: 14px;
}
.select-options .cr-input {
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px;
    height: 14px;
    background: #CCC2A6;
    border: 1px solid #000;
    border-radius: 3px;
    transform: translateY(-50%);
}
.select-options .cr-wrapper input[type="checkbox"]:checked ~ .cr-input::after {
    content: "";
    position: absolute;
    left: 1px;
    top: 2px;
    width: 11px;
    height: 11px;
    background: #000;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.sep-line {
	margin: 0; /* Usunięto marginesy, aby separator był blisko */
	margin-bottom: 5px; /* Bez marginesu dolnego */
	margin-top: 5px;
}

.header-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
	margin-bottom: 0;
}

.option-label {
    font-size: 1rem;
    color: #000;
    cursor: pointer;
    padding: 0.2rem 4.6rem 0.2rem 0.2rem;
font-size: 12px;
font-family: Verdana;
    border-radius: 5px;
}

.option-label:hover {
    background-color: #E8E2C2;
}

.exit-btn {
    background-color: #E8E2C2;
    color: #000;
    padding: 0.2rem 0.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
    margin-right: 0.2rem; /* Dodano mały margines, aby X nie dotykał krawędzi */
}

.lang-flags {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0rem;
      user-select: none;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 2px 4px;
  border-radius: 0px;
  color: #000;
  cursor: pointer;
  	   font-size: 12px;
    font-family: Verdana;
}

.lang-option img {
  width: 18px;
  height: 12px;
  border-radius: 0px;
}

.lang-option.active {
  background-color: #E8E2C2;
  border-radius: 5px;
}


.bgbody-option {
    display: flex;
    align-items: center;
    padding: 5px;
	color: #000;
    cursor: pointer;
	font-size: 12px;
    font-family: Verdana;
	padding: 0.2rem 0.2rem 0.2rem 0.2rem;
	    user-select: none;
}

.bgbody-option:hover {
	  background-color: #E8E2C2;
      padding: 0.2rem 0.2rem 0.2rem 0.2rem;
      border-radius: 5px;
}

.bgbody-option img {
    width: 18px;
    height: 12px;
    margin-right: 5px;
}

/* Zapewnienie, że colorpicker nie jest przesunięty przez inne elementy */
input[type="color"] {
    position: fixed;
    width: 0;
    height: 0;
    border: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
}

/* === MOBILE BUTTON + ICONS === */
@media (max-width: 1080px) {
    #saveBtn,
    #deleteBtn {
        width: 46px !important;
        min-width: 46px !important;
        padding: 0 !important;
        font-size: 0 !important;
        position: relative;
        color: transparent !important;
        text-shadow: none !important;
    }

    #saveBtn::after,
    #deleteBtn::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 26px;
        height: 26px;
        transform: translate(-50%, -50%);
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        pointer-events: none;
        filter: grayscale(1); /* <- domyślnie czarno-białe */
        transition: filter 0.2s ease-in-out; /* płynna zmiana */
    }

    #saveBtn::after {
        background-image: url("pic/save.png");
    }

    #deleteBtn::after {
        background-image: url("pic/delete.png");
    }

    /* Aktywne = kolorowe */
    #saveBtn:not(:disabled)::after,
    #deleteBtn:not(:disabled)::after {
        filter: grayscale(0);
    }

    #saveBtn:disabled,
    #deleteBtn:disabled {
        color: transparent !important;
        text-shadow: none !important;
    }
}


