/* Tool-specific styles only - base styles are in tool-layout.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.segmented-control {
    display: flex;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    overflow: hidden;
}

.segment-btn {
    flex: 1;
    padding: 10px 16px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

.segment-btn:hover {
    color: #e5e7eb;
    background-color: #1a1a1a;
}

.segment-btn.active {
    background-color: #3b82f6;
    color: #ffffff;
}

.text-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input::placeholder {
    color: #6b7280;
}

.text-input[type="number"]::-webkit-inner-spin-button,
.text-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.text-input[type="number"] {
    -moz-appearance: textfield;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-unit .text-input {
    flex: 1;
}

.input-with-unit.compact {
    max-width: 200px;
}

.input-with-unit.compact .text-input {
    padding: 8px 12px;
    font-size: 14px;
}

.input-unit {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

.preset-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.preset-btn:hover {
    background-color: #374151;
}

.preset-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.time-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-inputs.compact {
    max-width: 280px;
}

.time-field {
    display: flex;
    align-items: center;
    gap: 4px;
}

.time-field .text-input {
    width: 64px;
    text-align: center;
    padding: 12px 8px;
}

.time-inputs.compact .time-field .text-input {
    width: 56px;
    padding: 8px 6px;
    font-size: 14px;
}

.time-label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
}

.pace-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pace-inputs.compact {
    max-width: 240px;
}

.pace-field {
    display: flex;
    align-items: center;
    gap: 2px;
}

.pace-field .text-input {
    width: 64px;
    text-align: center;
    padding: 12px 8px;
}

.pace-inputs.compact .pace-field .text-input {
    width: 56px;
    padding: 8px 6px;
    font-size: 14px;
}

.pace-separator {
    font-size: 18px;
    font-weight: 600;
    color: #9ca3af;
    padding: 0 2px;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-primary.compact {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary.compact {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.input-error {
    font-size: 13px;
    color: #f87171;
    padding: 4px 0;
}

.input-warning {
    background-color: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.result-card {
    text-align: center;
    padding: 32px 24px;
    background-color: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.result-label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.result-value {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 8px;
}

.result-detail {
    font-size: 14px;
    color: #9ca3af;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 12px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #e5e7eb;
}

.stat-unit {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
}

.copy-actions {
    display: flex;
    justify-content: center;
}

.pro-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid #374151;
}

.pro-feature-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background-color: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.pro-feature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pro-feature-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.split-controls,
.negative-split-controls,
.zones-controls,
.predictor-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.predictor-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group-inline > label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table th {
    background-color: #1a1a1a;
    color: #9ca3af;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #374151;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.data-table td {
    padding: 10px 12px;
    color: #e5e7eb;
    border-bottom: 1px solid #1a1a1a;
    white-space: nowrap;
}

.data-table tbody tr:nth-child(odd) {
    background-color: #141414;
}

.data-table tbody tr:nth-child(even) {
    background-color: #1a1a1a;
}

.data-table th:last-child,
.data-table td:last-child {
    text-align: right;
}

.zones-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zone-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background-color: #141414;
    border-radius: 6px;
    border-left: 4px solid #374151;
}

.zone-card.zone-easy {
    border-left-color: #34d399;
}

.zone-card.zone-tempo {
    border-left-color: #fbbf24;
}

.zone-card.zone-threshold {
    border-left-color: #fb923c;
}

.zone-card.zone-interval {
    border-left-color: #f87171;
}

.zone-card.zone-repetition {
    border-left-color: #ef4444;
}

.zone-name {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    min-width: 80px;
}

.zone-pct {
    font-size: 12px;
    color: #6b7280;
    min-width: 60px;
}

.zone-pace {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    flex: 1;
}

.zone-speed {
    font-size: 13px;
    color: #9ca3af;
    text-align: right;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: toast-in 200ms ease;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .output-section {
        padding: 16px;
    }

    .result-value {
        font-size: 36px;
    }

    .stat-cards {
        gap: 8px;
    }

    .stat-value {
        font-size: 16px;
    }

    .stat-card {
        padding: 12px 8px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .preset-row {
        gap: 6px;
    }

    .preset-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .time-field .text-input {
        width: 56px;
        padding: 10px 6px;
    }

    .pace-field .text-input {
        width: 56px;
        padding: 10px 6px;
    }

    .pro-feature-block {
        padding: 16px;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .zone-card {
        flex-wrap: wrap;
        gap: 4px 12px;
    }

    .zone-name {
        min-width: auto;
    }

    .zone-pct {
        min-width: auto;
    }

    .zone-pace {
        flex-basis: 100%;
        order: 3;
    }

    .zone-speed {
        flex-basis: 100%;
        order: 4;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .stat-cards {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .time-inputs {
        gap: 4px;
    }

    .time-field .text-input {
        width: 48px;
        padding: 10px 4px;
        font-size: 14px;
    }

    .pace-field .text-input {
        width: 48px;
        padding: 10px 4px;
        font-size: 14px;
    }
}