 body {
        margin: 0;
        padding: 0;
        font-family: 'Segoe UI', Tahoma, sans-serif;
        background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
        color: #fff;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    .copy-icon-btn {
    background: transparent; /* прозрачный фон */
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.copy-icon-btn:hover,
.copy-icon-btn:focus {
    background-color: rgba(78, 161, 255, 0.15); /* легкий полупрозрачный синий фон */
    outline: none;
}

.copy-icon-btn svg {
    display: block;
    transition: fill 0.3s ease;
}
    .share-link {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-link input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    background: #333;
    color: #eee;
    font-size: 1rem;
    user-select: all;
}

.share-link input[type="text"]:focus {
    outline: 2px solid #bb86fc;
    background: #444;
}

.share-link button {
    background-color: #4ea1ff;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    user-select: none;
}

.share-link button:hover,
.share-link button:focus {
    background-color: #1f7ae0;
    outline: none;
}
    .block-info {
       width: 100%;
    max-width: 900px;      /* максимум по ширине */
    margin: 12px auto 40px; /* центрирование с отступами */
    padding: 12px 20px;
    background: #222;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.7);
    color: #ddd;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    text-align: left;
    user-select: all;
    box-sizing: border-box;
}
input[type="file"] {
        background: #1f4068;
        display: none;
        color: #fff;
        padding: 10px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        width: 100%;
        margin-bottom: 15px;
    }
    input[type="submit"] {
        background: #4ea1ff;
        color: white;
        border: none;
        padding: 12px 20px;
        font-size: 1rem;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.3s ease;
    }
    input[type="submit"]:hover {
        background: #1f7ae0;
    }
    header {
        text-align: center;
        padding: 20px 0;
        font-size: 1.8rem;
        font-weight: bold;
        letter-spacing: 1px;
    }
    .container {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .upload-box {
        background: rgba(0, 0, 0, 0.5);
        padding: 30px;
        border-radius: 15px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
        text-align: center;
        width: 100%;
        max-width: 500px;
    }
    .upload-box h2 {
        margin-bottom: 20px;
    }
    
    footer {
        text-align: center;
        padding: 15px;
        font-size: 0.9rem;
        opacity: 0.7;
    }

    .photo-info {
    max-width: 600px;
    margin: 12px auto 40px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    color: #ddd;
    text-align: left;
    background: #222;              /* тёмный фон */
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.7);
    user-select: all;
}

.photo-info a {
    color: #4ea1ff;                /* ярко-синий для ссылки */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease;
}

.photo-info a:hover,
.photo-info a:focus {
    color: #82b3ff;
    text-decoration: underline;
}
.photo-wrapper {
    max-width: 900px;
    width: 90vw;
    margin: 20px auto;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    overflow: hidden;
    background: transparent;
}

.photo-wrapper img {
    max-width: 100%;
    max-height: 70vh;     /* не выше 70% высоты окна */
    height: auto;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: inline-block;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.photo-wrapper img:hover {
    transform: scale(1.05);
}
    .menu-toggle {
        display: none;
        flex-direction: column;
        cursor: pointer;
        width: 28px;
        height: 22px;
        justify-content: space-between;
    }
    .menu-toggle span {
        display: block;
        height: 3px;
        background-color: #bb86fc;
        border-radius: 2px;
    }
    @media (max-width: 600px) {
        .main-nav a:focus,
    .main-nav a:active {
        outline: 3px solid #bb86fc; /* яркая рамка */
        outline-offset: 2px;
        border-radius: 4px;
    }
        nav {
            position: fixed;
            top: 60px;
            left: 0;
            right: 0;
            background: linear-gradient(90deg, #0f2027, #203a43, #2c5364);
            flex-direction: column;
            overflow: hidden;
            max-height: 0;
            transition: max-height 0.3s ease;
            align-items: flex-start;
            padding-left: 20px;
        }
        nav.open {
            max-height: 300px;
        }
        nav a {
            margin: 15px 0;
            font-size: 18px;
            text-align: left;
            width: 100%;
            padding-left: 5px;
        }
        .menu-toggle {
            display: flex;
        }
        body {
            padding-top: 60px;
        }
         .block-info {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .share-link input[type="text"] {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .share-link button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    }
    
    #uploadBtn {
        background-color: #1e88e5;
        border: none;
        color: white;
        padding: 15px 30px;
        font-size: 18px;
    }
    #uploadBtn:hover {
        background-color: #1565c0;
    }
    label {
        display: inline-block;
        background-color: #43a047;
        padding: 12px 25px;
        color: white;
        box-shadow: 0 0 5px #43a047cc;
    }
    label:hover {
        background-color: #2e7d32;
        box-shadow: 0 0 8px #2e7d32cc;
    }
    #result {
        margin-top: 30px;
        font-size: 18px;
        word-wrap: break-word;
    }
    #result a {
        color: #90caf9;
        text-decoration: none;
        word-break: break-all;
    }
    #result a:hover {
        text-decoration: underline;
    }
    h1 {
        color: #bb86fc;
        margin-bottom: 40px;
    }
    p {
        color: #ccc;
    }
    @media (max-width: 600px) {
        body {
            padding: 80px 10px 30px;
            font-size: 14px;
        }
        #uploadBtn, label, select {
            padding: 12px 20px;
            font-size: 16px;
        }
        h1 {
            font-size: 24px;
            margin-bottom: 25px;
        }
        #result {
            font-size: 16px;
        }
    }
    /* Модальное окно */
