/* Основные стили секундомера с префиксом st- */
.st-container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.st-display {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.st-time {
    font-size: 3em;
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', monospace;
    display: block;
}

.st-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.st-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    box-sizing: border-box;
}

.st-start {
    background: #4CAF50;
    color: white;
}

.st-start:hover {
    background: #45a049;
}

.st-start.running {
    background: #f44336;
}

.st-start.running:hover {
    background: #da190b;
}

.st-lap {
    background: #2196F3;
    color: white;
}

.st-lap:hover:not(:disabled) {
    background: #0b7dda;
}

.st-lap:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.st-reset {
    background: #ff9800;
    color: white;
}

.st-reset:hover {
    background: #e68900;
}

.st-save-file {
    background: #9c27b0;
    color: white;
}

.st-save-file:hover {
    background: #7b1fa2;
}

.st-print {
    background: #607d8b;
    color: white;
}

.st-print:hover {
    background: #455a64;
}

.st-laps-container {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.st-laps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.st-laps-header h3 {
    margin: 0;
    color: #333;
    flex: 1;
    min-width: 120px;
}

.st-laps-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.st-laps-actions .st-btn {
    min-width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.st-clear-all {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.st-clear-all:hover {
    background: #ff5252;
}

.st-laps-list {
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
}

.st-lap-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.st-lap-item:hover {
    background-color: #f9f9f9;
}

.st-lap-item:last-child {
    border-bottom: none;
}

.st-lap-number {
    font-weight: bold;
    color: #666;
    min-width: 40px;
    flex-shrink: 0;
}

.st-lap-time {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #333;
    flex: 1;
    text-align: center;
}

.st-lap-duration {
    font-family: 'Courier New', monospace;
    color: #666;
    font-size: 0.9em;
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
}

.st-delete-lap {
    background: #ff6b6b;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-left: 10px;
}

.st-delete-lap:hover {
    background: #ff5252;
}

.st-share-section {
    margin-top: 20px;
    text-align: center;
    width: 100%;
}

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

/* Обновленные стили для кнопок поделиться с текстом */
.st-share-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    position: relative;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.st-share-btn svg {
    display: none;
}

.st-share-btn::after {
    content: attr(data-text);
}

.st-vk::after { content: "VK"; }
.st-tg::after { content: "TG"; }
.st-wa::after { content: "WA"; }
.st-link::after { content: "🔗"; }

.st-share-btn:hover {
    transform: scale(1.1);
}

.st-vk {
    background: #4C75A3;
}

.st-tg {
    background: #0088cc;
}

.st-wa {
    background: #25D366;
}

.st-link {
    background: #666;
    font-size: 18px;
}

.st-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    display: none;
    font-weight: bold;
    max-width: 90%;
    box-sizing: border-box;
}

.st-notification.show {
    display: block;
    animation: st-slideDown 0.3s ease;
}

@keyframes st-slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .st-container {
        padding: 15px;
    }
    
    .st-time {
        font-size: 2.5em;
    }
    
    .st-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .st-controls {
        gap: 8px;
    }
    
    .st-laps-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .st-laps-header h3 {
        text-align: center;
    }
    
    .st-laps-actions {
        justify-content: center;
    }
    
    .st-share-buttons {
        gap: 10px;
    }
    
    .st-share-btn {
        width: 55px;
        height: 55px;
    }
    
    .st-lap-item {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .st-lap-number {
        min-width: 30px;
    }
    
    .st-lap-time {
        text-align: left;
        flex: 2;
    }
    
    .st-lap-duration {
        text-align: right;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .st-container {
        padding: 10px;
    }
    
    .st-time {
        font-size: 2em;
    }
    
    .st-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .st-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .st-laps-actions {
        flex-direction: column;
    }
    
    .st-laps-actions .st-btn {
        width: 100%;
    }
    
    .st-share-btn {
        width: 50px;
        height: 50px;
        font-size: 12px;
    }
    
    .st-link {
        font-size: 16px;
    }
    
    .st-lap-item {
        padding: 8px 5px;
    }
    
    .st-lap-time {
        font-size: 0.9em;
    }
    
    .st-lap-duration {
        font-size: 0.8em;
        min-width: 60px;
    }
}

/* Стили для печати */
@media print {
    .st-container {
        box-shadow: none;
        background: white;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .st-controls,
    .st-share-section,
    .st-clear-all,
    .st-delete-lap,
    .st-laps-actions,
    .st-save-file,
    .st-print {
        display: none !important;
    }
    
    .st-display {
        box-shadow: none;
        border: 2px solid #333;
        margin-bottom: 10px;
    }
    
    .st-laps-container {
        box-shadow: none;
        border: 1px solid #ccc;
        padding: 10px;
    }
    
    .st-time {
        font-size: 2em;
        color: #000;
    }
    
    .st-laps-header {
        border-bottom: 2px solid #000;
        margin-bottom: 10px;
    }
    
    .st-laps-header h3 {
        color: #000;
        font-size: 1.2em;
    }
    
    .st-lap-item {
        border-bottom: 1px solid #ddd;
    }
    
    .st-lap-time,
    .st-lap-duration {
        color: #000;
    }
}

/* Стили для широких экранов */
@media (min-width: 1200px) {
    .st-container {
        max-width: 100%;
    }
}

@media (min-width: 1400px) {
    .st-container {
        padding: 30px;
    }
    
    .st-time {
        font-size: 3.5em;
    }
}