/* Контейнер */
.pi-container {
    width: 100%;
    max-width: 100%;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Элементы управления */
.pi-controls {
    margin-bottom: 30px;
}

.pi-input-group {
    margin-bottom: 20px;
    text-align: center;
}

.pi-label {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.pi-input {
    width: 150px;
    height: 45px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    background: white;
    font-size: 18px;
    font-weight: bold;
    padding: 0 15px;
    box-sizing: border-box;
}

.pi-input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.pi-slider {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    cursor: pointer;
    margin: 20px 0;
}

.pi-slider::-webkit-slider-thumb {
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

.pi-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
}

.pi-digits-value {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-top: 10px;
}

/* Отображение числа Пи */
.pi-display {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 8px;
    border: 2px solid #ddd;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pi-number {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    word-break: break-all;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    text-align: left;
    white-space: pre-wrap;
}

/* Полоса прокрутки для числа Пи */
.pi-number::-webkit-scrollbar {
    width: 8px;
}

.pi-number::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.pi-number::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.pi-number::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Кнопки поделиться */
.pi-share {
    margin-top: 20px;
    text-align: center;
}

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

.pn-share-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    color: white;
}

.pn-share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.pi-share-vk {
    background: #4a76a8;
}

.pi-share-tg {
    background: #0088cc;
}

.pi-share-wa {
    background: #25d366;
}

.pi-share-copy {
    background: #ff9800;
}

/* Уведомления */
.pi-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    background: #4CAF50;
    color: white;
    padding: 25px 35px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: pi-notification-fade 3s ease-in-out;
}

@keyframes pi-notification-fade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

/* Адаптивность */
@media (max-width: 1024px) {
    .pi-container {
        padding: 15px;
    }
    
    .pi-number {
        font-size: 16px;
    }
    
    .pi-input {
        width: 130px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .pi-label {
        font-size: 16px;
    }
    
    .pi-number {
        font-size: 14px;
        max-height: 300px;
        padding: 15px;
    }
    
    .pi-input {
        width: 120px;
        height: 38px;
        font-size: 15px;
    }
    
    .pn-share-btn {
        width: 50px;
        height: 50px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pi-container {
        padding: 10px;
    }
    
    .pi-label {
        font-size: 14px;
    }
    
    .pi-number {
        font-size: 12px;
        padding: 12px;
        max-height: 250px;
    }
    
    .pi-input {
        width: 100px;
        height: 35px;
        font-size: 14px;
        padding: 0 10px;
    }
    
    .pi-digits-value {
        font-size: 14px;
    }
    
    .pn-share-buttons {
        gap: 10px;
    }
    
    .pn-share-btn {
        width: 45px;
        height: 45px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .pi-number {
        font-size: 11px;
    }
    
    .pi-input {
        width: 90px;
        height: 32px;
        font-size: 13px;
    }
    
    .pn-share-btn {
        width: 40px;
        height: 40px;
    }
}