#previewModal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex; /* фиксированно, чтобы JS не ломал */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* выше всего */
}

#previewModal.open {
    visibility: visible;
    opacity: 1;
}
    #previewModalContent {
        background: #222;
        border-radius: 10px;
        padding: 20px;
        max-width: 90vw;
        max-height: 90vh;
        text-align: center;
        box-shadow: 0 0 15px #bb86fc;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    #previewModalContent img {
        max-width: 80vw;
        max-height: 60vh;
        border-radius: 10px;
        margin-bottom: 15px;
        box-shadow: 0 0 15px rgba(255,255,255,0.3);
    }
    #previewModalContent select {
        margin-bottom: 15px;
        font-size: 16px;
        padding: 8px 12px;
        background: #121212;
        border: 1px solid #bb86fc;
        color: #e0e0e0;
        border-radius: 5px;
        outline: none;
    }
    #previewModalContent select:hover, #previewModalContent select:focus {
        border-color: #3700b3;
    }
    #previewModalContent button {
        margin: 5px 10px;
        padding: 12px 25px;
        font-size: 16px;
        min-width: 120px;
        border: none;
        border-radius: 5px;
        user-select: none;
        transition: background-color 0.3s ease;
    }
    #modalUploadBtn {
        background-color: #1e88e5;
        color: #fff;
    }
    #modalUploadBtn:hover {
        background-color: #1565c0;
    }
    #modalCancelBtn {
        background-color: #b00020;
        color: #fff;
    }
    #modalCancelBtn:hover {
        background-color: #7f0000;
    }
    img {
  max-width: 100%;
  height: auto;
  display: block;
}
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #0f2027, #203a43, #2c5364);
    padding: 12px 30px;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    position: relative; /* для абсолютного позиционирования бургера */
    z-index: 10000;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: #ddd;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #b0e0e6;
}

/* Бургер и меню на мобилке */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
}

.menu-toggle span {
    background-color: #8a63ff; /* мягкий фиолетово-синий */
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.menu-toggle:hover span,
.menu-toggle:focus span {
    background-color: #a385ff; /* светлее при наведении */
}

/* Мобильные стили */
@media (max-width: 600px) {
    body {
        padding-top: 60px; /* отступ чтобы не перекрывать фиксированную шапку */
    }
    .site-header {
        position: fixed;
        top: 0; left: 0; right: 0;
        padding: 12px 20px;
        z-index: 10000;
    }
    .main-nav {
        position: fixed;
        top: 60px; /* под шапкой */
        left: 0; right: 0;
        background-color: #1f1f1f;
        flex-direction: column;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease;
        padding-left: 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.8);
        z-index: 9999;
    }
    .main-nav.open {
        max-height: 300px; /* раскрытие меню */
    }
    .main-nav a {
        margin: 15px 0;
        font-size: 18px;
        text-align: left;
        width: 100%;
        padding-left: 5px;
    }
    .menu-toggle {
        display: flex;
        order: 2; /* бургер справа */
    }
    .logo {
        order: 1;
    }
    /* Чтобы лого и бургер были по краям */
    .site-header {
        justify-content: space-between;
    }
}