/* 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,
.group-label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

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

.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-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.setting-value {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    min-width: 48px;
    text-align: right;
}

.mode-toggle {
    display: flex;
    gap: 0;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 4px;
}

.mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

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

.mode-btn:hover:not(.active) {
    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: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
}

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

.color-picker {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid #374151;
    background: transparent;
    cursor: pointer;
    padding: 2px;
    -webkit-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;
}

.scene-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

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

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

.custom-bg-upload {
    margin-top: 8px;
}

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

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

.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: 400px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.glass-card {
    min-width: 280px;
    max-width: 360px;
    padding: 32px;
    text-align: center;
    position: relative;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.glass-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.glass-card-text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.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', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    color: #e2e8f0;
    white-space: pre;
    line-height: 1.5;
}

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

.copy-btn.copied {
    background-color: #10b981;
}

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

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

.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: 10px;
}

.preset-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.preset-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #374151;
}

.preset-item:last-child {
    border-bottom: none;
}

.preset-name {
    font-size: 14px;
    color: #e5e7eb;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preset-actions-row {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.preset-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preset-save-row {
    display: flex;
    gap: 8px;
}

.preset-save-row .text-input {
    flex: 1;
}

.preset-io-row {
    display: flex;
    gap: 8px;
}

.import-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

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

.component-toggle {
    display: flex;
    gap: 0;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 4px;
}

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

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

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

.animation-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

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

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

.animation-preview-area {
    min-height: 200px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #f97316, #ec4899, #8b5cf6);
}

.animation-card {
    min-width: 200px;
    padding: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.animation-card-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.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: 16px;
}

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

.preset-load-btn,
.preset-delete-btn {
    background: none;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.preset-load-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.preset-delete-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 8px;
}

.success-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 8px;
}

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

    .controls-group {
        padding: 16px;
    }

    .output-section {
        padding: 16px;
    }

    .pro-section {
        padding: 16px;
    }

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

    .glass-card {
        min-width: auto;
        max-width: 280px;
        padding: 24px;
    }

    .setting-label-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .setting-value {
        text-align: left;
    }

    .scene-selector {
        gap: 6px;
    }

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

    .animation-selector {
        gap: 6px;
    }

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

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

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

        padding: 0 16px;
    }

    .preset-save-row {
        flex-direction: column;
    }

    .preset-io-row {
        flex-direction: column;
    }

    .code-block {
        padding: 16px;
    }

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

    .animation-preview-area {
        min-height: 160px;
    }
}

@media (max-width: 480px) {
    .component-toggle {
        flex-direction: column;
    }
}