/* ==============================================
   EXPERIMENT 1: SPRING STIFFNESS STYLES
   v2.1 - Added Undo/Redo, Onboarding integration
   ============================================== */

/* ==============================================
   UNDO/REDO BUTTONS
   ============================================== */

#btn-undo:not(:disabled):hover,
#btn-redo:not(:disabled):hover {
    background: rgba(0, 102, 204, 0.3);
    transform: scale(1.1);
}

#btn-undo:disabled,
#btn-redo:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#btn-tour {
    background: linear-gradient(135deg, rgba(0, 168, 107, 0.2), rgba(0, 102, 204, 0.2));
}

#btn-tour:hover {
    background: linear-gradient(135deg, rgba(0, 168, 107, 0.4), rgba(0, 102, 204, 0.4));
    transform: scale(1.1);
}

/* Keyboard shortcut hints */
.btn-icon[title]::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.btn-icon:hover[title]::after {
    opacity: 1;
}

/* ==============================================
   RULER HIGHLIGHT ANIMATION
   ============================================== */

@keyframes ruler-highlight-pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 168, 107, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 168, 107, 0.6);
    }
}

.ruler-highlight {
    animation: ruler-highlight-pulse 1.5s ease-in-out infinite;
}

/* Graph Section */
.graph-section {
    max-width: 1600px;
    margin: 2rem auto;
    padding: 0 2rem 2rem;
}

.graph-section h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.graph-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    margin-bottom: 1.5rem;
}

.graph-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.info-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.info-item .label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.info-item .value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
}

/* Measurements Table */
.measurements-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.85rem;
}

.measurements-table th,
.measurements-table td {
    padding: 0.5rem 0.4rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.measurements-table th {
    background: rgba(0, 102, 204, 0.3);
    color: #FFD700;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.measurements-table td {
    color: #FFFFFF;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.measurements-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.measurements-table tbody tr:last-child td {
    border-bottom: none;
}

.measurements-table .empty-state td {
    color: var(--text-secondary);
    font-style: italic;
    padding: 1.5rem 0.5rem;
    font-size: 0.8rem;
}

/* Подсветка для силы из Этапа 1 */
.measurements-table .from-stage1 {
    background: rgba(0, 102, 204, 0.2);
    color: #64B5F6;
    font-weight: 700;
    position: relative;
}

.measurements-table .from-stage1::after {
    content: '⬅️';
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0.7;
}

.measurements-table .btn-delete {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #ff6b6b;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    line-height: 1;
}

.measurements-table .btn-delete:hover {
    background: rgba(244, 67, 54, 0.4);
    transform: scale(1.05);
}

/* Анимация новой строки */
.measurements-table tr.just-added {
    animation: rowAppear 0.5s ease-out;
    background: rgba(0, 168, 107, 0.3);
}

@keyframes rowAppear {
    from {
        opacity: 0;
        transform: translateX(-20px);
        background: rgba(0, 168, 107, 0.6);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        background: rgba(0, 168, 107, 0.3);
    }
}

.measurements-table-container {
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.measurements-table-container::-webkit-scrollbar {
    width: 8px;
}

.measurements-table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.measurements-table-container::-webkit-scrollbar-thumb {
    background: rgba(0, 102, 204, 0.5);
    border-radius: 4px;
}

.measurements-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 102, 204, 0.7);
}

/* Achievement Popup */
#achievement-popup {
    position: fixed;
    top: 100px;
    right: 2rem;
    z-index: 1000;
    animation: slideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-content {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.95), rgba(0, 168, 107, 0.95));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    min-width: 300px;
    text-align: center;
}

.achievement-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

.achievement-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.achievement-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.1);
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-content {
    background: var(--bg-secondary);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.6rem;
    color: var(--text-primary);
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--error-color);
    border-color: var(--error-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-body h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.modal-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Force Input Modal Styles */
/* УДАЛЕНО - больше не используется модальное окно */

/* ==============================================
   УЛУЧШЕННАЯ ПАНЕЛЬ ИЗМЕРЕНИЙ
   ============================================== */

.measurement-card {
    position: relative;
}

.card-header-stage {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.stage-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.card-header-stage h3 {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 1.3rem;
}

.current-measurement-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.measure-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.measure-item.highlight {
    background: rgba(0, 168, 107, 0.15);
    border: 2px solid var(--secondary-color);
    box-shadow: 0 2px 12px rgba(0, 168, 107, 0.2);
}

.measure-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.measure-value {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
    text-align: right;
}

.measure-value.large {
    font-size: 1.6rem;
    color: var(--secondary-color);
}

.measure-unit {
    font-size: 1rem;
    color: var(--text-secondary);
    min-width: 30px;
}

.measure-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 200, 83, 0.2);
    color: var(--success-color);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.measure-source {
    grid-column: 2 / -1;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-style: italic;
    text-align: right;
}

.calculated-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 168, 107, 0.1));
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    margin-top: 0.5rem;
}

