:root {
  --yellow-color: #dba606;
  --orange-color: #fb702d;
  --blue-color: #760ae4;
  --green-color: #0c948d;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #222;
    font-family: system-ui, sans-serif;
}

.main-content {
    flex: 1 0 auto; /* занимает всё доступное пространство */
}

.footer {
    flex-shrink: 0;
    background: #f5f5f5;
    color: #888;
    text-align: center;
    padding: 16px 0 12px 0;
    font-size: 0.95rem;
    border-top: 1px solid #e0e0e0;
}

.Main {
    max-width: 420px;
    margin: 0 auto;
    padding: 24px 12px 12px 12px;
    text-align: center;
}

.Main h1 {
    font-size: 1.6rem;
    margin-bottom: 24px;
}

.Main img {
    width: auto;
    height: 200px;
    object-fit: contain;
    margin-bottom: 12px;
}

.custom-file-input {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 8px auto;
    background: #e9ecef;
    border-radius: 8px;
    padding: 12px 0;
    cursor: pointer;
    color: #888;
    font-size: 1rem;
    text-align: center; /* на всякий случай */
}

.custom-file-input input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.btn, .f-btn, #add_photo, #completed_photo {
    display: block;
    width: 100%;
    max-width: 300px;
    padding: 12px 0;
    margin: 8px 0;
    background: var(--green-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:active, .f-btn:active, #add_photo:active, #completed_photo:active {
    opacity: 0.85;
}

#btn_div {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 36px 0;
    align-items: center;
}

#btn_div button {
    width: 100%;
    max-width: 300px;
}
#btn_div a {
    display: block;
    width: 100%;
    max-width: 300px;
    padding: 12px 0;
    margin: 8px 0;
    background: var(--green-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none; /* убирает подчеркивание */
    transition: background 0.2s;
    box-sizing: border-box;
}

input[type="text"], input[type="number"], input[type="password"] {
    width: 100%;
    max-width: 300px;
    padding: 12px 14px;
    margin: 8px 0 40px 0;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background: #f5f5f5;
    color: #222;
    font-size: 1.1rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus {
    border-color: var(--orange-color);
    background: #fff;
}

/*формы*/
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#image-preview-container div {
    display: inline-block;
    position: relative;
    margin: 5px;
}

/* Изображение */
#image-preview-container {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Центрирует изображения в каждой строке */
    gap: 8px; /* Отступы между изображениями */
}

#image-preview-container img {
    height: 100px;
    width: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Круглая белая кнопка с иконкой */
#image-preview-container button {
    position: absolute;
    top: 5px;
    right: 5px;

    width: 25px;
    height: 25px;

    background-color: white;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none; /* убираем границу */
    font-size: 16px; /* размер иконки внутри */
    /*color: #f50606;*/
    color: var(--orange-color);
    cursor: pointer;
}

.warning-text {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin: 4px 0;
    opacity: 0.65;
    line-height: 1.3;
    max-width: 300px;
}