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

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

.shape-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.shape-thumb {
    aspect-ratio: 2 / 1;
    background-color: #1a1a1a;
    border: 2px solid #374151;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 150ms ease, opacity 150ms ease;
    padding: 0;
    font-family: inherit;
    font-size: 0;
    line-height: 0;
}

.shape-thumb:hover {
    border-color: #6366f1;
}

.shape-thumb.active {
    border-color: #6366f1;
    box-shadow: 0 0 0 1px #6366f1;
}

.shape-thumb svg {
    width: 100%;
    height: 100%;
    display: block;
}

.shape-thumb-label {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    line-height: 1;
}

.shape-thumb .lock-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #f59e0b;
    font-weight: 600;
}

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

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

.setting-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

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

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

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

.slider-value {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}

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: #6366f1;
    border-radius: 50%;
    cursor: pointer;
    transition: box-shadow 150ms ease;
}

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

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

input[type="range"].slider:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

input[type="range"].slider:disabled::-webkit-slider-thumb {
    cursor: not-allowed;
}

input[type="range"].slider:disabled::-moz-range-thumb {
    cursor: not-allowed;
}

input[type="color"] {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid #374151;
    background: transparent;
    cursor: pointer;
    padding: 2px;
    transition: border-color 150ms ease;
}

input[type="color"]:hover {
    border-color: #6366f1;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

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

.toggle-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.toggle-btn:hover:not(:disabled) {
    background-color: #374151;
    color: #e5e7eb;
}

.toggle-btn.active {
    background-color: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

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

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

.gradient-row {
    display: flex;
    gap: 16px;
}

.gradient-color {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.layer-count-group {
    margin-bottom: 8px;
}

.layer-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
}

.layer-row > label {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
}

.layer-settings {
    display: flex;
    align-items: center;
    gap: 12px;
}

.layer-opacity {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.layer-opacity label {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
}

.animation-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

textarea#custom-path-input {
    width: 100%;
    min-height: 80px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 13px;
    border-radius: 6px;
    padding: 12px;
    resize: vertical;
    outline: none;
    line-height: 1.5;
    transition: border-color 150ms ease;
}

textarea#custom-path-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

textarea#custom-path-input::placeholder {
    color: #6b7280;
}

.path-error {
    font-size: 13px;
    color: #ef4444;
    padding: 6px 0;
}

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

.preview-area {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #374151;
}

.preview-section {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.divider-container {
    width: 100%;
    line-height: 0;
    font-size: 0;
}

.divider-container svg {
    display: block;
    width: 100%;
}

.section-color-controls {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.section-color {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.section-color input[type="color"] {
    width: 32px;
    height: 32px;
}

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

.code-output pre {
    padding: 16px;
    margin: 0;
    white-space: pre;
    line-height: 1.5;
}

.code-output code {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 13px;
    color: #e2e8f0;
}

.button-primary {
    background-color: #6366f1;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease, filter 150ms ease;
    text-align: center;
}

.button-primary.copied {
    background-color: #10b981;
}

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

.export-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.button-download {
    background-color: #059669;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pro-action {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
}

.pro-action:hover {
    background-color: #374151;
}

.batch-progress {
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.batch-progress-fill {
    height: 100%;
    background-color: #6366f1;
    border-radius: 2px;
    width: 0%;
    transition: width 300ms ease;
}

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

.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: 400px;
    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-body {
    padding: 24px;
}

.modal-feature-context {
    font-size: 15px;
    color: #9ca3af;
    margin-bottom: 20px;
}

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

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 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;
    text-align: center;
}

.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: 640px) {
        padding: 32px 16px;
    }

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

        font-size: 14px;
    }

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

    .tool-container {
        gap: 32px;
    }

    .shape-selector {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }

    .output-section {
        padding: 16px;
    }

    .preview-section {
        min-height: 80px;
    }

    .code-output code {
        font-size: 12px;
    }

    .slider-label {
        flex-wrap: wrap;
        gap: 4px;
    }

    .section-color-controls {
        flex-direction: column;
        gap: 12px;
    }

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

        padding: 0 16px;
    }

    .gradient-row {
        flex-direction: column;
        gap: 12px;
    }

    .button-group {
        flex-wrap: wrap;
    }
}