.calc-formula {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.calc-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.calc-unit {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.step-hint {
    padding: 1rem 1.25rem;
    background: rgba(255, 179, 0, 0.1);
    border-left: 4px solid var(--warning-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.btn-record-quick {
    margin-bottom: 1rem;
}

.btn-switch-stage {
    margin-bottom: 1rem;
}

/* ==============================================
   ПРОГРЕСС-БАР
   ============================================== */

.progress-mini {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-bar-mini {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--secondary-color);
}

/* ==============================================
   ТАБЛИЦА С УЛУЧШЕНИЯМИ
   ============================================== */

.table-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.table-header-flex h3 {
    margin: 0;
    border: none;
    padding: 0;
}

.table-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-weight: 600;
}

/* Анимация добавления строки */
@keyframes slideInRow {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.measurements-table tbody tr:not(.empty-state) {
    animation: slideInRow 0.4s ease-out;
}

.measurements-table tbody tr.just-added {
    background: rgba(0, 168, 107, 0.2);
    transition: background 2s ease-out;
}

/* ==============================================
   TOAST УВЕДОМЛЕНИЯ
   ============================================== */

.toast-notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--success-color), #00a244);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
    font-weight: 600;
    font-size: 1rem;
    z-index: 1001;
    animation: slideInToast 0.3s ease-out, slideOutToast 0.3s ease-in 2.7s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-notification .toast-icon {
    font-size: 1.5rem;
}

@keyframes slideInToast {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToast {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.formula-large {
    font-size: 1.8rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    color: var(--primary-color);
    font-weight: 700;
    margin: 1rem 0;
}

/* Hint Box */
.hint-box {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 179, 0, 0.1), rgba(255, 179, 0, 0.05));
    border: 2px solid var(--warning-color) !important;
    animation: hintPulse 2s infinite;
}

.hint-icon {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--warning-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(255, 179, 0, 0.5);
}

.hint-content {
    padding-top: 1rem;
}

.hint-content strong {
    display: block;
    font-size: 1.1rem;
    color: var(--warning-color);
    margin-bottom: 0.5rem;
}

.hint-content p {
    line-height: 1.6;
    color: var(--text-primary);
}

.hint-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.hint-close:hover {
    background: var(--error-color);
    border-color: var(--error-color);
    color: white;
    transform: rotate(90deg);
}

@keyframes hintPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 179, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 179, 0, 0);
    }
}

/* Particle Effects (will be rendered on canvas) */
.particle {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
}

/* Spring Glow Effect */
.spring-glow {
    filter: drop-shadow(0 0 10px var(--primary-color));
    animation: glowPulse 2s infinite;
}

#canvas-particles,
#canvas-ui {
     pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px var(--primary-color));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--primary-color)) drop-shadow(0 0 30px var(--primary-color));
    }
}

/* Loading States */
.shimmer {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.1) 50%, 
        rgba(255,255,255,0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Measurement Indicator */
.measurement-indicator {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid var(--secondary-color);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--secondary-color);
    animation: indicatorPulse 1.5s infinite;
    pointer-events: none;
}

@keyframes indicatorPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Success Effect */
.success-effect {
    animation: successBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successBounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .graph-info {
        grid-template-columns: 1fr;
    }
    
    .achievement-popup {
        right: 1rem;
        left: 1rem;
    }
    
    .achievement-content {
        min-width: auto;
    }
    
    .ruler {
        right: 10px;
        width: 30px;
        height: 300px;
    }
}

/* Print Styles */
@media print {
    .experiment-header,
    .control-panel,
    .btn-back,
    .btn-icon,
    .hint-box {
        display: none;
    }
    
    .simulator-panel {
        page-break-inside: avoid;
    }
    
    .graph-section {
        page-break-inside: avoid;
        margin-top: 2rem;
    }
}

/* ==============================================
   SIMPLE MEASUREMENT SYSTEM
   ============================================== */

.measurement-system {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 0;
}

