/* Stress Test Generator Styles */
.stress-test-generator {
    margin-bottom: 2rem;
}

.generator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

/* Panel Container */
.panel-container {
    background: var(--card-bg, #ffffff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.panel-container:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Panel Header */
.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-color, #4f46e5) 0%, var(--primary-dark, #4338ca) 100%);
    color: white;
}

.header-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    flex-shrink: 0;
}

.header-icon {
    width: 24px;
    height: 24px;
    color: white;
}

.header-content {
    flex: 1;
    min-width: 0;
}

.panel-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: white;
}

.panel-subtitle {
    font-size: 13px;
    margin: 0;
    opacity: 0.9;
    color: white;
}

.header-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* Panel Body */
.panel-body {
    padding: 24px;
}

/* Form Fields */
.form-field-group {
    margin-bottom: 20px;
}

.form-field-group:last-child {
    margin-bottom: 0;
}

.field-label {
    display: block;
    margin-bottom: 8px;
}

.label-text {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin-bottom: 4px;
}

.label-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted, #6b7280);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Form Inputs */
.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--input-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted, #9ca3af);
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
}

.select-wrapper .form-select {
    appearance: none;
    padding-right: 40px;
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted, #6b7280);
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary,
.btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color, #4f46e5);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-dark, #4338ca);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--secondary-bg, #f3f4f6);
    color: var(--text-primary, #1f2937);
    border: 2px solid var(--border-color, #e5e7eb);
}

.btn-secondary:hover {
    background: var(--hover-bg, #e5e7eb);
    border-color: var(--text-muted, #9ca3af);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* Code Output */
.code-output {
    position: relative;
    min-height: 500px;
    max-height: 600px;
    overflow: auto;
    background: var(--code-bg, #1e1e1e);
    border-radius: 8px;
}

.code-output pre {
    margin: 0;
    padding: 20px;
    font-size: 13px;
    line-height: 1.6;
    color: #d4d4d4;
    overflow-x: auto;
}

.code-output code {
    color: inherit;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
    text-align: center;
}

.empty-state svg {
    margin-bottom: 16px;
    color: var(--text-muted, #6b7280);
}

.empty-text {
    font-size: 14px;
    color: var(--text-muted, #6b7280);
    max-width: 300px;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .generator-wrapper {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .stress-test-generator {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .generator-wrapper {
        gap: 16px;
    }
    
    .panel-header {
        padding: 16px 20px;
        flex-wrap: wrap;
    }
    
    .panel-body {
        padding: 20px;
    }
    
    .panel-title {
        font-size: 18px;
    }
    
    .panel-subtitle {
        font-size: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .code-output {
        min-height: 300px;
        max-height: 500px;
    }
    
    .code-output pre {
        font-size: 12px;
        padding: 16px;
    }
    
    .empty-state {
        min-height: 300px;
        padding: 24px;
    }
    
    .empty-state svg {
        width: 48px;
        height: 48px;
    }
    
    .empty-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .panel-header {
        padding: 14px 16px;
    }
    
    .header-icon-wrapper {
        width: 36px;
        height: 36px;
    }
    
    .header-icon {
        width: 20px;
        height: 20px;
    }
    
    .panel-body {
        padding: 16px;
    }
    
    .form-input,
    .form-select {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 13px;
    }
}
