/* static/css/index.css */
.upload-area {
    border: 2px dashed #444;
    border-radius: 16px;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(78, 205, 196, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area:hover {
    border-color: #4ecdc4;
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(78, 205, 196, 0.2);
}

.upload-area.dragover {
    border-color: #4ecdc4;
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 20px 50px rgba(78, 205, 196, 0.3);
}

.upload-content h2 {
    margin-bottom: 15px;
    color: #e0e0e0;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
}

.upload-content p {
    color: #888;
    margin-bottom: 25px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-content i {
    color: #4ecdc4;
    filter: drop-shadow(0 0 10px rgba(78, 205, 196, 0.3));
}

.preview-item {
    position: relative;
    background-color: #111;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #333;
}

.preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-item .file-info {
    padding: 10px;
    font-size: 0.9rem;
}

.preview-item .file-name {
    color: #fff;
    margin-bottom: 5px;
    word-break: break-all;
}

.preview-item .file-size {
    color: #999;
}

.preview-item.error {
    border-color: #dc3545;
}

.preview-item.error .file-info {
    color: #dc3545;
}

.result-item {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #444;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 400px;
    display: flex;
    gap: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4ecdc4, #45b7d1);
    opacity: 0;
    transition: opacity 0.3s;
}

.result-item:hover::before {
    opacity: 1;
}

.result-item:hover {
    transform: translateY(-8px);
    border-color: #4ecdc4;
    box-shadow: 0 15px 40px rgba(78, 205, 196, 0.2);
}

.result-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 6px;
    object-fit: cover;
}

.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-title {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #fff;
}

.result-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0; /* Позволяет flex-элементу сжиматься */
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 20px 0;
    max-width: 100%;
}

/* Ограничиваем максимум 2 элемента в ряд */
@media (min-width: 800px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 799px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

.result-link {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    word-break: break-all;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3px 0;
    border: 1px solid #444;
    position: relative;
    overflow: hidden;
    min-height: 36px;
}

.result-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(78, 205, 196, 0.1), transparent);
    transition: left 0.3s;
}

.result-link:hover::before {
    left: 100%;
}

.result-link:hover {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    border-color: #4ecdc4;
    transform: translateX(5px);
}

.copy-text {
    background: linear-gradient(135deg, #4ecdc4 0%, #45b7d1 100%);
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
    margin-left: 10px;
    min-width: 50px;
    text-align: center;
}

.album-actions {
    background-color: #222;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.album-actions h4 {
    margin-bottom: 15px;
    color: #007bff;
}

.album-actions .btn {
    margin: 5px;
}

.album-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-items: center;
}

.album-links {
    background-color: #222;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.album-links h4 {
    margin-bottom: 15px;
    color: #007bff;
    text-align: center;
}

.links-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.links-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.links-column h5 {
    color: #fff;
    margin: 0;
    font-size: 1rem;
}

.copy-all-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.copy-all-btn:hover {
    background-color: #0056b3;
}

.link-item {
    background-color: #333;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    word-break: break-all;
    transition: background-color 0.3s;
}

.link-item:hover {
    background-color: #555;
}

.add-more-photos {
    background-color: #222;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px dashed #555;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.add-more-photos h4 {
    margin-bottom: 15px;
    color: #007bff;
    text-align: center;
}

.add-photos-area {
    background-color: #333;
    border: 2px dashed #666;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.add-photos-area:hover {
    border-color: #007bff;
    background-color: #444;
}

.add-photos-area i {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 10px;
}

.add-photos-area p {
    color: #fff;
    font-size: 1.1rem;
    margin: 0;
}

.additional-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.additional-preview-item {
    position: relative;
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
}

.additional-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.additional-preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.8rem;
}

.additional-preview-item .filename {
    padding: 8px;
    color: #fff;
    font-size: 0.8rem;
    word-break: break-all;
}

.upload-new-section {
    text-align: center;
    margin: 30px 0;
}

.upload-new-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border: none;
    padding: 18px 35px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.upload-new-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.upload-new-btn:hover::before {
    left: 100%;
}

.upload-new-btn:hover {
    background: linear-gradient(135deg, #34ce57 0%, #28e0a8 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(40, 167, 69, 0.4);
}

.upload-new-btn i {
    margin-right: 12px;
    font-size: 1.2rem;
}

.upload-area.hidden,
.upload-options.hidden {
    display: none !important;
}

/* Стильный checkbox */
.option-item {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #4ecdc4 !important;
}

.option-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.option-item .custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 2px solid #444;
    border-radius: 4px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.option-item input[type="checkbox"]:checked + .custom-checkbox {
    background: linear-gradient(135deg, #4ecdc4 0%, #45b7d1 100%);
    border-color: #4ecdc4;
}

.option-item input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-weight: bold;
    font-size: 12px;
}

/* Стильный select */
.option-item select {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%) !important;
    color: #e0e0e0 !important;
    border: 1px solid #444 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.option-item select:hover {
    border-color: #4ecdc4 !important;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.2) !important;
}

.option-item select:focus {
    outline: none !important;
    border-color: #4ecdc4 !important;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.3) !important;
}

.option-item select option {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
    padding: 8px !important;
}

/* Upload options grid */
.upload-options {
    margin: 30px 0;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.option-item {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-icon {
    margin-right: 10px;
    font-size: 1.1rem;
}

.option-icon:not(.compress-icon):not(.convert-icon) {
    color: #4ecdc4;
}

.compress-icon {
    color: #ff6b6b;
}

.convert-icon {
    color: #45b7d1;
}

/* Preview grid */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* Upload button */
.upload-btn {
    width: 100%;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .links-columns {
        grid-template-columns: 1fr;
    }
}
