/* Изолированные стили конвертера скорости */
.sc-container {
    max-width: 800px;
    margin: 20px auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    font-family: Arial, sans-serif;
    isolation: isolate;
}

.sc-container * {
    box-sizing: border-box;
}

.sc-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.sc-converter {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sc-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.sc-input-group label {
    font-weight: bold;
    min-width: 120px;
    color: #555;
}

.sc-input-group input, 
.sc-input-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    flex: 1;
    min-width: 150px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.sc-input-group input:focus,
.sc-input-group select:focus {
    outline: none;
    border-color: #2196F3;
    background: white;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Блок результата */
.sc-result {
    margin-top: 20px;
    padding: 0;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.sc-main-result {
    padding: 25px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sc-main-result-value {
    font-size: 28px;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sc-main-result-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.sc-copy-main-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sc-copy-main-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.sc-other-results {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.sc-other-results-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
}

.sc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.sc-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.sc-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.sc-result-content {
    flex: 1;
}

.sc-result-value {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-bottom: 4px;
}

.sc-result-unit {
    font-size: 13px;
    color: #666;
}

.sc-copy-small-btn {
    background: #f0f0f0;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sc-copy-small-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* Стили для скроллбара */
.sc-other-results::-webkit-scrollbar {
    width: 8px;
}

.sc-other-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.sc-other-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.sc-other-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Блок поделиться */
.sc-share-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.sc-share-title {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
    color: #495057;
    font-size: 20px;
    position: relative;
}

.sc-share-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    margin: 10px auto 0;
    border-radius: 2px;
}

.sc-share-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sc-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #6c757d;
}

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

.sc-share-btn:hover::before {
    left: 100%;
}

.sc-share-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.sc-share-btn:active {
    transform: translateY(-1px) scale(1.05);
}

/* Цвета для кнопок */
.sc-share-btn.sc-vk {
    background: linear-gradient(135deg, #4a76a8, #5b88bd);
}

.sc-share-btn.sc-facebook {
    background: linear-gradient(135deg, #3b5998, #4c70ba);
}

.sc-share-btn.sc-twitter {
    background: linear-gradient(135deg, #1da1f2, #4ab8f7);
}

.sc-share-btn.sc-telegram {
    background: linear-gradient(135deg, #0088cc, #00a2ff);
}

.sc-share-btn.sc-whatsapp {
    background: linear-gradient(135deg, #25d366, #40df7a);
}

.sc-share-btn.sc-copy-link {
    background: linear-gradient(135deg, #6c757d, #868e96);
}

/* Тултипы */
.sc-share-btn .sc-tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.sc-share-btn .sc-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(0, 0, 0, 0.8);
}

.sc-share-btn:hover .sc-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -40px;
}

.sc-share-labels {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.sc-share-label {
    font-size: 11px;
    color: #6c757d;
    text-align: center;
    width: 55px;
    line-height: 1.3;
    font-weight: 500;
}

/* Уведомления */
.sc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 6px;
    z-index: 10000;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    font-weight: 500;
    font-size: 14px;
    max-width: 300px;
}

.sc-notification.sc-error {
    background: #f44336;
}

@keyframes sc-slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes sc-fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .sc-container {
        padding: 20px;
        margin: 10px;
    }
    
    .sc-results-grid {
        grid-template-columns: 1fr;
    }
    
    .sc-main-result-value {
        font-size: 24px;
    }
    
    .sc-share-buttons {
        gap: 12px;
    }
    
    .sc-share-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .sc-share-labels {
        gap: 12px;
    }
    
    .sc-share-label {
        width: 50px;
    }
}

@media (max-width: 600px) {
    .sc-container {
        padding: 15px;
    }
    
    .sc-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sc-input-group label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .sc-input-group input,
    .sc-input-group select {
        min-width: 100%;
    }
    
    .sc-main-result {
        padding: 20px;
    }
    
    .sc-main-result-value {
        font-size: 22px;
    }
    
    .sc-other-results {
        max-height: 250px;
        padding: 15px;
    }
    
    .sc-share-buttons {
        gap: 10px;
    }
    
    .sc-share-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .sc-share-labels {
        gap: 10px;
    }
    
    .sc-share-label {
        width: 45px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .sc-title {
        font-size: 24px;
    }
    
    .sc-share-buttons {
        gap: 8px;
    }
    
    .sc-share-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .sc-share-labels {
        gap: 8px;
    }
    
    .sc-share-label {
        width: 40px;
        font-size: 9px;
    }
    
    .sc-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Reset для изоляции */
.sc-container input,
.sc-container button,
.sc-container select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.sc-container a {
    text-decoration: none;
}

.sc-container button {
    font-family: inherit;
}