* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 30px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
}

h1 + p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.upload-form {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px dashed #dee2e6;
    transition: all 0.3s;
}

.upload-form:hover {
    border-color: #667eea;
    background: #f1f3f5;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-label {
    display: inline-block;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
}

.file-label:hover {
    background: #5a67d8;
}

#fileCount {
    margin-left: 15px;
    color: #666;
    font-size: 0.95em;
}

.submit-btn {
    background: #48bb78;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 4px 6px rgba(72, 187, 120, 0.3);
}

.submit-btn:hover {
    background: #38a169;
}

.actions-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    padding: 15px;
    background: #edf2f7;
    border-radius: 10px;
}

.copy-all-btn {
    background: #9f7aea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 4px 6px rgba(159, 122, 234, 0.3);
}

.copy-all-btn:hover {
    background: #805ad5;
}

.files-count {
    color: #4a5568;
    font-weight: 500;
}

.file-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.file-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.file-icon {
    font-size: 1.2em;
}

.file-path {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-weight: 600;
    color: #2d3748;
}

.file-status {
    font-size: 1.5em;
    line-height: 1;
}

.status-success {
    color: #48bb78;
}

.copy-file-btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-file-btn:hover {
    background: #3182ce;
}

.file-content {
    margin: 0;
    padding: 20px;
    background: #1a202c;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
    max-height: 400px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 12px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #fc8181;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #48bb78;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .file-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .actions-panel {
        flex-direction: column;
        gap: 10px;
    }
}

/* Добавьте эти стили в конец style.css */

.project-structure {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.project-structure h3 {
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.2em;
}

.tree-view {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.95em;
}

.tree-item {
    padding: 4px 0;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    transition: background 0.2s;
}

.tree-item:hover {
    background: #edf2f7;
    border-radius: 4px;
}

.tree-item.root {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 8px;
    padding-left: 0;
}

.tree-prefix {
    color: #a0aec0;
    font-family: monospace;
    width: 20px;
}

.tree-icon {
    font-size: 1em;
}

.tree-name {
    font-weight: 500;
}

.tree-path {
    color: #718096;
    font-size: 0.85em;
    font-family: monospace;
}

.path-folders {
    color: #718096;
    font-size: 0.9em;
    font-weight: normal;
}

.filename {
    color: #2d3748;
    font-weight: 600;
    margin-left: 4px;
}

.file-header {
    cursor: pointer;
    user-select: none;
}

.file-header button {
    cursor: pointer;
}

/* Анимация для карточек */
.file-card {
    transition: border-left 0.2s, transform 0.2s;
}

.file-card:hover {
    transform: translateX(4px);
}

/* Добавьте эти стили в конец style.css */

.folders-navigation {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.folders-navigation h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
    color: white;
    opacity: 0.95;
}

.folders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.folder-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.folder-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
    border-color: rgba(255, 255, 255, 0.3);
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.folder-icon {
    font-size: 1.4em;
}

.folder-name {
    font-weight: 600;
    font-size: 1.1em;
    flex: 1;
}

.folder-stats {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
}

.copy-folder-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.copy-folder-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.files-by-folders {
    margin-top: 30px;
}

.folder-section {
    background: white;
    border-radius: 20px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.folder-section:hover {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

.folder-section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #dee2e6;
}

.folder-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.folder-icon-large {
    font-size: 2em;
}

.folder-section-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.4em;
}

.folder-badge {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.9em;
    font-weight: 600;
}

.copy-folder-section-btn {
    background: #9f7aea;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1em;
    box-shadow: 0 4px 10px rgba(159, 122, 234, 0.3);
}

.copy-folder-section-btn:hover {
    background: #805ad5;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(159, 122, 234, 0.4);
}

.folder-files {
    padding: 15px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .folder-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .folder-section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .folder-title {
        flex-wrap: wrap;
    }
    
    .copy-folder-section-btn {
        width: 100%;
    }
}

/* Анимация для новых элементов */
@keyframes folderAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.folder-section {
    animation: folderAppear 0.5s ease-out;
}

/* Стили для авторизации */
.header-with-auth {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.auth-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #edf2f7;
    padding: 8px 16px;
    border-radius: 40px;
}

.user-greeting {
    color: #4a5568;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn {
    background: #f56565;
    color: white;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    background: #c53030;
    transform: scale(1.05);
}

.success-message {
    background: #c6f6d5;
    color: #22543d;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #48bb78;
    font-weight: 500;
}

/* Индикатор защиты */
.protected-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #faf089;
    color: #744210;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.85em;
    font-weight: 600;
    margin-left: 15px;
}

