/* Общий стиль для страницы */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #e0f2ff, #b3d9ff);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

/* Контейнер для содержимого */
.form-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 1000px;
    box-sizing: border-box;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Левая часть: информация о Capyland */
.left-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-right: 30px;
    border-right: 1px solid #e0e0e0;
}

.left-side h1 {
    color: #007acc;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.left-side p {
    font-size: 1rem;
    color: #555;
    margin: 0;
}

.left-side .info-box {
    background-color: #f5f9ff;
    padding: 20px;
    border-radius: 10px;
}

.left-side .info-box h2 {
    color: #007acc;
    margin-top: 0;
}

.left-side .info-box ul {
    padding-left: 20px;
}

.left-side .info-box li {
    margin-bottom: 8px;
}

.left-side .info-box a {
    color: #007acc;
    text-decoration: none;
    transition: color 0.2s;
}

.left-side .info-box a:hover {
    color: #005fa3;
    text-decoration: underline;
}

/* Правая часть: сокращение ссылок */
.right-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-left: 30px;
}

.right-side h2 {
    color: #007acc;
    margin-top: 0;
}

/* Контейнер ввода */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* Ввод ссылки */
input[type="url"], input[type="text"] {
    padding: 12px 15px;
    font-size: 1rem;
    width: 100%;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input[type="url"]:focus, input[type="text"]:focus {
    border-color: #007acc;
    outline: none;
}

/* Кнопка */
button {
    padding: 12px;
    font-size: 1rem;
    background-color: #007acc;
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
}

button:hover {
    background-color: #005fa3;
}

/* Окно с сокращённой ссылкой */
#shortened-url {
    display: none;
    background: #f5f9ff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

#short-url {
    font-weight: 500;
    color: #007acc;
}

/* Уведомление при копировании */
#copy-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #007acc;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Страница 404 */
.not-found {
    text-align: center;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.not-found h1 {
    color: #007acc;
    font-size: 2.5rem;
}

.not-found a {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.not-found a:hover {
    text-decoration: underline;
}

/* Страница со списком ссылок */
.links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.links-list li {
    margin-bottom: 10px;
}

.links-list a {
    color: #007acc;
    text-decoration: none;
    transition: color 0.2s;
}

.links-list a:hover {
    color: #005fa3;
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
    .form-container {
        flex-direction: column;
        padding: 30px 20px;
    }
    
    .left-side {
        padding-right: 0;
        padding-bottom: 30px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .right-side {
        padding-left: 0;
        padding-top: 30px;
    }
}

/* Стили для 404 страницы */
.not-found-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    text-align: center;
    animation: fadeInUp 0.5s ease forwards;
}

.not-found-container h1 {
    color: #007acc;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.not-found-container p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
}

.not-found-links {
    background-color: #f5f9ff;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    text-align: left;
}

.not-found-links h2 {
    color: #007acc;
    margin-top: 0;
    font-size: 1.3rem;
}

.not-found-links ul {
    padding-left: 20px;
}

.not-found-links li {
    margin-bottom: 10px;
}

/* Общие стили для всех страниц */
.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 800px;
    margin: 30px auto;
    animation: fadeInUp 0.5s ease forwards;
}

/* Стили для 404 страницы */
.not-found-container {
    text-align: center;
}

.not-found-container h1 {
    color: #007acc;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.not-found-container p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
}

.resources-box {
    background-color: #f5f9ff;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    text-align: left;
}

.resources-box h2 {
    color: #007acc;
    margin-top: 0;
    font-size: 1.3rem;
}

.resources-list {
    list-style: none;
    padding: 0;
}

.resources-list li {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.resources-list li:last-child {
    border-bottom: none;
}

.resources-list a {
    color: #007acc;
    text-decoration: none;
    transition: all 0.2s;
    display: block;
    padding: 5px 0;
}

.resources-list a:hover {
    color: #005fa3;
    text-decoration: underline;
    padding-left: 5px;
}

/* Стиль для текста-ссылки на главную */
.home-link {
    cursor: pointer;
    color: #333 !important;
    transition: color 0.2s;
    display: inline-block;
    position: absolute;
    bottom: 0;
    margin-bottom: 20px; /* убираем отступ, чтобы плотно к низу */
}

.home-link:hover {
    color: #007acc !important;
    text-decoration: none !important;
}

/* Стили для страницы загрузки файлов */
#file-input {
    padding: 12px 15px;
    font-size: 1rem;
    width: 100%;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background-color: white;
}

#file-input:focus {
    border-color: #007acc;
    outline: none;
}

#upload-result {
    background: #f5f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

#upload-result p {
    margin: 0 0 10px 0;
}

#download-url {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: white;
    color: #007acc;
    font-weight: 500;
}

/* Стили для предпросмотра файлов */
.file-info h3 {
    margin: 0 0 10px 0;
    color: #333;
    word-break: break-all;
}

.file-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.preview-content {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: #f5f9ff;
    border-radius: 8px;
    padding: 20px;
}

.preview-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.preview-video {
    max-width: 100%;
    max-height: 500px;
    border-radius: 5px;
    background: #000;
}

.preview-audio {
    width: 100%;
    max-width: 500px;
}

.preview-pdf {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 5px;
}

.text-preview {
    width: 100%;
    max-height: 500px;
    overflow: auto;
    background: white;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.no-preview {
    text-align: center;
    padding: 40px;
    color: #666;
}

.download-section {
    text-align: center;
    margin-top: 20px;
}

.download-btn {
    display: inline-block;
    padding: 12px 25px;
    background: #007acc;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #005fa3;
}

.expire-notice {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}






















/* Шапка предпросмотра */
.preview-header {
    background: linear-gradient(135deg, #007acc, #005fa3);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-link {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.preview-nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.preview-nav a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Основной контейнер */
.preview-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.1);
}

.file-info {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.file-info h1 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 10px;
    word-break: break-all;
}

.file-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

/* Область предпросмотра */
.preview-content {
    margin: 30px 0;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f9ff;
    border-radius: 8px;
    padding: 20px;
}

.preview-content img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.preview-content video {
    max-width: 100%;
    max-height: 500px;
    border-radius: 5px;
    background: black;
}

.preview-content audio {
    width: 100%;
    max-width: 500px;
}

.text-preview {
    width: 100%;
    max-height: 500px;
    overflow: auto;
    background: white;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.no-preview {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Секция скачивания */
.download-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.download-btn {
    display: inline-block;
    padding: 12px 25px;
    background: #007acc;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #005fa3;
}

.expire-notice {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .preview-nav {
        display: flex;
        gap: 15px;
    }
    
    .preview-nav a {
        margin-left: 0;
    }
    
    .preview-content {
        min-height: 200px;
    }
}

/* Обновленные стили для предпросмотра */
.preview-content {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    max-height: 60vh; /* Ограничиваем высоту */
    background: #f5f9ff;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden; /* Скрываем то, что выходит за границы */
    position: relative;
}

.preview-image {
    max-width: 100%;
    max-height: 100%; /* Ограничиваем высоту контейнером */
    width: auto;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    object-fit: contain; /* Сохраняем пропорции */
}

/* Стили для кнопки скачивания */
.download-btn {
    display: inline-block;
    padding: 12px 25px;
    background: #007acc;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    margin: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.download-btn:hover {
    background: #005fa3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .preview-content {
        max-height: 50vh;
        padding: 10px;
    }
    
    .download-btn {
        padding: 10px 20px;
        width: 100%;
    }
}

