.temperature-converter-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.tc-input-section {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    align-items: center;
}

.tc-temperature-input {
    flex: 1;
    min-width: 200px;
    padding: 14px 16px;
    border: 2px solid #007cba;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.tc-temperature-input:focus {
    outline: none;
    border-color: #005a87;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.tc-unit-select {
    flex: 1;
    min-width: 200px;
    padding: 14px 16px;
    border: 2px solid #007cba;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    box-sizing: border-box;
}

.tc-unit-select:focus {
    outline: none;
    border-color: #005a87;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.tc-results-section {
    margin-bottom: 25px;
}

.tc-main-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    border-left: 4px solid #007cba;
    flex-wrap: wrap;
}

.tc-other-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.tc-other-result {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 15px;
    border-left: 3px solid #6c757d;
    flex-wrap: wrap;
    transition: transform 0.2s ease;
}

.tc-other-result:hover {
    transform: translateY(-1px);
    background: #e9ecef;
}

.tc-result-value {
    font-weight: 600;
    min-width: 70px;
    text-align: right;
    color: #2c3e50;
}

.tc-result-unit {
    color: #007cba;
    min-width: 35px;
    font-weight: 700;
    font-size: 1.1em;
}

.tc-unit-name {
    color: #6c757d;
    font-size: 0.9em;
    font-weight: 500;
}

.tc-main-result .tc-unit-name {
    font-size: 16px;
    color: #495057;
}

.tc-copy-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #007cba;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: auto;
}

.tc-main-result .tc-copy-btn {
    width: 38px;
    height: 38px;
}

.tc-copy-btn:hover {
    background: #005a87;
    transform: scale(1.05);
}

.tc-copy-btn.copied {
    background: #28a745;
    transform: scale(1.1);
}

.tc-copy-btn.copied svg {
    transform: scale(1.2);
}

.tc-share-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.tc-share-btn {
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid transparent;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tc-share-vk { background: #4a76a8; }
.tc-share-tg { background: #0088cc; }
.tc-share-wa { background: #25d366; }
.tc-share-link { background: #6c757d; }

.tc-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.tc-share-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.tc-share-btn.active {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
    transform: scale(0.95);
}

.tc-share-vk:hover { background: #3d638f; }
.tc-share-tg:hover { background: #0077b3; }
.tc-share-wa:hover { background: #1da851; }
.tc-share-link:hover { background: #5a6268; }

.tc-share-vk.active { background: #2a4a74; }
.tc-share-tg.active { background: #006699; }
.tc-share-wa.active { background: #128C7E; }
.tc-share-link.active { background: #495057; }

/* Всплывающее уведомление */
.tc-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(40, 167, 69, 0.95);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 18px;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    pointer-events: none;
}

.tc-notification.show {
    transform: translate(-50%, -50%) scale(1);
}

.tc-notification::after {
    content: '✓';
    margin-left: 10px;
    font-weight: bold;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .tc-other-results {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .temperature-converter-wrapper {
        margin: 15px 0;
        padding: 15px;
        border-radius: 10px;
    }
    
    .tc-input-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .tc-temperature-input,
    .tc-unit-select {
        min-width: 100%;
        width: 100%;
    }
    
    .tc-other-results {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tc-share-section {
        gap: 12px;
        padding-top: 15px;
    }
    
    .tc-main-result {
        gap: 8px;
        padding: 15px;
        font-size: 18px;
    }
    
    .tc-other-result {
        gap: 6px;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .tc-share-btn {
        width: 50px;
        height: 50px;
        font-size: 14px;
    }
    
    .tc-notification {
        padding: 15px 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .temperature-converter-wrapper {
        padding: 12px;
        margin: 10px 0;
    }
    
    .tc-main-result {
        font-size: 16px;
        padding: 12px;
        gap: 6px;
    }
    
    .tc-other-result {
        font-size: 13px;
        padding: 8px 10px;
        gap: 4px;
    }
    
    .tc-result-value {
        min-width: 60px;
    }
    
    .tc-share-btn {
        width: 45px;
        height: 45px;
        font-size: 13px;
    }
    
    .tc-unit-name {
        font-size: 0.85em;
    }
    
    .tc-notification {
        padding: 12px 20px;
        font-size: 15px;
        border-radius: 8px;
    }
}

@media (max-width: 360px) {
    .tc-other-results {
        grid-template-columns: 1fr;
    }
    
    .tc-share-section {
        gap: 8px;
    }
    
    .tc-share-btn {
        width: 42px;
        height: 42px;
        font-size: 12px;
    }
    
    .tc-main-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .tc-main-result .tc-copy-btn {
        align-self: flex-end;
        margin-top: 5px;
    }
}

/* Изоляция стилей */
.temperature-converter-wrapper * {
    box-sizing: border-box;
}

.temperature-converter-wrapper input,
.temperature-converter-wrapper select,
.temperature-converter-wrapper button {
    font-family: inherit;
    font-size: inherit;
}

.temperature-converter-wrapper input:focus,
.temperature-converter-wrapper select:focus,
.temperature-converter-wrapper button:focus {
    outline: none;
}

/* Затемнение фона при показе уведомления */
.tc-notification-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tc-notification-backdrop.show {
    opacity: 1;
}