/* ЖУРНАЛ ИЗМЕРЕНИЙ */
.journal-panel {
    background: rgba(74, 158, 255, 0.08);
    border: 2px solid rgba(74, 158, 255, 0.3);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.journal-panel h3 {
    color: #4A9EFF;
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Текущие показания */
.current-reading {
    background: rgba(74, 158, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.reading-item {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 10px;
}

.reading-item:last-child {
    margin-bottom: 0;
}

.reading-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    min-width: 90px;
}

.reading-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #4A9EFF;
    min-width: 60px;
}

.reading-unit {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Кнопка "Записать" */
.btn-record {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #4A9EFF, #357ABD);
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.btn-record:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

.btn-record:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Список записей */
.journal-list {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 8px;
}

.journal-list::-webkit-scrollbar {
    width: 6px;
}

.journal-list::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.3);
    border-radius: 3px;
}

.journal-item {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #4A9EFF;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.journal-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.item-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #4A9EFF;
    min-width: 25px;
}

.item-data {
    flex: 1;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
}

.btn-delete {
    background: rgba(255, 59, 48, 0.2);
    border: none;
    color: #FF3B30;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: rgba(255, 59, 48, 0.4);
    transform: scale(1.1);
}

/* РАСЧЁТ ЖЁСТКОСТИ */
.calculation-panel {
    background: rgba(74, 255, 158, 0.08);
    border: 2px solid rgba(74, 255, 158, 0.3);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.calculation-panel h3 {
    color: #4AFF9E;
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Выбор точек */
.point-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.point-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.point-number {
    font-weight: 600;
    color: #4AFF9E;
    min-width: 70px;
}

.point-select {
    flex: 1;
    padding: 10px 12px;
    background: rgba(74, 255, 158, 0.1);
    border: 1px solid rgba(74, 255, 158, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
}

.point-select:hover:not(:disabled) {
    background: rgba(74, 255, 158, 0.15);
    border-color: rgba(74, 255, 158, 0.5);
}

.point-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.point-select option {
    background: #1a1a2e;
    color: white;
}

/* Кнопка "Рассчитать" */
.btn-calculate {
    width: 100%;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #4AFF9E, #35BD7A);
    color: #0a3d2a;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.btn-calculate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 255, 158, 0.4);
}

.btn-calculate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Результат */
.calculation-result {
    background: rgba(74, 255, 158, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.calc-formula {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
}

.calc-detail {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.calc-step {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.step-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.step-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4AFF9E;
}

.step-unit {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.result-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(74, 255, 158, 0.2), rgba(53, 189, 122, 0.2));
    border-radius: 12px;
}

.k-label {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.k-value {
    font-size: 3rem;
    font-weight: 700;
    color: #4AFF9E;
    text-shadow: 0 2px 10px rgba(74, 255, 158, 0.5);
}

.k-unit {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 40px 20px;
    font-style: italic;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 900px) {
    .measurement-system {
        grid-template-columns: 1fr;
    }
    
    .reading-value {
        font-size: 1.2rem;
    }
    
    .k-value {
        font-size: 2.5rem;
    }
}

.btn-icon {
    font-size: 1.2rem;
}

/* ==============================================
   ЕДИНОЕ ОКНО РАСЧЁТА
   ============================================== */

.calculation-window {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(74, 158, 255, 0.3);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.calculation-window h3 {
    color: #4A9EFF;
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    text-align: center;
}

/* Формула */
.formula-display {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.2), rgba(74, 255, 158, 0.2));
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    font-family: 'Courier New', monospace;
    margin-bottom: 24px;
    letter-spacing: 2px;
}

/* Переменные */
.variables-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.variable-row {
    display: grid;
    grid-template-columns: 60px 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.variable-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.var-label {
    font-size: 1.4rem;
    font-weight: 700;
    color: #4A9EFF;
    font-family: 'Courier New', monospace;
}

.var-current {
    display: flex;
    align-items: center;
    gap: 8px;
}

.var-current-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.var-current-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #FFD700;
    font-family: 'Courier New', monospace;
    min-width: 60px;
}

.var-unit {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.btn-record-var {
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #4A9EFF, #357ABD);
    color: white;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-record-var:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}

.btn-record-var:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.var-saved {
    display: flex;
    align-items: center;
    gap: 8px;
}

.saved-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.saved-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4AFF9E;
    font-family: 'Courier New', monospace;
}

/* Кнопки действий */
.calculation-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-calculate-final {
    flex: 2;
    padding: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #4AFF9E, #35BD7A);
    color: #0a3d2a;
    transition: all 0.3s ease;
}

.btn-calculate-final:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(74, 255, 158, 0.5);
}

.btn-calculate-final:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.btn-reset {
    flex: 1;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    background: transparent;
    color: white;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: #FF3B30;
    color: #FF3B30;
    transform: translateY(-2px);
}

/* Результат */
.result-display {
    background: linear-gradient(135deg, rgba(74, 255, 158, 0.15), rgba(53, 189, 122, 0.15));
    border: 2px solid #4AFF9E;
    border-radius: 12px;
    padding: 24px;
    animation: resultAppear 0.5s ease-out;
}

@keyframes resultAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-formula {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
    margin-bottom: 16px;
}

.result-calculation {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
    margin-bottom: 16px;
    line-height: 1.8;
}

.result-final {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: rgba(74, 255, 158, 0.2);
    border-radius: 12px;
}

.result-label {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.result-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: #4AFF9E;
    text-shadow: 0 2px 20px rgba(74, 255, 158, 0.6);
    font-family: 'Courier New', monospace;
}

.result-unit {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 900px) {
    .variable-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .var-label {
        font-size: 1.2rem;
    }
    
    .result-value {
        font-size: 2.5rem;
    }
}

/* ==============================================
   NEW MEASUREMENT WINDOW
   ============================================== */

.measurement-window {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(74, 158, 255, 0.25);
    border-radius: 12px;
    padding: 0.9rem;
    backdrop-filter: blur(10px);
}

.formula-display {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.2), rgba(74, 255, 158, 0.2));
    border-radius: 8px;
    padding: 0.7rem;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.9rem;
    letter-spacing: 1px;
}

.variable-row {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0.7rem;
    margin-bottom: 0.7rem;
}

.var-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4A9EFF;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.var-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.var-current {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 6px;
}

.var-current-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.var-current-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #FFD700;
    font-family: 'Courier New', monospace;
    min-width: 50px;
}

.var-unit {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.var-manual-input {
    padding: 0.55rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.var-manual-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(74, 158, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.1);
}

.var-manual-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

.btn-record-var {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: linear-gradient(135deg, #4A9EFF, #357ABD);
    color: white;
    transition: all 0.3s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.btn-record-var:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
}

.btn-record-var:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.recorded-values {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
    padding: 0.7rem;
    background: rgba(74, 255, 158, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(74, 255, 158, 0.2);
}

.recorded-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.recorded-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
}

.recorded-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4AFF9E;
    font-family: 'Courier New', monospace;
}

.recorded-unit {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.action-buttons-group {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.btn-reset-measurement {
    flex: 1;
    padding: 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    color: white;
    transition: all 0.3s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.btn-reset-measurement:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: #FF3B30;
    color: #FF3B30;
    transform: translateY(-2px);
}

.btn-calculate-stiffness {
    flex: 2;
    padding: 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #4AFF9E, #35BD7A);
    color: #0a3d2a;
    transition: all 0.3s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.btn-calculate-stiffness:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 255, 158, 0.5);
}

.btn-calculate-stiffness:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.calculation-result {
    background: linear-gradient(135deg, rgba(74, 255, 158, 0.15), rgba(53, 189, 122, 0.15));
    border: 2px solid #4AFF9E;
    border-radius: 8px;
    padding: 0.9rem;
    animation: resultAppear 0.5s ease-out;
}

.result-formula {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.result-calculation-text {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.7rem;
    line-height: 1.5;
}

.result-final {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem;
    background: rgba(74, 255, 158, 0.2);
    border-radius: 6px;
}

.result-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4AFF9E;
    text-shadow: 0 2px 15px rgba(74, 255, 158, 0.6);
    font-family: 'Courier New', monospace;
}

.result-unit {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Active state for header buttons */
.btn-icon.active {
    background: rgba(74, 255, 158, 0.2);
    border-color: #4AFF9E;
    color: #4AFF9E;
    box-shadow: 0 0 15px rgba(74, 255, 158, 0.3);
}

/* ==============================================
   EXPERIMENT INSTRUCTIONS
   ============================================== */
.experiment-instructions {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    border-left: 4px solid var(--primary-color);
    border: 1px solid var(--glass-border);
}

.experiment-instructions h3 {
    margin: 0 0 12px 0;
    color: var(--primary-color);
    font-size: 16px;
}

.experiment-instructions ol {
    margin: 0;
    padding-left: 24px;
    color: var(--text-secondary);
}

.experiment-instructions li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.experiment-instructions li::marker {
    color: var(--primary-color);
    font-weight: bold;
}