/* Recipe Form Specific Styles */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(35, 8, 61, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(125, 29, 211, 0.3);
    padding: 40px;
    border: 2px solid rgba(255, 229, 0, 0.2);
}

.page-title {
    color: #FFE500;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2em;
    text-shadow: 0 0 10px rgba(255, 229, 0, 0.5);
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(21, 5, 36, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(125, 29, 211, 0.3);
    box-sizing: border-box;
    overflow: hidden;
}

#ingredientsContainer,
#stepsContainer {
    width: 100%;
    overflow: hidden;
}

.form-section h3 {
    color: #FFE500;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #7D1DD3;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
textarea {
    width: calc(100% - 24px);
    padding: 12px;
    border: 2px solid rgba(125, 29, 211, 0.5);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(10, 2, 17, 0.9);
    color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #7D1DD3;
    box-shadow: 0 0 10px rgba(125, 29, 211, 0.5);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.ingredient-item,
.step-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    cursor: move;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.2s;
    box-sizing: border-box;
    width: 100%;
}

.ingredient-item:hover,
.step-item:hover {
    background-color: rgba(125, 29, 211, 0.1);
}

.ingredient-section {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    margin-top: 15px;
    align-items: center;
    padding: 15px;
    background: rgba(125, 29, 211, 0.2);
    border-radius: 8px;
    border-left: 4px solid #7D1DD3;
    cursor: move;
    box-sizing: border-box;
    width: 100%;
}

.ingredient-section:hover {
    background-color: rgba(125, 29, 211, 0.3);
}

.ingredient-section input {
    flex: 1;
    font-weight: 600;
    background: rgba(10, 2, 17, 0.9);
}

.ingredient-section .btn-remove {
    flex-shrink: 0;
}

.ingredient-item input,
.step-item textarea {
    flex: 1;
}

.ingredient-item.dragging,
.step-item.dragging,
.ingredient-section.dragging {
    opacity: 0.4;
    background-color: rgba(125, 29, 211, 0.2);
}

.drag-over {
    border: 2px dashed #FFE500;
    background-color: rgba(255, 229, 0, 0.1);
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-add {
    background: #7D1DD3;
    color: white;
}

.btn-add:hover {
    background: #6a18b8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(125, 29, 211, 0.4);
}

.btn-section {
    background: #9d4edd;
}

.btn-section:hover {
    background: #8338c9;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    flex-shrink: 0;
}

.btn-remove:hover {
    background: #c0392b;
}

.btn-generate {
    background: linear-gradient(135deg, #7D1DD3 0%, #FFE500 100%);
    color: #000;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 20px;
    font-weight: bold;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 229, 0, 0.4);
}

.btn-reset {
    background: #e74c3c;
    color: white;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 10px;
    font-weight: bold;
}

.btn-reset:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.4);
}

.copy-btn {
    background: #27ae60;
    color: white;
    margin-top: 10px;
    margin-right: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.copy-btn:hover {
    background: #229954;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.drag-handle {
    cursor: grab;
    color: rgba(255, 229, 0, 0.6);
    font-size: 18px;
    padding: 0 5px;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.order-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btn-order {
    background: rgba(125, 29, 211, 0.6);
    color: white;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1;
    min-width: 30px;
}

.btn-order:hover {
    background: #7D1DD3;
    transform: none;
}

.output {
    margin-top: 30px;
    padding: 20px;
    background: rgba(10, 2, 17, 0.95);
    border-radius: 10px;
    display: none;
    border: 2px solid rgba(255, 229, 0, 0.3);
}

.output pre {
    color: #FFE500;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
}

.copy-btn {
    background: #27ae60;
    color: white;
    margin-top: 10px;
    margin-right: 10px;
}

.copy-btn:hover {
    background: #229954;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group button {
        width: 100%;
    }
}

