* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-image: url('/static/background-5.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    position: relative;
    overflow-x: hidden;
	justify-content: center;
    align-items: center;
}

#appContent {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#topBar {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#cameraIcon {
    position: absolute;
    top: 27%;
    left: 30%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
}

#usageCountContainer {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 206px;
    height: 173px;
}

#userControls {
    display: flex;
    gap: 10px;
}

#logoutButton {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

#upgradeButton {
    background-color: #eca845;
    color: #000;
    transition: background-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

#upgradeButton:not(.vip-active):hover {
    background-color: #d99735;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

#logoutButton {
    background-color: #946b97;
    color: #fff;
}

.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    position: absolute;
    bottom: 10%;
    left: 0;
    right: 0;
	opacity: 1;
    transition: opacity 0.3s ease;
}

.button-container.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.button-container img {
    cursor: pointer;
    width: 100px;
    height: 100px;
}

#resultImage {
    display: block;
    max-width: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 20% auto 0 auto;
    border: 20px solid rgba(0, 0, 0, 0.5);
}

.image-controls {
    position: absolute;
    top: 50px;
    display: none; /* Ukrycie przycisków do momentu załadowania obrazka */
    gap: 10px;
    z-index: 10;
	left: 50%;
	transform: translateX(-50%);
}

.control-button {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

#saveButton {
    background-color: #eca845;
}

#closeButton {
    background-color: #946b97;
}

.image-controls.hidden {
    opacity: 0;
    pointer-events: none;
}

#progressBarContainer {
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.menu-container {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1001;
}

.menu-button {
    width: 11px;
    height: 29px;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 10px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    background-color: black;
    top: calc(100% + 5px); /* Dodane: przesuwa menu 5px niżej */
    min-width: 120px;
    border: 2px solid #eca845;  /* Żółta obwódka */
    border-radius: 10px;  /* Zaokrąglone rogi */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    list-style-type: none;
    padding: 5px 0;  /* Dodane padding */
    margin: 0;
}

.dropdown-menu li {
    color: white;  /* Biały tekst */
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    cursor: pointer;
    font-weight: bold;  /* Grubsza czcionka */
    font-family: Arial, sans-serif;  /* Taka sama czcionka jak Logout */
    font-size: 14px;  /* Dostosuj rozmiar do rozmiaru napisu Logout */
}

.dropdown-menu li:hover {
    background-color: #333;  /* Ciemniejszy odcień przy najechaniu */
}

#loginContainer {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    z-index: 1000;
    text-align: center;
}

.gsi-material-button {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-appearance: none;
    background-color: WHITE;
    background-image: none;
    border: 1px solid #747775;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #1f1f1f;
    cursor: pointer;
    font-family: 'Roboto', arial, sans-serif;
    font-size: 14px;
    height: 40px;
    letter-spacing: 0.25px;
    outline: none;
    overflow: hidden;
    padding: 0 12px;
    position: relative;
    text-align: center;
    -webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
    transition: background-color .218s, border-color .218s, box-shadow .218s;
    vertical-align: middle;
    white-space: nowrap;
    width: auto;
    max-width: 400px;
    min-width: min-content;
}

.gsi-material-button .gsi-material-button-icon {
    height: 20px;
    margin-right: 12px;
    min-width: 20px;
    width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
    -webkit-align-items: center;
    align-items: center;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    height: 100%;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
    -webkit-flex-grow: 1;
    flex-grow: 1;
    font-family: 'Roboto', arial, sans-serif;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
    -webkit-transition: opacity .218s;
    transition: opacity .218s;
    bottom: 0;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.gsi-material-button:disabled {
    cursor: default;
    background-color: #ffffff61;
    border-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents {
    opacity: 38%;
}

.gsi-material-button:disabled .gsi-material-button-icon {
    opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state, 
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
    background-color: #303030;
    opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
    -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
    background-color: #303030;
    opacity: 8%;
}

#usageCount {
    position: absolute;
    top: 28%;
    left: 33%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.usage-digit {
    height: 30px;
    margin: 0 2px;
}

input[type="file"][capture] {
    display: none;
}

@media (max-width: 768px) {
    body {
        background-size: auto 100%;
        background-position: center center; /* Wyśrodkowanie tła */
        width: 100%;
        overflow-x: hidden;
    }

    #appContent {
        width: 100%;
        overflow-x: hidden;
        overflow-y: hidden;
		display: flex;
	    flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 100%;
    }

    .button-container {
        position: fixed;
        bottom: 70px; /* Dostosuj tę wartość, aby przyciski były nad stopką */
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        z-index: 1000;
        width: 100%;
    }

    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }
}

#upgradeButton.vip-active {
    background-color: #FFD700;
    color: #000;
    cursor: default;
    box-shadow: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#vipStatusInfo {
    background-color: #eca845;
    color: #000;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s, box-shadow 0.3s;
    cursor: default;
}

#vipStatusInfo:hover {
    background-color: #d99735;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
}
footer {
    flex-shrink: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    text-align: center;
    padding: 10px 0;
    position: relative;
    z-index: 1000;
	font-size: 12px;
	font-family: 'Roboto Bold', Arial, sans-serif; /* Użycie zdefiniowanej czcionki */
}

footer a {
    color: rgba(250, 250, 250, 0.5);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.button-container {
  position: fixed;
  bottom: 60px; /* Dostosuj tę wartość, aby przyciski były nad stopką */
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 1000;

}

@font-face {
    font-family: 'Roboto Light';
    src: url('/static/fonts/Roboto-Light.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

#appContent, .button-container, #topBar, #imageFrame {
    max-width: 100%;
}

#fileInput {
    display: none;
}

@media screen and (min-width: 769px) {
    #resultImage {
        margin: 100px auto 0 auto;  /* Zmniejszony margines górny na desktopie */
    }
}