:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.material-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}
.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}
.material-card.out-of-stock::before {
    content: "Нет в наличии";
    position: absolute;
    top: 23px;
    right: -44px;
    background: var(--accent-color);
    color: white;
    padding: 8px 30px;
    transform: rotate(45deg) translateZ(0);
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    will-change: transform;
}
.material-header {
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
}
.material-header h2 {
    font-size: 1.4rem;
}
.material-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.material-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.material-card:hover .material-image img {
    transform: scale(1.05);
}
.material-content {
    padding: 15px;
    position: relative;
}
.characteristics {
    margin-bottom: 15px;
}
.characteristics p {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
}
.analog {
    background-color: #fff9e6;
    border-left: 4px solid var(--warning-color);
    padding: 12px;
    margin: 15px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.analog h3 {
    color: var(--warning-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}
.analog ul {
    margin-top: 8px;
    padding-left: 20px;
}
.analog li {
    margin-bottom: 5px;
    line-height: 1.4;
}
/* Дополнительные стили для улучшения видимости разделителей */
.profiles {
    margin-top: 20px;
}

.profiles h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--light-color);
    padding-bottom: 8px;
}
/* Стили для разделителей между профилями в карточках материалов */
.profile-item {
    padding: 16px 0;
    border-bottom: 2px solid #e0e0e0; /* Увеличили толщину и изменили цвет */
    position: relative;
	margin-bottom: 8px; /* Добавили отступ снизу для лучшего разделения */
}
.profile-item:last-child {
    border-bottom: none; /* Убираем разделитель у последнего элемента */
	margin-bottom: 0; /* Убираем отступ у последнего элемента */
}

.profile-item::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #9ca3af 50%, transparent 100%);
    display: none; /* Скрываем старый градиентный разделитель */
}
/* Увеличиваем отступы для лучшего визуального разделения */
.profile-name-price {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px; /* Увеличили отступ */
    align-items: center;
}
.profile-name {
    font-weight: 500;
}
.profile-price {
    font-weight: bold;
    color: var(--primary-color);
}
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}
.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
    touch-action: manipulation;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .profile-item {
        padding: 14px 0;
        border-bottom: 2px solid #d0d0d0; /* Немного светлее на мобильных */
        margin-bottom: 6px;
    }
    
    .profile-name-price {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .profile-item {
        padding: 12px 0;
        border-bottom: 2px solid #d8d8d8;
        margin-bottom: 4px;
    }
}

@media (max-width: 768px) {
    .color-option {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    .material-calculation {
        padding: 15px;
        background: white;
        border-radius: var(--border-radius);
        box-shadow: var(--box-shadow);
        margin-bottom: 20px;
    }
    
    .result-item {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .result-item:last-child {
        border-bottom: none;
    }
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .result-item span:last-child {
        font-weight: bold;
        color: var(--primary-color);
        padding-left: 15px;
    }
    
    .result-additional .result-item {
        padding-left: 0;
    }
    
    .result-additional .result-item span:last-child {
        padding-left: 30px;
    }
    
    .result-total {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        border-top: 2px solid var(--primary-color);
        padding-top: 15px;
        margin-top: 15px;
    }
    
    .result-total span:last-child {
        font-size: 1.3rem;
        color: var(--accent-color);
    }
}
.ral-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 2px rgba(0,0,0,0.8);
    pointer-events: none;
    line-height: 1;
}
.color-option[style*="background-color: #fff"],
.color-option[style*="background-color: #f"],
.color-option[style*="background-color: #e"],
.color-option[style*="background-color: #d"],
.color-option[style*="background-color: #c"] {
    .ral-number {
        color: #333;
        text-shadow: 0 0 2px rgba(255,255,255,0.8);
    }
}

@media (max-width: 768px) {
    .ral-number {
        font-size: 9px;
    }
}
.color-option:active {
    transform: scale(0.95);
}
.color-preview-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.color-preview-container.active {
    display: flex;
}
.color-preview {
    width: 750px;
    height: 440px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    padding: 15px;
    position: relative;
    border: 1px solid #ddd;
}
.color-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.close-preview {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 1.5rem;
    line-height: 1;
    touch-action: manipulation;
    user-select: none;
    transition: var(--transition);
}
.close-preview:hover {
    background: #c0392b;
    transform: scale(1.1);
}
.close-preview:active {
    transform: scale(0.95);
}

/* Стили для модального окна увеличенного изображения */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.image-modal.active {
    display: flex;
    opacity: 1;
}
.image-modal .modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: transparent;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    animation: zoomIn 0.3s ease;
}
@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.image-modal .modal-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}
.image-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1;
    z-index: 10;
    transition: var(--transition);
    border: 2px solid white;
}
.image-modal .close-modal:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.image-modal .close-modal:active {
    transform: scale(0.95);
}


