/**
 * AI Prompt Generator Styles
 */

.ai-prompt-generator-wrapper {
    background: #f8fafc;
    min-height: 100vh;
    padding: 2rem 0;
}

.generator-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.generator-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.generator-title svg {
    color: #3b82f6;
}

.generator-description {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.template-selection {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.template-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
}

.template-tab {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-tab:hover {
    background: #f1f5f9;
    color: #334155;
}

.template-tab.active {
    background: #3b82f6;
    color: white;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.template-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.template-card.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.template-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.template-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.template-card:hover .template-image img {
    transform: scale(1.05);
}

.template-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #e2e8f0;
    color: #94a3b8;
}

.template-content {
    padding: 1.5rem;
}

.template-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.template-tags .tag {
    background: #e2e8f0;
    color: #64748b;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.generator-main {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.generator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .generator-content {
        grid-template-columns: 1fr;
    }
}

.generator-left h2,
.generator-right h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.selected-template {
    margin-bottom: 2rem;
}

.template-info {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.template-info-left {
    flex-shrink: 0;
}

.template-info-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.template-info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-info-right {
    flex: 1;
}

.template-info-right h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.template-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.template-info-tags .tag {
    background: #e2e8f0;
    color: #64748b;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.template-info-content pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #334155;
    overflow-x: auto;
}

.describe-section {
    margin-bottom: 2rem;
}

.describe-input {
    position: relative;
}

.describe-input textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.describe-input textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-label {
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    background: white;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.variables-section {
    margin-bottom: 2rem;
}

.variables-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.variable-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.variable-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
}

.variable-description {
    color: #64748b;
    font-weight: 400;
}

.variable-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.variable-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.params-section {
    margin-bottom: 2rem;
}

.param-group {
    margin-bottom: 1.5rem;
}

.param-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.75rem;
}

.param-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.param-option {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.param-option:hover {
    background: #e2e8f0;
    color: #334155;
}

.param-option.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.aspect-ratio-options {
    gap: 0.5rem;
}

.aspect-ratio-options .param-option {
    min-width: 60px;
    text-align: center;
}

.param-slider {
    margin-top: 0.5rem;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

.generate-section {
    margin-bottom: 2rem;
}

.generate-btn {
    width: 100%;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.generate-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

.generate-note {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 1rem;
}

.result-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
}

.result-box {
    position: relative;
}

.result-box pre {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #334155;
    overflow-x: auto;
    margin-bottom: 1rem;
    min-height: 120px;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.copy-btn,
.regenerate-btn {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.copy-btn:hover,
.regenerate-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

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

.usage-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.usage-section h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2rem;
}

.usage-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.usage-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .generator-title {
        font-size: 2rem;
    }

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

    .template-info {
        flex-direction: column;
    }

    .template-info-image {
        width: 100%;
        height: 200px;
    }

    .usage-steps {
        grid-template-columns: 1fr;
    }
}
