/* 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: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.preview-section {
    background-color: #111111;
    border: 1px solid #222222;
    border-radius: 8px;
    padding: 20px;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.preview-label {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

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

.gradient-preview {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    border: 1px solid #374151;
    position: relative;
    overflow: hidden;
}

.gradient-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-conic-gradient(#eee 0% 25%, transparent 0% 50%) 50% / 20px 20px;
    opacity: 0.1;
    pointer-events: none;
}

.controls-section {
    background-color: #111111;
    border: 1px solid #222222;
    border-radius: 8px;
    padding: 20px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

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

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

.angle-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.angle-slider {
    flex: 1;
    height: 6px;
    background: #374151;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.angle-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

.angle-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.angle-text {
    width: 60px;
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    outline: none;
}

.angle-text:focus {
    border-color: #3b82f6;
}

.angle-unit {
    font-size: 13px;
    color: #9ca3af;
    min-width: 12px;
}

.select-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    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;
}

.select-input:focus {
    border-color: #3b82f6;
}

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

.color-stops-section {
    background-color: #111111;
    border: 1px solid #222222;
    border-radius: 8px;
    padding: 20px;
}

.color-stops-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.color-stops-label {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.color-stops-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-stop {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #0a0a0a;
    border: 1px solid #1f1f1f;
    border-radius: 6px;
}

.color-stop-color {
    width: 40px;
    height: 40px;
    border: 1px solid #374151;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    background: repeating-conic-gradient(#eee 0% 25%, transparent 0% 50%) 50% / 10px 10px;
}

.color-stop-color::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 6px;
}

.color-stop-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'SF Mono', monospace;
    outline: none;
    flex: 1;
    min-width: 80px;
}

.color-stop-input:focus {
    border-color: #3b82f6;
}

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

.color-stop-slider {
    width: 100px;
    height: 6px;
    background: #374151;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.color-stop-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #10b981;
    border-radius: 50%;
    cursor: pointer;
}

.color-stop-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #10b981;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.color-stop-percent {
    font-size: 12px;
    color: #9ca3af;
    font-family: 'SF Mono', monospace;
    min-width: 35px;
    text-align: right;
}

.color-stop-remove {
    background: none;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.color-stop-remove:hover {
    color: #ef4444;
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.css-output-section {
    background-color: #111111;
    border: 1px solid #222222;
    border-radius: 8px;
    padding: 20px;
}

.css-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.css-output-label {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

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

.css-output-content {
    background-color: #0a0a0a;
    border: 1px solid #1f1f1f;
    border-radius: 6px;
    overflow: hidden;
}

#css-output {
    padding: 16px;
    margin: 0;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #e5e7eb;
    background: none;
    white-space: pre-wrap;
    word-break: break-all;
}

.language-css .token.property {
    color: #60a5fa;
}

.language-css .token.function {
    color: #f472b6;
}

.language-css .token.string {
    color: #10b981;
}

.language-css .token.number {
    color: #fbbf24;
}

.presets-section {
    background-color: #111111;
    border: 1px solid #222222;
    border-radius: 8px;
    padding: 20px;
}

.presets-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.presets-label {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.presets-description {
    font-size: 12px;
    color: #9ca3af;
}

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

.preset-gradient {
    position: relative;
    height: 80px;
    border-radius: 8px;
    border: 1px solid #374151;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease;
    overflow: hidden;
}

.preset-gradient:hover {
    transform: scale(1.02);
    border-color: #3b82f6;
}

.preset-gradient::after {
    content: attr(data-name);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-size: 10px;
    padding: 4px 6px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    flex-shrink: 0;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    flex-shrink: 0;
}

.button-copy {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.button-copy:hover {
    color: #e5e7eb;
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.button-copy.copied {
    color: #10b981;
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
}

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

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

        font-size: 14px;
    }

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

    .tool-container {
        gap: 24px;
    }

    .controls-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .preview-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .color-stops-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .css-output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .css-output-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .color-stop {
        flex-wrap: wrap;
        gap: 8px;
    }

    .color-stop-position {
        order: 3;
        flex-basis: 100%;
    }

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

    .preset-gradient {
        height: 60px;
    }

        padding: 0 16px;
    }

    .preview-section,
    .controls-section,
    .color-stops-section,
    .css-output-section,
    .presets-section {
        padding: 16px;
    }
}

@media (max-width: 480px) {
        font-size: 24px;
        line-height: 32px;
    }

    .gradient-preview {
        height: 150px;
    }

    .angle-input-group {
        flex-wrap: wrap;
        gap: 4px;
    }

    .angle-slider {
        order: 3;
        flex-basis: 100%;
    }

    .color-stop-slider {
        width: 80px;
    }

    #css-output {
        font-size: 12px;
        padding: 12px;
    }

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

    .preset-gradient {
        height: 50px;
    }

    .preset-gradient::after {
        font-size: 8px;
        padding: 2px 4px;
    }
}

.cta-content {
    color: #9ca3af;
    font-size: 14px;
}

.cta-content strong {
    color: #ffffff;
}

.btn-pro {
    color: #0a0a0a;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 150ms ease;
    font-family: inherit;
}

.btn-pro:hover {
    opacity: 0.9;
}

.btn-pro.full-width {
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    display: block;
}

.pro-badge {
    display: inline-block;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pro-section {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.pro-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.5);
    border-radius: 12px;
    z-index: 1;
}

.pro-section::after {
    content: '🔒 Pro Feature';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1f2937;
    color: #9ca3af;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2;
}

.pro-section.unlocked {
    opacity: 1;
    pointer-events: auto;
}

.pro-section.unlocked::before,
.pro-section.unlocked::after {
    display: none;
}

.pro-section.unlocked .pro-badge {
    display: none;
}

.export-section {
    background-color: #141414;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.export-header {
    margin-bottom: 16px;
}

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

.export-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.export-option {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.export-option label {
    font-size: 12px;
    color: #6b7280;
}

.export-input {
    width: 100px;
    padding: 8px 12px;
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 14px;
}

.export-input:focus {
    outline: none;
    border-color: #4f46e5;
}

.tailwind-output-section {
    background-color: #141414;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

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

.presets-pro-notice {
    text-align: center;
    padding: 16px;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    color: #9ca3af;
}

.presets-pro-notice.section-hidden {
    display: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #374151;
}

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

.modal-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

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

.modal-body {
    padding: 24px;
}

.upgrade-feature {
    font-size: 16px;
    color: #e5e7eb;
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
}

.feature-list li {
    padding: 8px 0;
    color: #9ca3af;
    font-size: 14px;
}

.feature-list li::before {
    content: '✓ ';
    color: #10b981;
}

.upgrade-pricing {
    text-align: center;
    padding: 16px;
    background: #1a1a1a;
    border-radius: 8px;
}

.upgrade-pricing .price {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.upgrade-pricing .price-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid #374151;
}

@media (max-width: 768px) {
    .pro-cta-bar {
        flex-direction: column;
        height: auto;
        padding: 8px 16px;
        gap: 8px;
        font-size: 12px;
    }

    .pro-cta-bar span {
        text-align: center;
    }

        margin-top: 130px;
    }

    .export-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .export-option {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .export-input {
        width: auto;
        flex: 1;
        max-width: 150px;
    }
}