 body { background:#111; color:#eee; font-family:sans-serif; margin:0; padding:20px; }
  #buttons { margin-bottom:20px; }
  #thumbs { display:flex; flex-wrap:wrap; gap:10px; }
  .thumb { width:150px; height:150px; overflow:hidden; border:1px solid #444; cursor:pointer; }
  .thumb img { width:100%; height:100%; object-fit:cover; }

.app-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-title .app-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    vertical-align: middle;
    position: relative;
    top: 2px; /* 🔥 korekta pionowa */
}



button {
    padding: 10px 20px;
    margin: 5px;
	color: white;
	background: #20201F;
	border:none;
	border-radius: 5px;
	min-width:150px;
	}

button:hover {
	background: #272727;
	cursor: pointer;
}
	
h2 {
	padding:2px;
	margin:0;
	}
	
#viewer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    flex-direction: column;     /* 🔥 układ pionowy */
}

#viewerImgWrap {
    flex: 1;                    /* 🔥 zajmuje całą przestrzeń nad panelami */
    display: flex;
    justify-content: center;
    align-items: center;        /* 🔥 idealne centrowanie */
    overflow: hidden;
}

#fullImg {
    max-width: 80vw;
    max-height: 80vh;
    transform: scale(1);
    transition: transform 0.05s linear;
}

#panelButtons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
	justify-content: center; 
    width: 100%;        
    box-sizing: border-box;
}



#ops {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.opt_panel {
    margin: 15px 0;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 6px;
    display: none;          /* 🔥 domyślnie ukryte */
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-family: sans-serif;
    color: #fff;
	justify-content: center; 
    width: 100%;            /* 🔥 panel zawsze pod przyciskami */
    box-sizing: border-box; /* 🔥 nie wyjdzie poza kontener */
}


.tooltip {
    position: absolute;
    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 9999;
    border: 1px solid #444;
	}
	
  #nav { position:absolute; top:50%; width:100%; display:flex; justify-content:space-between; }
  .btn { font-size:3rem; color:#fff; cursor:pointer; padding:20px; user-select:none; }
  #close { position:absolute; top:20px; right:20px; font-size:2rem; cursor:pointer; }
  
#ops button {
    padding: 8px 12px;
    font-size: 14px;
}

#colctrls, #filters {

    flex-wrap: wrap;          /* 🔥 zawijanie suwaków i filtrów */
    gap: 10px;
    width: 100%;              /* 🔥 pełna szerokość na mobilu */
    justify-content: center;  /* ładne centrowanie */
}

#colctrls input[type=range] {
    width: 120px;             /* 🔥 stała szerokość suwaków */
}

.btn-small {
    width: 100px;
    padding: 8px;
	margin:5px;
    font-size: 13px;
    background: #2e2e2e;
    border: 1px solid #555;
    color: white;
    cursor: pointer;
    border-radius: 4px;
	}
	
#thumbs {
	min-height:50px;
}
	
/* Sekcje panelu */
.exp-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Etykiety */
.exp-label {
    font-size: 12px;
    color: #aaa;
}

/* Select */
.exp-select {
    padding: 6px 10px;
    border-radius: 4px;
    background: #444;
    color: #fff;
    border: 1px solid #555;
    cursor: pointer;
    height: 32px;
}

/* Suwak kompresji */
.exp-range {
    cursor: pointer;
    width: 110px;
    height: 32px;
}

/* Wyłączony suwak (dla PNG/BMP) */
.exp-disabled {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Wymiary */
.exp-size-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.exp-size-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.exp-size-multiply {
    margin-top: 18px;
    color: #777;
    font-size: 14px;
}

/* Input liczbowy */
.exp-number {
    width: 80px;
    padding: 5px;
    border-radius: 4px;
    background: #444;
    color: #fff;
    border: 1px solid #555;
    height: 20px;
}

/* Przycisk pobierania */
.exp-download-btn {
    align-self: flex-end;
    padding: 8px 20px;
    background: #007acc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    height: 32px;
}
	
	#pdf-panel {
    flex-direction: column;
    gap: 15px;
}

.pdf-file-input {
    background: #444;
    color: #fff;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #555;
}

.pdf-controls {
    display: flex;
    align-items: center;
    gap: 10px;
	 flex-wrap: wrap; 
	 justify-content: center;
}

#pdfCanvas {
    background: #222;
    border: 1px solid #555;
    border-radius: 4px;
    max-width: 100%;
}
.drop-zone {
    width: 80%;
    margin: 0 auto;
    padding: 40px;
    border: 2px dashed #555;
    border-radius: 6px;
    text-align: center;
    color: #ccc;
    background: #2a2a2a;
    margin-bottom: 20px;
    transition: 0.2s;

    transform: translateY(5px);
}


.drop-zone.dragover {
    border-color: #00aaff;
    background: #1f1f1f;
    color: #fff;
}

#appmenu {
    display: none;
    width: 100%;
    padding: 12px;
    font-size: 24px;
    background: #20201F;
    border: none;
    color: white;
    border-radius: 5px;
    margin-bottom: 10px;
}

#footer {text-align:center;}

#about-panel a {
    color: #4fc3f7;          /* Twój kolor linków */
    text-decoration: none;
}

#about-panel a:hover {
    color: #81d4fa;          /* jaśniejszy przy hover */
    text-decoration: underline;
}

#about-panel .about-content {
    padding: 20px;
    color: #ddd;
    font-size: 15px;
}

.about-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    margin-bottom: 10px;
}

.about-libs {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
}

.about-libs li {
    margin: 4px 0;
}

.about-footer {
    margin-top: 15px;
    font-size: 13px;
    opacity: 0.7;
}


@media (max-width: 768px) {
	#nav { top:25%;}
	
    body {
        padding: 10px;
        font-size: 16px;              /* 🔥 większy tekst */
    }

    button, .btn-small {
        padding: 12px 18px;
        font-size: 15px;              /* 🔥 większe przyciski */
        min-width: 170px;
    }

    #panelButtons {
        gap: 15px;
    }

    .thumb {
        width: 120px;                 /* 🔥 większe miniatury */
        height: 120px;
    }

    #fullImg {
        max-width: 95vw;              /* 🔥 większy obraz */
        max-height: 70vh;
    }

    .exp-number {
        width: 100px;                 /* 🔥 większe inputy */
        height: 28px;
        font-size: 16px;
    }

    .exp-range {
        width: 160px;                 /* 🔥 większe suwaki */
        height: 36px;
    }

    .exp-label {
        font-size: 14px;              /* 🔥 większe etykiety */
    }

    #colctrls input[type=range] {
        width: 160px;                 /* 🔥 większe suwaki kolorów */
    }

    #pdfCanvas {
        max-width: 100%;
        height: auto;
    }

    .pdf-controls button {
        font-size: 18px;              /* 🔥 większe PDF przyciski */
        padding: 10px 14px;
    }

    .drop-zone {
        width: 95%;                   /* 🔥 lepsze dopasowanie */
        padding: 30px;
        font-size: 16px;
    }

    .opt_panel {
        padding: 20px;                /* 🔥 większe panele */
        gap: 25px;
    }
	
	#dropZone, #app_subtitle {display:none;}
	

    #appmenu {
        display: block;
    }


    #toolButtons {
        display: none;
        flex-direction: column;
        gap: 10px;
    }


    #toolButtons .btn-small {
        width: 100%;
        justify-content: flex-start;
        font-size: 16px;
        padding: 14px;
        gap: 10px;
        display: flex;
        align-items: center;       
		width: 100%;
		margin:0;
    }


    #toolButtons.open {
        display: flex;
    }
}
