/* 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;
}

.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;
    max-width: 300px;
    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::placeholder {
    color: #6b7280;
}

.settings-title {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 4px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

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

.slider-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slider-row label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.slider-value {
    font-size: 13px;
    font-weight: 500;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: #9ca3af;
    min-width: 60px;
    text-align: right;
}

input[type="range"].slider {
    width: 100%;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: block;
}

input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: box-shadow 150ms ease;
}

input[type="range"].slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="range"].slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.select-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

.select-input option {
    background-color: #1a1a1a;
}

.color-input {
    width: 48px;
    height: 36px;
    border: 1px solid #374151;
    border-radius: 6px;
    background-color: #141414;
    cursor: pointer;
    padding: 2px;
    -webkit-appearance: none;
    appearance: none;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-input::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #e5e7eb;
}

label.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 4px;
    position: relative;
    transition: all 150ms ease;
    flex-shrink: 0;
}

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.timeline-container {
    padding: 8px 0;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
}

.timeline-track {
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    margin: 16px 0;
    min-height: 4px;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    bottom: -12px;
}

.keyframe-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #3b82f6;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    border: 2px solid #0a0a0a;
    z-index: 10;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.keyframe-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

.keyframe-marker.selected {
    width: 20px;
    height: 20px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.keyframe-marker.anchor {
    background-color: #6b7280;
}

.keyframe-marker.dragging {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.3);
}

.keyframe-marker-label {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    pointer-events: none;
}

.timeline-controls {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.pill-btn:hover {
    border-color: #3b82f6;
    color: #e5e7eb;
}

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

.easing-group {
    margin-bottom: 12px;
}

.pro-gate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.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.copied {
    background-color: #10b981;
}

.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: all 150ms ease;
    text-align: center;
}

.button-secondary.copied {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

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

.output-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-area {
    min-height: 300px;
    background-color: #111111;
    border: 1px solid #374151;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.preview-element {
    width: 80px;
    height: 80px;
    background-color: #3b82f6;
    border-radius: 8px;
}

.preview-element.shape-circle {
    border-radius: 50%;
}

.preview-element.shape-text {
    width: auto;
    height: auto;
    background-color: transparent;
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
    white-space: nowrap;
}

.playback-controls {
    display: flex;
    gap: 8px;
}

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

.control-btn:hover {
    border-color: #3b82f6;
    color: #ffffff;
}

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

.code-output {
    background-color: #111111;
    border: 1px solid #374151;
    border-radius: 8px;
    overflow-x: auto;
}

.code-output pre {
    margin: 0;
    padding: 20px;
}

.code-output code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.6;
    white-space: pre;
    display: block;
}

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

.pro-feature {
    position: relative;
    opacity: 0.6;
}

.pro-feature.unlocked {
    opacity: 1;
}

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

.section-header {
    margin-bottom: 4px;
}

.bezier-editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

#bezier-canvas {
    display: block;
    background-color: #111111;
    border: 1px solid #374151;
    border-radius: 8px;
    cursor: crosshair;
}

.bezier-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.bezier-value-display {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    color: #9ca3af;
    background-color: #1a1a1a;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #374151;
}

.sequence-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-state {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    padding: 16px;
}

.sequence-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    transition: border-color 150ms ease;
}

.sequence-item:hover {
    border-color: #4b5563;
}

.sequence-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.sequence-item-index {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    min-width: 24px;
}

.sequence-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sequence-item-duration {
    font-size: 13px;
    color: #9ca3af;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    flex-shrink: 0;
}

.sequence-item-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.sequence-item-btn {
    background: none;
    border: 1px solid #374151;
    color: #9ca3af;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
}

.sequence-item-btn:hover {
    border-color: #3b82f6;
    color: #e5e7eb;
}

.sequence-item-btn.remove:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.sequence-arrow {
    text-align: center;
    color: #4b5563;
    font-size: 14px;
    padding: 2px 0;
}

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

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    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;
    transition: color 150ms ease;
}

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

.modal-content {
    padding: 24px;
}

.modal-feature-context {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 16px;
    line-height: 1.5;
}

.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;
}

.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;
}

.modal-hidden {
    display: none;
}

@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;
    }

    .pro-section {
        padding: 16px;
    }

    .preview-area {
        min-height: 240px;
    }

    #bezier-canvas {
        width: 240px;
        height: 240px;
    }

    .keyframe-marker {
        width: 20px;
        height: 20px;
    }

    .keyframe-marker.selected {
        width: 24px;
        height: 24px;
    }

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

    .timeline-controls {
        flex-direction: column;
    }

    .timeline-controls .button-secondary {
        width: 100%;
    }

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

    .export-buttons .button-secondary {
        width: 100%;
    }

    .playback-controls {
        justify-content: center;
    }

    .slider-row {
        flex-wrap: wrap;
    }

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

        padding: 0 16px;
    }

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

@media (max-width: 480px) {
    .button-group {
        gap: 6px;
    }

    .color-picker-row {
        flex-wrap: wrap;
    }

    .sequence-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .sequence-item-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}