/* Instructions Section Styles */
#instructions-section {
    position: relative;
    z-index: 2;
    display: none;
    padding-top: 90px;
    width: 96%;
    margin: auto;
}

#instructions-section.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#instructions-section main {
    padding: 0;
    width: 100%;
}

.instructions-container {
    width: 100%;

}

/* Instructions Card */
.instructions-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    margin-bottom: 3rem;
}

.instructions-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 0 16px 0;
    border-bottom: 1px solid #e5e7eb;
    background: transparent;
}

.instructions-card-header i {
    font-size: 20px;
    color: #6c757d;
}

.instructions-card-header h2 {
    font-size: 14px;
    font-weight: lighter;
    color: #495057;
    margin: 0;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instructions-card-body {
    padding: 24px 0;
}

/* Form Group */
.instructions-form-group {
    margin-bottom: 24px;
}

.instructions-form-group label {
    display: block;
    font-size: 12px;
    font-weight: lighter;
    color: #495057;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instructions-description {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px 0;
    line-height: 1.6;
}

/* Instructions Textarea */
.instructions-textarea {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    color: #333;
    background: #fafafa;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.instructions-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fff;
}

.instructions-textarea::placeholder {
    color: #999;
    font-style: italic;
}

.instructions-textarea:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Character Count */
.character-count {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
    font-family: 'Inter', sans-serif;
}

.character-count.warning {
    color: #f59e0b;
}

.character-count.error {
    color: #dc2626;
}

/* Info Box */
.instructions-info {
    background: #f0f3ff;
    border: 1px solid #667eea;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.instructions-info-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.instructions-info-title i {
    color: #667eea;
}

.instructions-info-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.instructions-info-text code {
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

/* Form Actions */
.instructions-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* Reset Button */
.instructions-reset-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    background: transparent;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.instructions-reset-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.instructions-reset-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Submit Button */
.instructions-submit-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(var(--gradient-angle, 90deg), var(--gradient-start, #667eea), var(--gradient-end, #7085f4));
}

.instructions-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.instructions-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Status Messages */
.instructions-status {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    margin-bottom: 20px;
    display: none;
}

.instructions-status.success {
    display: block;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.instructions-status.error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.instructions-status.loading {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f3ff;
    color: #667eea;
    border: 1px solid #c7d2fe;
}

/* Loading Spinner */
.instructions-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #c7d2fe;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: instructionsSpin 0.8s linear infinite;
}

@keyframes instructionsSpin {
    to { transform: rotate(360deg); }
}

/* Access Denied */
.instructions-access-denied {
    text-align: center;
    padding: 60px 20px;
}

.instructions-access-denied i {
    font-size: 64px;
    color: #dc2626;
    margin-bottom: 20px;
}

.instructions-access-denied h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.instructions-access-denied p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Current Instructions Preview */
.instructions-preview {
    margin-top: 24px;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
}

.instructions-preview-title {
    font-size: 12px;
    font-weight: lighter;
    color: #495057;
    margin: 0 0 16px 0;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instructions-preview-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.instructions-preview-box pre {
    margin: 0;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive Design */
@media (max-width: 768px) {
    #instructions-section {
        padding: 1rem;
        padding-top: 90px;
    }

    .instructions-container {
        max-width: 100%;
    }

    .instructions-textarea {
        min-height: 250px;
        font-size: 13px;
    }

    .instructions-form-actions {
        flex-direction: column;
    }

    .instructions-reset-btn,
    .instructions-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #instructions-section {
        padding: 0.5rem;
        padding-top: 90px;
    }

    .instructions-textarea {
        min-height: 200px;
        padding: 12px;
    }

    .instructions-info {
        padding: 12px;
    }
}

