:root {
    --primary-color: #2c3e50;
    --primary-light: #3d566e;
    --secondary-color: #3498db;
    --secondary-light: #5faee3;
    --success-color: #27ae60;
    --success-light: #3cc374;
    --danger-color: #e74c3c;
    --danger-light: #eb6d60;
    --warning-color: #f39c12;
    --warning-light: #f5b143;
    --background-color: #f5f7fa;
    --card-background: #ffffff;
    --text-color: #34495e;
    --light-text: #7f8c8d;
    --border-color: #dfe6e9;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px;
    overflow: hidden;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary-color), var(--success-color));
    border-radius: 2px;
}


.card {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-header i {
    font-size: 1.5em;
}

.card-body {
    padding: 25px;
}


.steps-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-color);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--light-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 10px;
    transition: var(--transition);
}

.step-title {
    color: var(--light-text);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.1);
}

.step.active .step-title {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed .step-number {
    background: var(--success-color);
    color: white;
}


.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    transition: var(--transition);
}

.file-upload-area:hover {
    border-color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.05);
}

.file-upload-area i {
    font-size: 3em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.file-upload-area p {
    color: var(--light-text);
    margin-bottom: 15px;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-info {
    color: var(--light-text);
    font-size: 0.9em;
    text-align: center;
    margin-top: 15px;
}


button, .btn-primary, .btn-secondary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover, .btn-primary:hover, .btn-secondary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

button:active, .btn-primary:active, .btn-secondary:active {
    transform: translateY(0);
}


.btn-control {
    background-color: var(--secondary-color);
    color: white;
}

.btn-control:hover {
    background-color: var(--secondary-light);
}


.delete-btn {
    background-color: var(--danger-color);
}

.delete-btn:hover {
    background-color: var(--danger-light);
}


.btn-large {
    padding: 18px 30px;
    font-size: 1.1em;
    width: 100%;
}


a.btn-primary {
    text-decoration: none;
    display: inline-flex;
}

.qr-result {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.qrcode-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.qr-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    .qr-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .qr-actions .btn-primary {
        width: 100%;
    }
}

#pageLinkBtn {
    display: none;
}

/* Видео плеер */
.video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 10px;
    background-color: #000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#videoPlayer {
    width: 100%;
    height: auto;
    display: block;
}

.video-container.vertical {
    max-width: 400px;
    margin: 0 auto;
}

.video-container.horizontal {
    max-width: 100%;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 25px;
}


.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-color);
}

select, input, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95em;
    transition: var(--transition);
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

textarea {
    min-height: 100px;
    resize: vertical;
}


.contact-list {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.list-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.contact-item:hover {
    background: #e9ecef;
}


.progress-container {
    width: 100%;
    background-color: #f1f1f1;
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 8px;
    background-color: var(--success-color);
    width: 0%;
    transition: width 0.3s ease;
}


.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: var(--success-color);
    color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.error {
    background: var(--danger-color);
}

.notification.warning {
    background: var(--warning-color);
}

.notification.show {
    transform: translateX(0);
}

.notification-icon {
    font-size: 1.2em;
}


@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .steps-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .steps-container::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        gap: 15px;
        align-items: center;
        text-align: left;
    }
    
    .step-number {
        margin-bottom: 0;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        padding: 15px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .qr-actions {
        flex-direction: column;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.upload-section {
    animation: fadeIn 0.4s ease-out;
}

.video-section {
    animation: fadeIn 0.4s ease-out 0.1s both;
}

.contact-info {
    animation: fadeIn 0.4s ease-out 0.2s both;
}

.qr-section {
    animation: fadeIn 0.4s ease-out 0.3s both;
    
}

.format-notification {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.format-notification i {
    margin-right: 10px;
    font-size: 16px;
}

.manage-pages {
    animation: fadeIn 0.4s ease-out;
}

.search-section {
    margin-bottom: 20px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.search-input-group input {
    flex: 1;
    padding: 12px 15px;
}

.search-btn {
    width: auto;
    padding: 12px 20px;
}

.search-hint {
    color: var(--light-text);
    font-size: 0.85em;
    margin-top: 5px;
}

.section-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--primary-color);
    font-weight: 600;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.section-divider::before {
    margin-right: 15px;
}

.section-divider::after {
    margin-left: 15px;
}

.video-edit-section,
.contacts-edit-section {
    background: rgba(245, 247, 250, 0.7);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.video-preview-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

#editVideoPlayer {
    width: 100%;
    height: auto;
    display: block;
}

.contacts-list {
    margin-top: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item span {
    flex: 1;
}

.save-all-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 1.1em;
    background: linear-gradient(135deg, var(--success-color) 0%, var(--secondary-color) 100%);
}

.save-all-btn:hover {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--secondary-light) 100%);
}

.empty-contacts {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    color: var(--light-text);
    background: white;
    border-radius: 8px;
    justify-content: center;
}


.file-upload-area.dragover {
    border-color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.1);
}


