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

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

.color-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

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

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

.hex-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 15px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    outline: none;
    width: 120px;
    transition: border-color 150ms ease;
}

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

.button-primary {
    background-color: #6366f1;
    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-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-small {
    background-color: #1a1a1a;
    color: #d1d5db;
    border: 1px solid #374151;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.button-small:hover {
    background-color: #374151;
    color: #ffffff;
}

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

.pro-control-group {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 16px 20px;
}

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

.pro-control-header > label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #e5e7eb;
}

.pro-control-body {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.pro-badge-inline {
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 5px;
    border-radius: 3px;
    margin-right: 6px;
}

.pro-locked {
    opacity: 0.7;
    position: relative;
}

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

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-track {
    display: block;
    width: 44px;
    height: 24px;
    background-color: #374151;
    border-radius: 12px;
    position: relative;
    transition: background-color 150ms ease;
}

.toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background-color: #9ca3af;
    border-radius: 50%;
    transition: all 150ms ease;
}

.toggle-switch input:checked + .toggle-track {
    background-color: #6366f1;
}

.toggle-switch input:checked + .toggle-track::after {
    transform: translateX(20px);
    background-color: #e5e7eb;
}

.segment-control {
    display: flex;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    overflow: hidden;
}

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

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

.segment-btn:hover:not(.active) {
    color: #e5e7eb;
}

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

.layer-count-control span {
    font-size: 15px;
    font-weight: 500;
    color: #e5e7eb;
    min-width: 20px;
    text-align: center;
}

.layer-btn {
    width: 32px;
    height: 32px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
}

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

.layer-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.layer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
}

.layer-item-label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    min-width: 56px;
    flex-shrink: 0;
}

.layer-item .color-picker {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.layer-item .slider {
    flex: 1;
    min-width: 60px;
}

.layer-item-opacity {
    font-size: 12px;
    color: #9ca3af;
    min-width: 32px;
    text-align: right;
    flex-shrink: 0;
}

.layer-randomize-btn {
    width: 28px;
    height: 28px;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    color: #9ca3af;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.layer-randomize-btn:hover {
    background-color: #374151;
    color: #ffffff;
}

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

.preview-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
}

.preview-container {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

.preview-container svg {
    width: 100%;
    height: auto;
    max-height: 400px;
}

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

.action-buttons .button-primary,
.action-buttons .button-secondary {
    flex: 1;
    min-width: 120px;
}

.png-export-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
}

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

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

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

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: #6366f1;
    border-color: #6366f1;
}

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

.code-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.code-preview-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
}

.code-block {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    max-height: 240px;
    overflow-y: auto;
}

.code-block code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #d1d5db;
    white-space: pre;
    tab-size: 2;
}

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

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

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

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

    .preview-container {
        min-height: 240px;
        padding: 16px;
    }

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

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

    .pro-control-group {
        padding: 14px 16px;
    }

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

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

        padding: 0 16px;
    }

    .code-block {
        max-height: 180px;
    }
}

@media (max-width: 480px) {
    .color-input-row {
        flex-direction: row;
    }

    .hex-input {
        flex: 1;
        width: auto;
    }

    .segment-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}