.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.modal-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1;
    z-index: 10;
    transition: var(--transition);
}
.close-modal:hover {
    background: #c0392b;
    transform: scale(1.1);
}
.close-modal:active {
    transform: scale(0.95);
}

.calculator {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 40px;
}
.calculator h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 10px;
}
.calculator-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}
.area-input {
    display: flex;
    align-items: center;
    gap: 10px;
}
.area-input label {
    font-weight: 500;
    color: var(--dark-color);
    white-space: nowrap;
}
.area-input input {
    width: 150px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    touch-action: manipulation;
    min-height: 44px;
}
.area-input input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}
.profile-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.profile-option {
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 10px;
    touch-action: manipulation;
    user-select: none;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 219px;
    height: 140px;
    margin: 0 auto;
}
.profile-option:hover {
    background-color: #f8f9fa;
}
.profile-option.selected {
    border-color: var(--secondary-color);
    background-color: rgba(52, 152, 219, 0.1);
}
.profile-image {
    width: 219px;
    height: 115px;
    margin: 0 auto 5px;
    overflow: hidden;
    transition: var(--transition);
    flex-shrink: 0;
}
.profile-option:hover .profile-image {
    transform: none;
}
.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-label {
    font-weight: 500;
    margin-top: 0;
    font-size: 0.9rem;
    line-height: 1.2;
}
.warning-message {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 20px 0;
    color: #856404;
}
.additional-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}
.additional-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    min-height: 60px;
}
.additional-option input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
    touch-action: manipulation;
}
.additional-option label {
    font-weight: 500;
    min-width: 200px;
    cursor: pointer;
    padding: 5px 0;
}
.additional-option input[type="number"] {
    width: 100px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    min-height: 44px;
    touch-action: manipulation;
}
.results {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 25px;
}
.material-calculation {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    position: relative;
}
.material-calculation:last-child {
    margin-bottom: 0;
    border-bottom: none;
}
.material-calculation::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #9ca3af 50%, transparent 100%);
}
.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}
.result-additional {
    font-style: italic;
    color: #6c757d;
    padding-left: 15px;
}
.result-total {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--light-color);
    display: flex;
    justify-content: space-between;
}
.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted var(--secondary-color);
    cursor: help;
    margin-left: 5px;
    z-index: 1000;
}
.tooltip .tooltiptext {
    visibility: hidden;
    width: 280px;
    background-color: var(--dark-color);
    color: white;
    text-align: left;
    border-radius: var(--border-radius);
    padding: 12px;
    position: absolute;
    z-index: 10000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: normal;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    white-space: normal;
    word-wrap: break-word;
}
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--dark-color) transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    margin-top: 40px;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.footer-logo {
    font-size: 1.8rem;
    font-weight: bold;
}
.footer-description {
    text-align: center;
    max-width: 600px;
}
.footer-contacts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.footer-phone {
    font-size: 1.2rem;
    font-weight: bold;
}
.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
    touch-action: manipulation;
}
.social-icon:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}
.image-error {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    padding: 10px;
}
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
}
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
	    .image-modal .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    .image-modal .close-modal {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    .materials-grid {
        grid-template-columns: 1fr;
    }
    .calculator-controls {
        grid-template-columns: 1fr;
    }
    .profile-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .profile-option {
        width: 100%;
        max-width: 200px;
        height: 130px;
        margin: 0 auto;
    }
    .profile-image {
        width: 100%;
        height: 90px;
    }
    h1 {
        font-size: 2rem;
    }
    .color-preview {
        width: 95vw;
        height: calc(95vw * 440 / 750);
        max-width: 95vw;
        max-height: 70vh;
    }
    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    .close-modal {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    .additional-option {
        flex-direction: column;
        align-items: flex-start;
    }
    .additional-option label {
        min-width: auto;
    }
    .tooltip .tooltiptext {
        width: 250px;
        font-size: 0.8rem;
        left: 50%;
        transform: translateX(-50%);
    }
    .tooltip .tooltiptext::after {
        left: 50%;
    }
    .area-input {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .area-input input {
        width: 100%;
    }
    .profile-option {
        min-height: 160px;
        padding: 12px;
    }
    .profile-image {
        width: 180px;
        height: 95px;
    }
}
@media (max-width: 480px) {
    .profile-options {
        grid-template-columns: 1fr;
    }
    .profile-option {
        max-width: 220px;
        height: 140px;
    }
    .profile-image {
        height: 100px;
    }
    .color-preview {
        width: 98vw;
        height: calc(98vw * 440 / 750);
    }
}
@media (hover: none) and (pointer: coarse) {
    .material-card:hover {
        transform: none;
    }
    .profile-option:hover {
        background-color: transparent;
    }
    .profile-option:active {
        background-color: #f8f9fa;
    }
    .social-icon:hover {
        transform: none;
        background-color: rgba(255, 255, 255, 0.1);
    }
    .social-icon:active {
        background-color: var(--secondary-color);
        transform: scale(0.95);
    }
}
.profile-image-small {
    margin: 8px 0;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.profile-image-small img {
    max-width: 108px;
    max-height: 43px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
@media (max-width: 768px) {
    .profile-image-small img {
        max-width: 95px;
        max-height: 38px;
    }
}

@media (max-width: 480px) {
    .profile-image-small img {
        max-width: 85px;
        max-height: 34px;
    }
}

/* ---------------------------------------------------------------------------------------- */
/* Стили для модального окна видео */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    padding: 20px;
}

.close-video-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1;
    z-index: 10;
    transition: var(--transition);
}

.close-video-modal:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.close-video-modal:active {
    transform: scale(0.95);
}

/* Контейнер для видео с сохранением соотношения сторон 16:9 */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-container iframe,
.video-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
}

.video-profile-name {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 15px;
    padding: 10px;
}

/* Стили для кликабельных изображений профилей */
.profile-image-small {
    margin: 8px 0;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
}

.profile-image-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-image-small:active {
    transform: translateY(0);
}

.profile-image-small img {
    max-width: 108px;
    max-height: 43px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

.profile-image-small:hover img {
    transform: scale(1.05);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .close-video-modal {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .video-profile-name {
        font-size: 1.1rem;
        margin-top: 12px;
    }
    
    .profile-image-small img {
        max-width: 95px;
        max-height: 38px;
    }
}

@media (max-width: 480px) {
    .video-modal-content {
        width: 98%;
        padding: 10px;
    }
    
    .video-profile-name {
        font-size: 1rem;
        margin-top: 10px;
    }
    
    .profile-image-small img {
        max-width: 85px;
        max-height: 34px;
    }
}

/* Отключение hover эффектов на touch устройствах */
@media (hover: none) and (pointer: coarse) {
    .profile-image-small:hover {
        transform: none;
        box-shadow: none;
    }
    
    .profile-image-small:hover img {
        transform: none;
    }
    
    .profile-image-small:active {
        transform: scale(0.95);
    }
}

/* ---------------------------------------- НАЧАЛО ---------------------------------------------------------- Стили для подсказки о качестве видео */
/* Стили для подсказки о качестве видео */
.video-quality-hint {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0 10px 0;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
    border-left: 4px solid #ffd700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: pulseHint 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.video-quality-hint::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

.video-quality-hint i {
    margin-right: 8px;
    color: #ffd700;
    font-size: 1rem;
}

.video-quality-hint strong {
    color: #ffd700;
    font-weight: 600;
}

/* Анимация пульсации для привлечения внимания */
@keyframes pulseHint {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    }
}

/* Анимация мерцания */
@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Адаптивность для подсказки */
@media (max-width: 768px) {
    .video-quality-hint {
        padding: 10px 12px;
        font-size: 0.8rem;
        margin: 12px 0 8px 0;
    }
    
    .video-quality-hint i {
        font-size: 0.9rem;
        margin-right: 6px;
    }
}

@media (max-width: 480px) {
    .video-quality-hint {
        padding: 8px 10px;
        font-size: 0.75rem;
        margin: 10px 0 6px 0;
        line-height: 1.3;
    }
    
    .video-quality-hint i {
        font-size: 0.85rem;
        margin-right: 5px;
    }
}

/* Стили для иконки шестерёнки в подсказке */
.fa-cog {
    animation: rotateCog 4s linear infinite;
}

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

/* --------------------начало--------------------------- Для видео над футтером */
/* Стили для блока с видео выбранного профиля */
.selected-profile-video {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 50px 0;
    margin-top: 20px;
    border-top: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.video-section {
    text-align: center;
}

.video-section h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 600;
}

.video-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 3px solid var(--secondary-color);
}

.video-container-section {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-container-section iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-quality-hint-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 20px auto 0 auto;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
    border-left: 4px solid #ffd700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    animation: pulseHint 2s ease-in-out infinite;
}

.video-quality-hint-section i {
    margin-right: 8px;
    color: #ffd700;
}

.video-quality-hint-section strong {
    color: #ffd700;
    font-weight: 600;
}

/* Адаптивность для блока видео */
@media (max-width: 768px) {
    .selected-profile-video {
        padding: 30px 0;
    }
    
    .video-section h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .video-wrapper {
        max-width: 95%;
    }
    
    .video-quality-hint-section {
        padding: 10px 15px;
        font-size: 0.85rem;
        margin: 15px auto 0 auto;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .selected-profile-video {
        padding: 20px 0;
    }
    
    .video-section h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .video-quality-hint-section {
        padding: 8px 12px;
        font-size: 0.8rem;
        margin: 12px auto 0 auto;
    }
}
/* ---------------------конец-------------------------- Для видео над футтером */

/* ---------------------------------------- КОНЕЦ ---------------------------------------------------------- Стили для подсказки о качестве видео */





/* ---------------------------------------- НАЧАЛО ---------------------------------------------------------- Визуальная индикация что данные восстановлены */

/* Стили для индикации восстановленных данных */
.calculator-controls.restored {
    position: relative;
}

.calculator-controls.restored::before {
    content: "✓ Данные восстановлены";
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--success-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    animation: fadeOut 3s ease-in-out forwards;
    z-index: 10;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* ---------------------------------------- КОНЕЦ ---------------------------------------------------------- Визуальная индикация что данные восстановлены */

/* ----------------------------НАЧАЛО------------------------------------------- */
/* Стиль кнопки сброса сохраненных данных */
.calculator-actions {
    text-align: Right;
    margin-top: 15px;
}

.reset-button {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.reset-button:hover {
    background: #7f8c8d;
}

.reset-button:active {
    transform: scale(0.98);
}
/* --------------------------конец--------------------------------------------- */


/* ---------------------------------НАЧАЛО-------------------------------------- */

/* Стили для инструкции профилей */
.profiles-instruction {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: var(--border-radius);
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #1565c0;
    text-align: center;
    position: relative;
}

.profiles-instruction .mobile-hint {
    display: none;
}

/* Стили для интерактивных изображений профилей */
.profile-image-small {
    margin: 8px 0;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    position: relative;
}

.profile-image-small::after {
    content: "📹 Видеообзор профиля";
    position: static;
    background: none;
    color: #1565c0;
    font-size: 0.75rem;
    padding: 0;
    text-align: left;
    opacity: 1;
    white-space: nowrap;
}

.profile-image-small:hover::after {
    opacity: 1;
}

.profile-image-small img {
    max-width: 108px;
    max-height: 43px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: var(--transition);
    flex-shrink: 0;
}

.profile-image-small:hover img {
    transform: scale(1.05);
}

.profile-image-small:active {
    transform: scale(0.98);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .profiles-instruction {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .profiles-instruction .desktop-text {
        display: none;
    }
    
    .profiles-instruction .mobile-hint {
        display: inline;
        font-weight: 500;
    }
	
	.profile-image-small {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .profile-image-small::after {
        content: "👆 Видео";
        font-size: 0.7rem;
        color: #1976d2;
        font-weight: 500;
    }
    
    .profile-image-small img {
        max-width: 95px;
        max-height: 38px;
    }
}

@media (max-width: 480px) {
    .profiles-instruction {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
	    .profile-image-small {
        gap: 6px;
    }
    
    .profile-image-small::after {
        font-size: 0.65rem;
        content: "👆 Смотреть видео";
    }
	
    .profile-image-small img {
        max-width: 85px;
        max-height: 34px;
    }
}

/* Десктопные hover эффекты */
@media (hover: hover) {
    .profile-image-small::after {
        opacity: 0.7;
        transition: opacity 0.3s ease;
    }
    
    .profile-image-small:hover::after {
        opacity: 1;
        color: #0d47a1;
    }
}

/* Отключение hover эффектов на touch устройствах */
@media (hover: none) and (pointer: coarse) {
    .profile-image-small:hover img {
        transform: none;
    }
    
    .profile-image-small::after {
        opacity: 1;
        color: #1976d2;
    }
}

/* ИНСТРУКЦИЮ ДЛЯ ГЛАВНЫХ ИЗОБРАЖЕНИЙ МАТЕРИАЛОВ */
/* Стили для подсказки главного изображения */
.material-image {
    position: relative;
	height: 200px;
    overflow: hidden;
}

.image-clickable-area {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: block;
}

.image-clickable-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    display: block;
}

.material-card:hover .image-clickable-area img {
    transform: scale(1.05);
}

.image-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Подсказка не перехватывает клики */
}

.material-image:hover .image-hint {
    opacity: 1;
}

/* Скрываем подсказку на главном изображении в мобильной версии */
@media (max-width: 768px) {
    .image-hint {
        opacity: 0.9;
        font-size: 0.75rem;
        padding: 6px;
    }
	
	.material-image:hover .image-hint {
        opacity: 0.9;
    }

}

/* --------------------------конец--------------------------------------------- */