@media (max-width: 768px) {
    .search-input-group {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .video-edit-section,
    .contacts-edit-section {
        padding: 15px;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .contact-item button {
        width: 100%;
    }
}
.search-hint {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0 0 0;
    display: flex;
    align-items: center;
    font-size: 14px;
    border: 1px solid #bbdefb;
    width: 100%;
    box-sizing: border-box;
}

.search-hint i {
    margin-right: 10px;
    font-size: 16px;
    color: #1976d2;
}
/* Стили для формы входа */
.login-form {
    max-width: 400px;
    margin: 50px auto;
}

.error-message {
    color: #dc3545;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8d7da;
    border-radius: 4px;
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}

.login-page {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-form {
    max-width: 400px;
    width: 100%;
    animation: fadeIn 0.6s ease-out;
}

.login-form .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 25px;
    text-align: center;
}

.login-form .card-header h3 {
    margin: 0;
    font-size: 1.5em;
    color: white;
}

.login-form .card-body {
    padding: 30px;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1em;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 500;
}

.login-form input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: var(--transition);
    background-color: #f8f9fa;
    font-family: 'Inter', sans-serif;
}

.login-form input[type="password"]:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    background-color: white;
    outline: none;
}

.login-form button[type="submit"] {
    width: 100%;
    padding: 16px;
    font-size: 1.1em;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    margin-top: 10px;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.login-form button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.error-message {
    background-color: #fef2f2;
    color: var(--danger-color);
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid var(--danger-color);
    animation: fadeIn 0.3s ease-out;
}

.error-message i {
    font-size: 1.2em;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}


@media (max-width: 768px) {
    .login-page {
        padding: 15px;
    }
    
    .login-form .card-body {
        padding: 20px;
    }
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 45px;
    width: 100%;
    -webkit-appearance: none; 
    -moz-appearance: none; 
    appearance: none;
}


.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent; 
    outline: none;
}


.password-toggle:hover {
    color: var(--secondary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.password-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}


.password-toggle i {
    font-size: 1.1em;
    transition: all 0.3s ease;
    position: absolute;
}


.password-toggle .fa-eye {
    opacity: 1;
}

.password-toggle .fa-eye-slash {
    opacity: 0;
}

.password-toggle.showing .fa-eye {
    opacity: 0;
}

.password-toggle.showing .fa-eye-slash {
    opacity: 1;
}


@keyframes toggleClick {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(0.9); }
    100% { transform: translateY(-50%) scale(1); }
}

.password-toggle.clicked {
    animation: toggleClick 0.3s ease;
}


@media (max-width: 768px) {
    .password-toggle {
        width: 40px;
        height: 40px;
        right: 5px;
    }
    
    .password-toggle i {
        font-size: 1.2em;
    }
}


.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}


.password-toggle::-moz-focus-inner {
    border: 0;
}
#geolocationList .contact-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

#geolocationList .contact-item span {
    font-size: 0.95em;
    color: var(--text-color);
}

#geolocationList .empty-contacts {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    color: var(--light-text);
    background: white;
    border-radius: 8px;
    justify-content: center;
}
.map-btn {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--secondary-color) 100%);
}
.map-btn:hover {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--secondary-light) 100%);
}
        .nav-menu {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 20px;
        }

        .dropdown {
            position: relative;
        }

        .dropdown-toggle {
            background-color: var(--primary-color);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 500;
            font-size: 0.95em;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: var(--transition);
        }

        .dropdown-toggle:hover {
            background-color: var(--primary-light);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            background: var(--card-background);
            border-radius: 8px;
            box-shadow: var(--shadow);
            min-width: 200px;
            overflow: hidden;
            z-index: 1000;
            display: none;
            animation: fadeIn 0.3s ease-out;
        }

        .dropdown-menu.show {
            display: block;
        }

        .dropdown-item {
            display: block;
            padding: 12px 20px;
            color: var(--text-color);
            text-decoration: none;
            transition: var(--transition);
            font-size: 0.95em;
        }

        .dropdown-item:hover {
            background-color: var(--background-color);
            color: var(--secondary-color);
        }

        @media (max-width: 768px) {
            .nav-menu {
                justify-content: center;
            }
            .dropdown-menu {
                min-width: 150px;
            }
        }

.nav-menu {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.dropdown {
    position: relative;
    z-index: 1000;
}

.dropdown-toggle {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.dropdown-toggle:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    min-width: 400px; /* Увеличено с 200px до 400px */
    overflow: hidden;
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95em;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--secondary-color);
}

.dropdown-item:hover {
    background-color: var(--background-color);
    color: var(--secondary-color);
    padding-left: 25px;
}


.dropdown-item {
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.dropdown-menu.show .dropdown-item {
    opacity: 1;
    transform: translateX(0);
}

.dropdown-menu.show .dropdown-item:nth-child(1) {
    transition-delay: 0.1s;
}

.dropdown-menu.show .dropdown-item:nth-child(2) {
    transition-delay: 0.15s;
}

.dropdown-menu.show .dropdown-item:nth-child(3) {
    transition-delay: 0.2s;
}

@media (max-width: 768px) {
    .nav-menu {
        justify-content: center;
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropdown-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .dropdown-menu {
        width: 100%;
    }
}
/* Добавьте в конец файла styles.css */

/* Улучшение для поля ввода ID в меню */
#menuPageId {
    transition: var(--transition);
}

#menuPageId:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

/* Убедимся, что dropdown-item занимает всю ширину */
.dropdown-menu .dropdown-item {
    width: 100%;
    box-sizing: border-box;
}