 * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Roboto', system-ui, sans-serif;
            color: #ffffff;
            min-height: 100vh;
            overflow-x: hidden;
            background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%),
                        linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
        }

       .container {
            display: flex;
            flex-direction: column;
            height: 95vh;
            max-width: 1600px;
            margin: 0 auto;
            position: relative;
        }

        /* Floating Header */
.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(15, 15, 30, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 16px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: calc(100% - 40px); /* Делаем шире */
    max-width: 1560px; /* Увеличиваем максимальную ширину */
    transition: all 0.3s ease;
}

        .header.collapsed {
            padding: 12px 24px;
            background: rgba(15, 15, 30, 0.95);
        }

        .header-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
        }

        .logo {
            font-size: 24px;
            font-weight: 700;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            white-space: nowrap;
        }

        .quick-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .lang-swap {
            display: flex;
            align-items: center;
            gap: 8px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 8px 12px;
        }

        .lang-select {
            background: transparent;
            border: none;
            color: #ffffff;
            font-size: 14px;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .lang-select:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .swap-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        .swap-btn:hover {
            transform: rotate(180deg) scale(1.1);
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
        }

        .settings-btn {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            padding: 8px 16px;
            color: #ffffff;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .settings-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateY(-2px);
        }

        /* Main Content */
.main-content {
    flex: 1;
    display: flex;
    gap: 0; /* Убираем gap для ресайзера */
    padding: 120px 20px 0px; /* Увеличиваем нижний отступ */
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.editor-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 300px; /* Минимальная ширина */
}

.editor-panel:first-child {
    margin-right: 10px;
}

.editor-panel:last-child {
    margin-left: 10px;
}










        .editor-header {
            background: rgba(255, 255, 255, 0.05);
            padding: 16px 24px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .editor-title {
            font-size: 16px;
            font-weight: 600;
            color: #ffffff;
        }

        .editor-actions {
            display: flex;
            gap: 8px;
        }

        .action-btn {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: #ffffff;
            padding: 6px 12px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.2s ease;
        }

        .action-btn:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .editor-content {
            position: relative;
            height: calc(100vh - 200px);
        }

        .editor-textarea {
            width: 100%;
            height: 100%;
            background: transparent;
            border: none;
            color: #ffffff;
            font-size: 16px;
            line-height: 1.6;
            resize: none;
            outline: none;
            padding: 24px;
            font-family: inherit;
            overflow-y: auto;
        }

        .editor-textarea::placeholder {
            color: rgba(255, 255, 255, 0.4);
        }

        .editor-textarea:focus {
            outline: none;
        }



    .resizer {
    width: 20px;
    background: rgba(255, 255, 255, 0.1);
    cursor: col-resize;
    border-radius: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.resizer:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.resizer::before {
    content: '';
    width: 4px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.resizer:hover::before {
    background: rgba(255, 255, 255, 0.6);
    height: 60px;
}













        /* Floating Translate Button */
.translate-fab {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px; /* Добавляем отступ от низа */
}
        .translate-fab:hover {
            transform: translateX(-50%) translateY(-5px);
            box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
        }

        .translate-fab:active {
            transform: translateX(-50%) translateY(-2px);
        }

        .translate-fab.loading {
            pointer-events: none;
        }

        .translate-fab.loading::after {
            content: '';
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top: 2px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Settings Panel */
        .settings-panel {
            position: fixed;
            top: 0;
            right: -400px;
            width: 400px;
            height: 100vh;
            background: rgba(15, 15, 30, 0.95);
            backdrop-filter: blur(20px);
            border-left: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
            z-index: 2000;
            overflow-y: auto;
        }

        .settings-panel.open {
            right: 0;
        }

        .settings-header {
            padding: 24px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .settings-title {
            font-size: 20px;
            font-weight: 600;
            color: #ffffff;
        }

        .close-btn {
            background: none;
            border: none;
            color: #ffffff;
            font-size: 24px;
            cursor: pointer;
            padding: 8px;
            border-radius: 8px;
            transition: all 0.2s ease;
        }

        .close-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .settings-content {
            padding: 24px;
        }

        .setting-group {
            margin-bottom: 32px;
        }

        .setting-label {
            display: block;
            font-size: 14px;
            font-weight: 600;
            color: #ffffff;
            margin-bottom: 12px;
        }

        .setting-input {
            width: 100%;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 12px 16px;
            color: #ffffff;
            font-size: 14px;
            transition: all 0.3s ease;
        }
        .setting-input option,.lang-select option{background-color:#101017; color:#ffffff;}
        .setting-input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .setting-textarea {
            resize: vertical;
            min-height: 80px;
            font-family: inherit;
        }

        /* Emotion Slider */
        .emotion-control {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 20px;
        }

        .emotion-slider {
            position: relative;
            width: 100%;
            height: 8px;
            background: linear-gradient(90deg, #475569, #ef4444, #f59e0b, #10b981);
            border-radius: 4px;
            cursor: pointer;
            margin: 16px 0;
        }

        .emotion-slider-thumb {
            position: absolute;
            top: -8px;
            width: 24px;
            height: 24px;
            background: #667eea;
            border: 3px solid white;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        .emotion-slider-thumb:hover {
            transform: scale(1.2);
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
        }

        .emotion-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 12px;
        }

        .emotion-percent {
            font-size: 14px;
            color: #667eea;
            font-weight: 600;
        }

        /* File Upload */
        .file-upload-area {
            border: 2px dashed rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            padding: 24px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.02);
        }

        .file-upload-area:hover,
        .file-upload-area.drag-over {
            border-color: #667eea;
            background: rgba(102, 126, 234, 0.1);
        }

        .file-upload-icon {
            font-size: 32px;
            margin-bottom: 12px;
            opacity: 0.6;
        }

        .file-upload-text {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.7);
        }








/* Responsive Design */
@media (max-width: 768px) {
 .header {
        width: calc(100% - 20px);
        max-width: none;
        margin: 0 0 1rem 0;
    }

 .header-content {
                flex-direction: column;
                gap: 16px;
            }

            .logo {
                font-size: 20px;
            }

            .quick-controls {
                width: 100%;
                justify-content: center;
            }

            .lang-swap {
                flex: 1;
                justify-content: center;
            }

 .main-content {
        flex-direction: column;
        gap: 16px;
        padding: 20px 20px 120px;
    }

.editor-content {
    position: relative;
    height: calc(100vh - 280px); /* Увеличиваем отступ для кнопки */
}
.editor-panel:first-child,
    .editor-panel:last-child {
        margin: 0;
    }
    
    .resizer {
        display: none;
    }
    
    .translate-fab {
        bottom: 20px;
    }

.settings-panel {
                width: 100%;
                right: -100%;
            }
#settingsBtn{width: 100%;}
}



.youtube-button {
  display: inline-flex;
  align-items: center;
  padding: 0px 0px 0px 7px;
  background-color: #FF0000;
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  margin: 16px -10px -10px 17px;
  position: absolute;
  width: 36px;
  height: 36px;
}

.youtube-button i {
margin:-2px 10px 0px 0px;
font-size: 20px;
}

.youtube-button:hover {
  background-color: #cc0000;
}








        /* Backdrop for mobile settings */
        .settings-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1900;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .settings-backdrop.open {
            opacity: 1;
            visibility: visible;
        }

        /* Stats */
        .text-stats {
            position: absolute;
            bottom: 16px;
            right: 24px;
            font-size: 12px;
            color: rgba(255, 255, 255, 0.5);
            pointer-events: none;
        }

        /* Micro-animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .editor-panel {
            animation: fadeInUp 0.6s ease;
        }

        .editor-panel:nth-child(2) {
            animation-delay: 0.2s;
        }

        /* Glassmorphism effect */
        .glass {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }









#translatedText:empty:before {
    content: attr(placeholder);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.editor-panel.loading {
                opacity: 0.7;
                pointer-events: none;
            }
            
            .translate-fab.loading {
                pointer-events: none;
            }
            
            .translate-fab.loading::after {
                content: '';
                width: 20px;
                height: 20px;
                border: 2px solid rgba(255, 255, 255, 0.3);
                border-top: 2px solid white;
                border-radius: 50%;
                animation: spin 1s linear infinite;
                margin-left: 8px;
            }
            
            @keyframes spin {
                0% { transform: rotate(0deg); }
                100% { transform: rotate(360deg); }
            }
            
            .drag-over {
                border-color: #667eea !important;
                background: rgba(102, 126, 234, 0.1) !important;
            }

#translationModal{position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 4000; display: flex; align-items: center; justify-content: center;}
#modalOutput{width: 100%; height: 200px; padding: 12px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; background: rgba(255, 255, 255, 0.05); color: white; resize: vertical; overflow-y: auto; white-space: pre-wrap;}
#modalCancel{padding: 8px 16px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; background: transparent; color: white; cursor: pointer;}
#modalTitle{margin: 0; color: white;}
#modalClose{background: none; border: none; color: white; font-size: 24px; cursor: pointer;}
#modalInput{width: 100%;padding: 12px;border: 1px solid rgba(255, 255, 255, 0.2);border-radius: 8px;background: rgba(255, 255, 255, 0.1);color: white;font-size: 15px;}
#modalProcess{padding: 8px 16px; border: none; border-radius: 8px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; cursor: pointer;}
#modalApply{padding: 8px 16px; border: none; border-radius: 8px; background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; cursor: pointer;}
#modalOutput b{color: #09a372;}
#modalOutput span{color: #6e6e6e;}

#modalOutput::-webkit-scrollbar,.editor-textarea::-webkit-scrollbar {width: 8px; height:8px;}
#modalOutput::-webkit-scrollbar-track,.editor-textarea::-webkit-scrollbar-track { background-color: #f3ecff21; border-radius: 4px;}
#modalOutput::-webkit-scrollbar-thumb,.editor-textarea::-webkit-scrollbar-thumb { background-color: #241d32fa;background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%), linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);border-radius: 4px;}
#modalOutput,.editor-textarea {scrollbar-width: thin; scrollbar-color: #000 #222;}
#modalOutput::-webkit-scrollbar-thumb:hover,.editor-textarea::-webkit-scrollbar-thumb:hover {background: linear-gradient(135deg, #665eff, #ff55bb, #44ddee); box-shadow: 0 0 4px rgba(255, 255, 255, 0.3); cursor: grab;}
.text-stats.limit-exceeded{color:#F00;}
#modalOutput ul,#modalOutput ol{margin:1rem;}

#menu{
    float:right;
    position: fixed;
    z-index: 1;
    right: 10px;
    top: 10px;
}
#menu:hover{cursor:pointer;}

#glmn {
    position: absolute;
    width: 185px;
    height: 85px;
    margin: -5px -5px 0px 0px;
    right: 9px;
    top: 51px;
    border-radius: 8px;
    padding: 15px 20px 15px 20px;
    display: none;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #FFF;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgb(0 0 0 / 20%);
}
#glmn a {
    float: left;
    width: 100%;
    color: #fff;
    text-decoration: none;
    margin: 0px 0px 10px 0px;
    font-size: 14px;
}
#glmn a:hover{text-decoration:underline;}
#glmn a.exit {
    text-align: right;
    color: #fff;
    font-size: 13px;
    /* margin: 8px -9px -24px 5px; */
    width: auto;
    float: right;
    background-color: #000;
    border-radius: 4px;
    padding: 3px 5px 3px 5px;
}