/* Стили для модалки входа (если нужно) */
.modal-login {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-login.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

/* Стили для истории */
.history-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.history-section h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.empty-history {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    color: #718096;
    border: 2px dashed #cbd5e0;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.history-item {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.history-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateX(5px);
}

.history-item.active {
    border-left: 4px solid #48bb78;
    background: #f0fff4;
}

.history-item.deleted {
    opacity: 0.7;
    background: #fff5f5;
}

.history-item-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
}

.history-icon {
    font-size: 1.5em;
}

.history-info {
    flex: 1;
}

.history-name-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.history-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1em;
}

.history-warning {
    color: #e53e3e;
    font-size: 0.85em;
    font-weight: 500;
}

.history-meta {
    display: flex;
    gap: 15px;
    color: #718096;
    font-size: 0.9em;
}

.history-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-actions {
    display: flex;
    gap: 8px;
}

.history-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.load-btn {
    background: #4299e1;
    color: white;
}

.load-btn:hover {
    background: #3182ce;
}

.rename-btn {
    background: #edf2f7;
    color: #4a5568;
}

.rename-btn:hover {
    background: #e2e8f0;
}

.delete-btn {
    background: #fed7d7;
    color: #c53030;
}

.delete-btn:hover {
    background: #feb2b2;
}

.rename-form {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f7fafc;
}

.rename-form form {
    display: flex;
    gap: 10px;
}

.rename-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95em;
}

.rename-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

.rename-submit {
    background: #48bb78;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.rename-submit:hover {
    background: #38a169;
}

.rename-cancel {
    background: #cbd5e0;
    color: #4a5568;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.rename-cancel:hover {
    background: #a0aec0;
}

.current-project {
    margin-top: 30px;
}

.current-project h2 {
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

/* Стили для структуры сайта */
.site-structure {
    margin-top: 40px;
    padding: 20px;
    background: #1a202c;
    border-radius: 16px;
    color: #e2e8f0;
}

.site-structure h2 {
    color: white;
    margin-bottom: 15px;
}

.structure-content {
    background: #2d3748;
    border-radius: 12px;
    padding: 20px;
}

.structure-content pre {
    margin: 0;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e0;
    overflow-x: auto;
}

.copy-structure-btn {
    margin-top: 15px;
    background: #4299e1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.copy-structure-btn:hover {
    background: #3182ce;
    transform: translateY(-2px);
}

/* Стили для скролла */
.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Стили для структуры ZIP */
.zip-structure-section {
    margin: 30px 0;
    padding: 20px;
    background: #1a202c;
    border-radius: 16px;
    color: #e2e8f0;
    border: 1px solid #2d3748;
}

.zip-structure-section h2 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.zip-structure-content {
    background: #2d3748;
    border-radius: 12px;
    padding: 20px;
}

.zip-tree {
    margin: 0;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #cbd5e0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.copy-structure-btn {
    margin-top: 15px;
    background: #4299e1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.95em;
}

.copy-structure-btn:hover {
    background: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

/* Стили для сообщений */
.success-message {
    background: #c6f6d5;
    color: #22543d;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #48bb78;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.1);
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #fc8181;
    font-weight: 500;
}