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

.mode-selector {
    display: flex;
    gap: 0;
    border: 1px solid #374151;
    border-radius: 8px;
    overflow: hidden;
}

.mode-btn {
    flex: 1;
    padding: 10px 16px;
    background-color: transparent;
    border: none;
    border-right: 1px solid #374151;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mode-btn:last-child {
    border-right: none;
}

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

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

.unit-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #374151;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

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

.unit-btn:last-child {
    border-right: none;
}

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

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

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

.unit-btn.disabled:hover {
    background-color: transparent;
    color: #9ca3af;
}

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

.slider-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.slider-group-title:first-child {
    margin-top: 0;
}

.slider-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

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

.slider-value {
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
    min-width: 36px;
    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);
}

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

.randomize-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.output-title {
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

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

#preview-shape {
    width: 200px;
    height: 200px;
    background-color: #3b82f6;
    transition: border-radius 0.15s ease;
}

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

.code-block pre {
    margin: 0;
}

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

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

.button-primary {
    background-color: #3b82f6;
    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;
    text-align: center;
}

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

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

.copy-btn {
    align-self: flex-start;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    line-height: 1;
}

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

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

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

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

.preset-card {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.preset-card:hover {
    border-color: #3b82f6;
    background-color: #1e1e1e;
}

.preset-card.active {
    border-color: #3b82f6;
    background-color: #1e1e1e;
    box-shadow: 0 0 0 1px #3b82f6;
}

.preset-thumbnail {
    width: 48px;
    height: 48px;
    background-color: #3b82f6;
    flex-shrink: 0;
}

.preset-name {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    line-height: 1.2;
}

.preset-card .pro-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 8px;
    padding: 1px 4px;
}

.export-format-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #374151;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

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

.format-btn:last-child {
    border-right: none;
}

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

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

.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: 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-name {
    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: 14px;
    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;
}

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

        padding: 0 16px;
    }

    .output-section {
        padding: 16px;
    }

    .pro-section {
        padding: 16px;
    }

    .slider-group {
        padding: 16px;
    }

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

    #preview-shape {
        width: 160px;
        height: 160px;
    }

    .preset-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .mode-btn {
        padding: 8px 10px;
        font-size: 13px;
    }

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

    .code-block {
        padding: 16px;
    }

    .code-block code {
        font-size: 13px;
    }

    .copy-btn {
        width: 100%;
    }
}